mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-12-23 05:59:49 +00:00
SplitHTTP: Remove unnecessary keepalives (#3565)
Remove keep alive since quic-go/http3 doesn't support stream reuse Discussion see https://t.me/projectXray/3782492 Co-authored-by: Fangliding <Fangliding.fshxy@outlook.com> Co-authored-by: xqzr <34030394+xqzr@users.noreply.github.com> Co-authored-by: ll11l1lIllIl1lll <88377095+ll11l1lIllIl1lll@users.noreply.github.com>
This commit is contained in:
parent
8deb953aec
commit
964859b4bc
@ -87,15 +87,8 @@ func getHTTPClient(ctx context.Context, dest net.Destination, streamSettings *in
|
||||
|
||||
if isH3 {
|
||||
dest.Network = net.Network_UDP
|
||||
quicConfig := &quic.Config{
|
||||
HandshakeIdleTimeout: 10 * time.Second,
|
||||
MaxIdleTimeout: 90 * time.Second,
|
||||
KeepAlivePeriod: 3 * time.Second,
|
||||
Allow0RTT: true,
|
||||
}
|
||||
roundTripper := &http3.RoundTripper{
|
||||
TLSClientConfig: gotlsConfig,
|
||||
QUICConfig: quicConfig,
|
||||
Dial: func(ctx context.Context, addr string, tlsCfg *gotls.Config, cfg *quic.Config) (quic.EarlyConnection, error) {
|
||||
conn, err := internet.DialSystem(ctx, dest, streamSettings.SocketSettings)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user