如何設定 haproxy 使用 HTTP/3 QUIC 連接到後端伺服器?

如何設定 haproxy 使用 HTTP/3 QUIC 連接到後端伺服器?

我可以按照此處的說明將 HAProxy 配置為將自身呈現為 HTTP/3 伺服器:https://www.haproxy.com/blog/announcing-haproxy-2-6/

bind :443 ssl crt server.pem alpn h2,http/1.1
http-response set-header alt-svc "h3=\":443\";ma=900;"

但是我需要在 haproxy.cfg 中添加什麼來向 HAProxy 指示後端伺服器支援 HTTP/3 並且應該使用 QUIC 協定連接到它?我嘗試了相同的quic4@前綴,但它似乎沒有做任何事情。

server s1 [email protected]:443

答案1

您還需要此行來啟用 quic 協定;

# enables HTTP/3 over QUIC
bind quic4@:443 ssl crt /etc/haproxy/certs/foo.com/cert.pem alpn h3

相關內容