Caddy2 v2.6.0 Released
Caddy released version 2.6.0 today, officially announced as the most significant release since Caddy2. For me, the most crucial change is default support for the latest HTTP/3 protocol. The previous experimental_http3 configuration option has been deprecated. HTTP/3 uses QUIC (Quick UDP Internet Connections), an experimental network transport protocol developed by Google that makes web pages faster. On the server side, simply open UDP port 443 to ensure connectivity; nothing else needs to be done. HTTP/3 clients read the Alt-Svc header from Caddy and communicate with the Caddy server over UDP. Browsers like Chrome, Firefox, and Edge already support it.
This site has quickly implemented support. After all, faster networks have more advantages than disadvantages, and people appreciate them. The configuration verification process is as follows:
1. Upgrade Caddy to the latest version
For various distributions, manually download and install it from GitHub releases, or search for the corresponding instructions. For Debian, just run:
sudo apt install caddy
After the upgrade, check the version:
➜ caddy version v2.6.0 h1:lHDynvM+sTOi9Aq4Y15b4FtkqzPB36WbUrZvVdwzTCA=
2. Restart Caddy
sudo systemctl restart caddy.service Please note that the correct Caddyfile is being read. The default is /etc/caddy/caddyfile. You can symlink your own Caddyfile to this file, otherwise the website may crash.
3. Verify HTTP3 is working properly
- Method 1
Go to the test website hosted by LiteSpeed. An example is shown below:
- Method 2
Test in your browser. Use the latest version of Chrome or Firefox. Press F12 to open the developer tools, switch to the Network tab, and directly visit the target website. For example, let's verify google.com. Right-click and select "Show Protocols," as shown below:
Then check the response header:
It turns out that not only Western journalists run fast, but also large Western websites. 😂! If you're interested, you can test several large Chinese websites.
4. If the test fails, verify that UDP port 443 is open.
- Check that the port is listening. If it is, two lines will be returned: one for TCP and one for UDP.
ss -aln | grep 443
-
After confirming that the UDP port is listening properly, simulate a request from the client and capture packets on the server.
-
Simulate a request from the client:
nc -z -v -u YOUR_SERVER_IP 443
- Capture packets on the server. Note: Replace "eth0" with the network interface name of your server:
tcpdump -i eth0 -A -s0 port 443 and udp
After the client initiates a request, observe whether the server hosting caddy can capture the corresponding packets. If so, the port is open. If not, check your network environment and contact relevant personnel to remove any firewall or other similar restrictions.
Copyright statement:
- All content that is not sourced is original., please do not reprint without authorization (because the typesetting is often disordered after reprinting, the content is uncontrollable, and cannot be continuously updated, etc.);
- For non-profit purposes, to deduce any content of this blog, please give the relevant webpage address of this site in the form of 'source of original text' or 'reference link' (for the convenience of readers).