update config

This commit is contained in:
WJQSERVER 2025-01-27 14:30:32 +08:00
parent 3c76050f18
commit 994705e007
6 changed files with 7 additions and 11 deletions

View file

@ -83,7 +83,6 @@ wget -O install.sh https://raw.githubusercontent.com/WJQSERVER-STUDIO/ghproxy/ma
host = "0.0.0.0" # 监听地址
port = 8080 # 监听端口
sizeLimit = 125 # 125MB
bufferSize = 4096 # Bytes 缓冲区大小
enableH2C = "on" # 是否开启H2C传输(latest和dev版本请开启) on/off
[pages]

View file

@ -16,12 +16,11 @@ type Config struct {
}
type ServerConfig struct {
Port int `toml:"port"`
Host string `toml:"host"`
SizeLimit int `toml:"sizeLimit"`
EnableH2C string `toml:"enableH2C"`
BufferSize int `toml:"bufferSize"`
Debug bool `toml:"debug"`
Port int `toml:"port"`
Host string `toml:"host"`
SizeLimit int `toml:"sizeLimit"`
EnableH2C string `toml:"enableH2C"`
Debug bool `toml:"debug"`
}
type PagesConfig struct {

View file

@ -3,7 +3,6 @@ host = "0.0.0.0"
port = 8080
sizeLimit = 125 # MB
enableH2C = "on" # "on" or "off"
bufferSize = 4096 # Bytes
debug = false
[pages]

View file

@ -2,7 +2,6 @@
host = "127.0.0.1"
port = 8080
sizeLimit = 125 # MB
bufferSize = 4096 # Bytes
enableH2C = false
debug = false

View file

@ -92,7 +92,7 @@ func setupRateLimit(cfg *config.Config) {
}
func InitReq() {
proxy.InitReq(cfg.Server.BufferSize)
proxy.InitReq()
}
func init() {

View file

@ -20,7 +20,7 @@ var (
BufferPool *sync.Pool
)
func InitReq(cfgBufferSize int) {
func InitReq() {
initChunkedHTTPClient()
initGitHTTPClient()