This commit is contained in:
wjqserver 2025-05-19 12:00:36 +08:00
parent 816b35654a
commit d92424cb94
8 changed files with 70 additions and 19 deletions

View file

@ -34,14 +34,15 @@ debug = false
*/
type ServerConfig struct {
Port int `toml:"port"`
Host string `toml:"host"`
NetLib string `toml:"netlib"`
SizeLimit int `toml:"sizeLimit"`
MemLimit int64 `toml:"memLimit"`
H2C bool `toml:"H2C"`
Cors string `toml:"cors"`
Debug bool `toml:"debug"`
Port int `toml:"port"`
Host string `toml:"host"`
NetLib string `toml:"netlib"`
SenseClientDisconnection bool `toml:"senseClientDisconnection"`
SizeLimit int `toml:"sizeLimit"`
MemLimit int64 `toml:"memLimit"`
H2C bool `toml:"H2C"`
Cors string `toml:"cors"`
Debug bool `toml:"debug"`
}
/*
@ -98,6 +99,7 @@ type LogConfig struct {
LogFilePath string `toml:"logFilePath"`
MaxLogSize int `toml:"maxLogSize"`
Level string `toml:"level"`
Async bool `toml:"async"`
HertZLogPath string `toml:"hertzLogPath"`
}

View file

@ -2,6 +2,7 @@
host = "0.0.0.0"
port = 8080
netlib = "netpoll" # "netpoll" / "std" "standard" "net/http" "net"
senseClientDisconnection = false
sizeLimit = 125 # MB
memLimit = 0 # MB
H2C = true
@ -33,6 +34,7 @@ staticDir = "/data/www"
logFilePath = "/data/ghproxy/log/ghproxy.log"
maxLogSize = 5 # MB
level = "info" # dump, debug, info, warn, error, none
async = false
hertzLogPath = "/data/ghproxy/log/hertz.log"
[auth]