#ngtcp2 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #ngtcp2, aggregated by home.social.
-
It looks like the #OpenSSL QUIC API might be supported in the coming #ngtcp2 1.12.0 release:
https://github.com/ngtcp2/ngtcp2/pull/1582
This could be exciting for #curl users building with #OpenSSL ...
-
@bagder quite interesting details about quic support. It affects also DNS over QUIC, not only HTTPS/3. At least unbound and bind9 are compiled with OpenSSL on Fedora. Unbound has added recently server support via #ngtcp2. But it gets weird and inappropriate, linking two different crypto stacks into single binary. The reason is similar to curl. Normal TLS from OpenSSL, quic via gnutls. If it should be enabled, then this way...
-
An #ngtcp2 lead developer told me they have no current plans to adapt to the new #OpenSSL #QUIC API because of its lack of 0RTT support and the "pull model".
Of course someone else can go ahead and write it and ideally someone from #OpenSSL does it, for dogfooding purposes.
I have no heard of any other QUIC stack either having adapted to it yet.
-
#OpenSSL #QUIC implementation performance is "abysmal" compared to competing solutions such as #ngtcp2 (ngtcp2 is 2-4x faster) and consumes tons (up to 25x in some situations) of memory. (*)
I still don't fathom why the OpenSSL project chose the path they took. It smells heavily of "Not Invented Here" to me.
Surely some future OpenSSL version will fix this mess?
*) https://lists.haxx.se/pipermail/daniel/2025-January/000096.html
-
Whoa, I just got a basic Python wrapper around ngtcp2 [server only] functional. Lots of error handling and edge cases need to be implemented.
The test that is working is a client (aioquic) connects, opens a stream, both sides send some data, and confirms that the other side received the data.
I really didn't think my last set of changes would make things work, I expected to hit some unimplemented parts.
TODO:
```
$ grep NotImplementedError ngtcp2.py | wc -l
15
``` -
Обновился #OpenSSL до 3.4.0 и опять без полноценной нормальной поддержки #QUIC, т.е. непригодный для #HTTP/3 на серверной стороне. И, соответственно, ещё не ясно на сколько хорошо сделана клиентская часть :)
Аж вспомнились времена, когда желая получить #curl поддерживающий нормально работу #HTTP/3 приходилось собирать его из исходников с аналогами/форками #OpenSSL.
#HTTP/3 работает не через tcp-соединения, а использует в качестве транспорта протокол QUIC (Quick UDP Internet Connections), т.е. передаёт данные поверх udp без использования абстракций и сущностей tcp. Вот картинка про современный #HTTP
Сам по себе #QUIC не умеет передавать данные в открытом виде, а может только через #TLS v1.3, т.е. в обязательном порядке только зашифрованные. Тем самым в QUIC используется встроенный вариант TLS 1.3 крайне близкий/схожий с #DTLS, поскольку работа протокола идёт на уровне обмена udp-пакетами, а не tcp-соединений.
#curl может использовать разные альтернативы OpenSSL, т.к. изначально спроектирован таким образом, что не завязан именно на OpenSSL:- Есть официальная документация что и как с бэкендами вообще.
- Рядом, примерно там же имеется сравнение разных криптографических бэкендов.
Что предлагают по HTTP/3 авторы curl?
Вот зелёным выделена комбинация библиотек, которую полагают наиболее стабильным и полноценным вариантом
Вся загвоздка в том, что #OpenSSL пытается содержать в себе реализацию #QUIC, а не использует реализацию в виде какой-то библиотеки.
Что получается в целом?
Протокол #HTTP/3 реализуется через библиотеку #nghttp3.
Необходимая реализация #QUIC через #ngtcp2.
А для TLS используется #GnuTLS или же #wolfSSL или что-то ещё:The OpenSSL forks #LibreSSL, #BoringSSL, #AWS-LC and #quictls support the QUIC API that #curl works with using #ngtcp2.
Вот из документация примеры и детали по сборке этих составляющих. Если выбрана #GnuTLS и в системе версия далёкая от свежих, то сама она довольно быстро собирается из исходников.
В целом, вообще, про варианты добавления поддержки #HTTP/3 очень достойно расписано здесь. И есть перевод этой публикации на русском языке.
#https #http #openssl #softwaredevelopment #lang_ru @Russia -
Well, I can say that ngtcp2 is not coded very defensively. I finally got enough of a framework to call into it, and it causes a segfault.
No error on what possible pointer I messed up, not even an error that I messed up a pointer.
-
Well, I can say that ngtcp2 is not coded very defensively. I finally got enough of a framework to call into it, and it causes a segfault.
No error on what possible pointer I messed up, not even an error that I messed up a pointer.
-
Well, I can say that ngtcp2 is not coded very defensively. I finally got enough of a framework to call into it, and it causes a segfault.
No error on what possible pointer I messed up, not even an error that I messed up a pointer.
-
Well, I can say that ngtcp2 is not coded very defensively. I finally got enough of a framework to call into it, and it causes a segfault.
No error on what possible pointer I messed up, not even an error that I messed up a pointer.
-
Well, I can say that ngtcp2 is not coded very defensively. I finally got enough of a framework to call into it, and it causes a segfault.
No error on what possible pointer I messed up, not even an error that I messed up a pointer.
-
And in attempting to add libssl to be wrapped, I have now hit that ABI issue.
Simply loading libssl via CDLL causes other tests to break, because the new libssl overrides the symbols causing an ABI compatibility problem.
I hadn't hit that problem yet, because I never got far enough to calling an ngtcp2 function that tried to access the SSL ABI.
Now I have to decide how to handle this.
-
@nlnetlabs @fedora First discovery is that we do not have even #ngtcp2 library in Fedora yet. That man openssl-quic can already provide client connection API, but server API is not yet available via #OpenSSL releases. There is openssl+quic fork, which is unlikely to ever be in Fedora. We could end with unbound linked to openssl, but libngtcp2 linked to gnutls. Definitely not as straight forward as I have expected.