``` global log /dev/log local0 info pidfile /var/run/haproxy.pid stats socket /var/run/haproxy/api.sock mode 660 level admin stats timeout 30s ssl-load-extra-del-ext ssl-load-extra-files key
defaults log global mode http option httplog option dontlognull timeout connect 10m timeout client 10m timeout server 10m frontend mysite bind :8000 bind :443 ssl crt /home/aidai/haproxy/server.crt alpn h2 # enables HTTP/3 over QUIC bind quic4@:443 ssl crt /home/aidai/haproxy/server.crt alpn h3 # Redirects to HTTPS http-request redirect scheme https unless { ssl_fc } # Switches to the QUIC protocol http-response set-header alt-svc "h3=\":443\";ma=2592000;" default_backend webservers backend webservers balance roundrobin server web1 127.0.0.1:8080 check maxconn 30 frontend stats bind *:8404 stats enable stats uri /stats http-request use-service prometheus-exporter if { path /metrics } stats refresh 10s stats admin if LOCALHOST ``` and run haproxy with command `haproxy -f haproxy.cfg -d` Willy Tarreau <w...@1wt.eu> 于2023年2月24日周五 16:55写道: > On Fri, Feb 24, 2023 at 04:52:23PM +0800, AiDai wrote: > > I tried to test outside of Docker, but I encountered the same problem. > > ``` > > curl --http3-only https://0.0.0.0:443 -k -v > > * Trying 0.0.0.0:443... > > * ipv4 connect timeout after 300000ms, move on! > > * Failed to connect to 0.0.0.0 port 443 after 300357 ms: Timeout was > reached > > * Closing connection 0 > > curl: (28) Failed to connect to 0.0.0.0 port 443 after 300357 ms: Timeout > > was reached > > ``` > > You should really share your config, as it's very likely that something > subtle is missing somewhere. > > Willy >