HTTP3 Usage Guide
Recently switched my blog server from Nginx to Caddy, and since Caddy supports HTTP3, I decided to try upgrading to HTTP3.
Note: On June 6, 2022, Robin Mark, a member of the IETF QUIC and HTTP working groups, announced on Twitter that after 5 years, HTTP/3 has finally been standardized as RFC 9114, making it the third major version of the HTTP hypertext transfer protocol.
Configuration
Caddy
{
servers {
protocols h1 h2 h2c h3
}
}
Execute the command to check port status: netstat -tulpn | grep caddy
UDP ports do not require listening
Port Opening
Ensure the firewall allows port 443/UDP
Client/Browser/Chrome
In addition to server-side support, the client also needs to ensure it’s enabled. For Chrome, newer versions like v122.0.6261.69
have QUIC support enabled by default.
To confirm the enabled status, check: chrome://flags/#enable-quic
Testing if a Site Supports HTTP3
Execute the command:
docker run --rm ymuski/curl-http3 curl -IL --http3 https://1991421.cn
Related Documentation
https://kb.nssurge.com/surge-knowledge-base/v/zh/technotes/http-protocol-version
https://gist.github.com/xmlking/cff9510dac9281d29390392cbbb033a8
Final Thoughts
HTTP3 represents a significant advancement in web protocols, offering improved performance and reliability over previous HTTP versions. The transition from TCP to QUIC as the underlying transport protocol brings benefits like reduced connection establishment time, improved multiplexing, and better performance on lossy networks. While adoption is still growing, enabling HTTP3 on your server can provide a better experience for users with compatible browsers and clients.