Skip to content

Commit

Permalink
SplitHTTP client: Raise idle timeout to 5 minutes
Browse files Browse the repository at this point in the history
Copy the settings from QUIC transport. See
XTLS#3565 (comment) --
Tested with CDN and it seems better than before (fewer reconnections)

keep-alive packets are still turned off, so the original concern should
be resolved.
  • Loading branch information
mmmray committed Aug 2, 2024
1 parent 7e24239 commit 1578f70
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions transport/internet/splithttp/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ func getHTTPClient(ctx context.Context, dest net.Destination, streamSettings *in
var uploadTransport http.RoundTripper

if isH3 {
quicConfig := &quic.Config{
KeepAlivePeriod: 0,
HandshakeIdleTimeout: time.Second * 8,
MaxIdleTimeout: time.Second * 300,
}
roundTripper := &http3.RoundTripper{
QUICConfig: quicConfig,
TLSClientConfig: gotlsConfig,
Dial: func(ctx context.Context, addr string, tlsCfg *gotls.Config, cfg *quic.Config) (quic.EarlyConnection, error) {
conn, err := internet.DialSystem(ctx, dest, streamSettings.SocketSettings)
Expand Down

0 comments on commit 1578f70

Please # to comment.