haproxy: use tcp fastopen

This commit is contained in:
Sandro - 2023-09-03 22:34:45 +02:00
parent b0ce68bd99
commit 6474e59c30
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5
1 changed files with 5 additions and 3 deletions

View File

@ -120,7 +120,8 @@ in
timeout server 30000
frontend http-in
bind :::80 v4v6
# tfo is tcp fastopen
bind :::80 tfo v4v6
option http-keep-alive
default_backend proxy-backend-http
@ -143,7 +144,8 @@ in
}
frontend https-in
bind :::443 v4v6
# tfo is tcp fastopen
bind :::443 tfo v4v6
tcp-request inspect-delay 5s
tcp-request content accept if { req.ssl_hello_type 1 }
@ -154,7 +156,7 @@ in
) cfg.proxyHosts}
${lib.concatMapStrings ({ proxyTo, proxyProtocol, ... }: ''
backend ${canonicalize proxyTo.host}-https
server ${canonicalize proxyTo.host}-https ${proxyTo.host}:${toString proxyTo.httpsPort} check ${lib.optionalString proxyProtocol "backup"}
${lib.optionalString proxyProtocol "server ${canonicalize proxyTo.host}-proxy-https ${proxyTo.host}:${toString proxyTo.proxyHttpsPort} check send-proxy-v2"}