From d8a8cd243af8224061782d1c7c85f63e4506ac89 Mon Sep 17 00:00:00 2001 From: Murtaza Aliakbar Date: Wed, 25 Oct 2023 17:53:04 +0530 Subject: [PATCH] ipn/proxies: incr response and tls timeouts --- intra/ipn/piph2.go | 5 ----- intra/ipn/proxies.go | 6 ++++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/intra/ipn/piph2.go b/intra/ipn/piph2.go index d0b96956..857b58f8 100644 --- a/intra/ipn/piph2.go +++ b/intra/ipn/piph2.go @@ -32,11 +32,6 @@ import ( "golang.org/x/net/http2" ) -const ( - tlsHandshakeTimeout time.Duration = 10 * time.Second - responseHeaderTimeout time.Duration = 10 * time.Second -) - type piph2 struct { id string // some unique identifier url string // h2 proxy url diff --git a/intra/ipn/proxies.go b/intra/ipn/proxies.go index c3eb7493..5cd4a908 100644 --- a/intra/ipn/proxies.go +++ b/intra/ipn/proxies.go @@ -11,6 +11,7 @@ import ( "net/http" "strings" "sync" + "time" "github.com/celzero/firestack/intra/log" "github.com/celzero/firestack/intra/protect" @@ -57,6 +58,11 @@ var ( tcptimeoutsec = (2 * 60 * 60) + (40 * 60) // 2h40m ) +const ( + tlsHandshakeTimeout time.Duration = 30 * time.Second // some proxies take a long time to handshake + responseHeaderTimeout time.Duration = 60 * time.Second +) + // type checks var _ Proxy = (*base)(nil) var _ Proxy = (*socks5)(nil)