mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 16:21:11 +08:00
Add support for reusing the Go net/http Client.
This commit is contained in:
parent
c90140a898
commit
a84e10bb84
2 changed files with 25 additions and 5 deletions
6
main.go
6
main.go
|
|
@ -91,8 +91,8 @@ func setupRateLimit(cfg *config.Config) {
|
|||
}
|
||||
}
|
||||
|
||||
func initBufferSize() {
|
||||
proxy.InitChunkedBufferSize(cfg.Server.BufferSize)
|
||||
func InitChunkedReq() {
|
||||
proxy.InitChunkedReq(cfg.Server.BufferSize)
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
|
@ -100,7 +100,7 @@ func init() {
|
|||
flag.Parse()
|
||||
loadConfig()
|
||||
setupLogger(cfg)
|
||||
initBufferSize()
|
||||
InitChunkedReq()
|
||||
loadlist(cfg)
|
||||
setupRateLimit(cfg)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue