mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11: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" # 监听地址
|
||||
port = 8080 # 监听端口
|
||||
sizeLimit = 125 # 125MB
|
||||
bufferSize = 4096 # Bytes 缓冲区大小
|
||||
enableH2C = "on" # 是否开启H2C传输(latest和dev版本请开启) on/off
|
||||
|
||||
[pages]
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
host = "127.0.0.1"
|
||||
port = 8080
|
||||
sizeLimit = 125 # MB
|
||||
bufferSize = 4096 # Bytes
|
||||
enableH2C = false
|
||||
debug = false
|
||||
|
||||
|
|
|
|||
2
main.go
2
main.go
|
|
@ -92,7 +92,7 @@ func setupRateLimit(cfg *config.Config) {
|
|||
}
|
||||
|
||||
func InitReq() {
|
||||
proxy.InitReq(cfg.Server.BufferSize)
|
||||
proxy.InitReq()
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ var (
|
|||
BufferPool *sync.Pool
|
||||
)
|
||||
|
||||
func InitReq(cfgBufferSize int) {
|
||||
func InitReq() {
|
||||
initChunkedHTTPClient()
|
||||
initGitHTTPClient()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue