mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 16:21:11 +08:00
update config
This commit is contained in:
parent
3c76050f18
commit
994705e007
6 changed files with 7 additions and 11 deletions
|
|
@ -83,7 +83,6 @@ wget -O install.sh https://raw.githubusercontent.com/WJQSERVER-STUDIO/ghproxy/ma
|
||||||
host = "0.0.0.0" # 监听地址
|
host = "0.0.0.0" # 监听地址
|
||||||
port = 8080 # 监听端口
|
port = 8080 # 监听端口
|
||||||
sizeLimit = 125 # 125MB
|
sizeLimit = 125 # 125MB
|
||||||
bufferSize = 4096 # Bytes 缓冲区大小
|
|
||||||
enableH2C = "on" # 是否开启H2C传输(latest和dev版本请开启) on/off
|
enableH2C = "on" # 是否开启H2C传输(latest和dev版本请开启) on/off
|
||||||
|
|
||||||
[pages]
|
[pages]
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ type ServerConfig struct {
|
||||||
Host string `toml:"host"`
|
Host string `toml:"host"`
|
||||||
SizeLimit int `toml:"sizeLimit"`
|
SizeLimit int `toml:"sizeLimit"`
|
||||||
EnableH2C string `toml:"enableH2C"`
|
EnableH2C string `toml:"enableH2C"`
|
||||||
BufferSize int `toml:"bufferSize"`
|
|
||||||
Debug bool `toml:"debug"`
|
Debug bool `toml:"debug"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ host = "0.0.0.0"
|
||||||
port = 8080
|
port = 8080
|
||||||
sizeLimit = 125 # MB
|
sizeLimit = 125 # MB
|
||||||
enableH2C = "on" # "on" or "off"
|
enableH2C = "on" # "on" or "off"
|
||||||
bufferSize = 4096 # Bytes
|
|
||||||
debug = false
|
debug = false
|
||||||
|
|
||||||
[pages]
|
[pages]
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
host = "127.0.0.1"
|
host = "127.0.0.1"
|
||||||
port = 8080
|
port = 8080
|
||||||
sizeLimit = 125 # MB
|
sizeLimit = 125 # MB
|
||||||
bufferSize = 4096 # Bytes
|
|
||||||
enableH2C = false
|
enableH2C = false
|
||||||
debug = false
|
debug = false
|
||||||
|
|
||||||
|
|
|
||||||
2
main.go
2
main.go
|
|
@ -92,7 +92,7 @@ func setupRateLimit(cfg *config.Config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func InitReq() {
|
func InitReq() {
|
||||||
proxy.InitReq(cfg.Server.BufferSize)
|
proxy.InitReq()
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ var (
|
||||||
BufferPool *sync.Pool
|
BufferPool *sync.Pool
|
||||||
)
|
)
|
||||||
|
|
||||||
func InitReq(cfgBufferSize int) {
|
func InitReq() {
|
||||||
initChunkedHTTPClient()
|
initChunkedHTTPClient()
|
||||||
initGitHTTPClient()
|
initGitHTTPClient()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue