salvo-rs/salvo

HTTP/3 realization doesn't work

markcda opened this issue · 1 comments

Describe the bug
Cannot connect to QuinnListener from curl with an error message like this:

ERROR salvo_core::server: accept connection failed error=Custom { kind: Other, error: "the cryptographic handshake failed: error 120: peer doesn't support any known protocol" }

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repository
  2. Cd into examples/
  3. Execute cargo run --bin example-hello-h3
  4. Run in another console curl --http3-only --tlsv1.3 --cacert certs/cert.pem https://127.0.0.1:5800 and see curl: (7) error:8000006F:system library::Connection refused
  5. In example-hello-h3 console also see an error

Expected behavior
After 4th step see Hello World

Desktop (please complete the following information):

  • OS: Arch Linux (kernel 6.9.3-arch1-1)
  • curl: 8.8.0 (x86_64-pc-linux-gnu) libcurl/8.8.0 OpenSSL/3.3.1 zlib/1.3.1 brotli/1.1.0 zstd/1.5.6 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.62.1 nghttp3/1.3.0, Release-Date: 2024-05-22

Note that this error was found in 0.68; in 0.66 QuinnListener works as expected!