mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 00:01:10 +08:00
25w48b
This commit is contained in:
parent
cf5ae0d184
commit
fd7e270db4
10 changed files with 56 additions and 21 deletions
|
|
@ -26,6 +26,7 @@ type Config struct {
|
|||
host = "0.0.0.0"
|
||||
port = 8080
|
||||
netlib = "netpoll" # "netpoll" / "std" "standard" "net/http" "net"
|
||||
goPoolSize = 1024
|
||||
sizeLimit = 125 # MB
|
||||
memLimit = 0 # MB
|
||||
H2C = true
|
||||
|
|
@ -38,6 +39,7 @@ type ServerConfig struct {
|
|||
Host string `toml:"host"`
|
||||
NetLib string `toml:"netlib"`
|
||||
SenseClientDisconnection bool `toml:"senseClientDisconnection"`
|
||||
GoPoolSize int `toml:"goPoolSize"`
|
||||
SizeLimit int `toml:"sizeLimit"`
|
||||
MemLimit int64 `toml:"memLimit"`
|
||||
H2C bool `toml:"H2C"`
|
||||
|
|
@ -224,14 +226,15 @@ func FileExists(filename string) bool {
|
|||
func DefaultConfig() *Config {
|
||||
return &Config{
|
||||
Server: ServerConfig{
|
||||
Port: 8080,
|
||||
Host: "0.0.0.0",
|
||||
NetLib: "netpoll",
|
||||
SizeLimit: 125,
|
||||
MemLimit: 0,
|
||||
H2C: true,
|
||||
Cors: "*",
|
||||
Debug: false,
|
||||
Port: 8080,
|
||||
Host: "0.0.0.0",
|
||||
NetLib: "netpoll",
|
||||
GoPoolSize: 1024,
|
||||
SizeLimit: 125,
|
||||
MemLimit: 0,
|
||||
H2C: true,
|
||||
Cors: "*",
|
||||
Debug: false,
|
||||
},
|
||||
Httpc: HttpcConfig{
|
||||
Mode: "auto",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue