From 63b8e8ed23a71275f331f24d6f6524115580b095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 9 Nov 2023 15:07:06 +0800 Subject: [PATCH] platform: Increase HTTP timeout to 15s --- experimental/libbox/http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/experimental/libbox/http.go b/experimental/libbox/http.go index 8dda751d..87c5bed6 100644 --- a/experimental/libbox/http.go +++ b/experimental/libbox/http.go @@ -17,8 +17,8 @@ import ( "os" "strconv" "sync" + "time" - C "github.com/sagernet/sing-box/constant" "github.com/sagernet/sing/common" "github.com/sagernet/sing/common/bufio" E "github.com/sagernet/sing/common/exceptions" @@ -69,7 +69,7 @@ type httpClient struct { func NewHTTPClient() HTTPClient { client := new(httpClient) - client.client.Timeout = C.TCPTimeout + client.client.Timeout = 15 * time.Second client.client.Transport = &client.transport client.transport.TLSClientConfig = &client.tls client.transport.DisableKeepAlives = true