refactor: improved reverse proxy performance, reduce memory allocation calls

This commit is contained in:
yusing
2025-03-28 06:43:36 +08:00
parent 3424cc4e51
commit d315710310
4 changed files with 140 additions and 69 deletions

View File

@@ -4,12 +4,6 @@ import (
"time"
)
const (
ConnectionTimeout = 5 * time.Second
DialTimeout = 3 * time.Second
KeepAlive = 60 * time.Second
)
// file, folder structure
const (
@@ -30,6 +24,8 @@ const (
ComposeExampleFileName = "compose.example.yml"
ErrorPagesBasePath = "error_pages"
AgentCertsBasePath = "certs"
)
var RequiredDirectories = []string{
@@ -48,5 +44,3 @@ const (
StopTimeoutDefault = "30s"
StopMethodDefault = "stop"
)
const HeaderCheckRedirect = "X-Goproxy-Check-Redirect"