mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
25w27a
This commit is contained in:
parent
dcc50401c4
commit
8a50b311fc
7 changed files with 63 additions and 14 deletions
|
|
@ -32,6 +32,7 @@ type ServerConfig struct {
|
|||
Port int `toml:"port"`
|
||||
Host string `toml:"host"`
|
||||
SizeLimit int `toml:"sizeLimit"`
|
||||
MemLimit int64 `toml:"memLimit"`
|
||||
H2C bool `toml:"H2C"`
|
||||
Cors string `toml:"cors"`
|
||||
Debug bool `toml:"debug"`
|
||||
|
|
@ -86,9 +87,10 @@ type PagesConfig struct {
|
|||
}
|
||||
|
||||
type LogConfig struct {
|
||||
LogFilePath string `toml:"logFilePath"`
|
||||
MaxLogSize int `toml:"maxLogSize"`
|
||||
Level string `toml:"level"`
|
||||
LogFilePath string `toml:"logFilePath"`
|
||||
MaxLogSize int `toml:"maxLogSize"`
|
||||
Level string `toml:"level"`
|
||||
HertZLogPath string `toml:"hertzLogPath"`
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -179,6 +181,7 @@ func DefaultConfig() *Config {
|
|||
Port: 8080,
|
||||
Host: "0.0.0.0",
|
||||
SizeLimit: 125,
|
||||
MemLimit: 0,
|
||||
H2C: true,
|
||||
Cors: "*",
|
||||
Debug: false,
|
||||
|
|
@ -204,9 +207,10 @@ func DefaultConfig() *Config {
|
|||
StaticDir: "/data/www",
|
||||
},
|
||||
Log: LogConfig{
|
||||
LogFilePath: "/data/ghproxy/log/ghproxy.log",
|
||||
MaxLogSize: 10,
|
||||
Level: "info",
|
||||
LogFilePath: "/data/ghproxy/log/ghproxy.log",
|
||||
MaxLogSize: 10,
|
||||
Level: "info",
|
||||
HertZLogPath: "/data/ghproxy/log/hertz.log",
|
||||
},
|
||||
Auth: AuthConfig{
|
||||
Enabled: false,
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
host = "0.0.0.0"
|
||||
port = 8080
|
||||
sizeLimit = 125 # MB
|
||||
memLimit = 0 # MB
|
||||
H2C = true
|
||||
cors = "*" # "*"/"" -> "*" ; "nil" -> "" ;
|
||||
debug = false
|
||||
|
|
@ -30,6 +31,7 @@ staticDir = "/data/www"
|
|||
logFilePath = "/data/ghproxy/log/ghproxy.log"
|
||||
maxLogSize = 5 # MB
|
||||
level = "info" # dump, debug, info, warn, error, none
|
||||
hertzLogPath = "/data/ghproxy/log/hertz.log"
|
||||
|
||||
[auth]
|
||||
method = "parameters" # "header" or "parameters"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue