Skip to content

Commit

Permalink
ipn/proxies: incr response and tls timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
ignoramous committed Oct 25, 2023
1 parent 2fe0ee6 commit d8a8cd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 0 additions & 5 deletions intra/ipn/piph2.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions intra/ipn/proxies.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"net/http"
"strings"
"sync"
"time"

"github.com/celzero/firestack/intra/log"
"github.com/celzero/firestack/intra/protect"
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d8a8cd2

Please sign in to comment.