mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 16:21:11 +08:00
Enhance HTTP Client parameters.
This commit is contained in:
parent
a84e10bb84
commit
d613386767
1 changed files with 6 additions and 2 deletions
|
|
@ -34,9 +34,13 @@ func initChunkedBufferSize(cfgBufferSize int) {
|
||||||
func initChunkedHTTPClient() {
|
func initChunkedHTTPClient() {
|
||||||
tr = &http.Transport{
|
tr = &http.Transport{
|
||||||
MaxIdleConns: 100,
|
MaxIdleConns: 100,
|
||||||
IdleConnTimeout: 30 * time.Second,
|
MaxConnsPerHost: 60,
|
||||||
|
IdleConnTimeout: 15 * time.Second,
|
||||||
|
}
|
||||||
|
client = &http.Client{
|
||||||
|
Transport: tr,
|
||||||
|
Timeout: 5 * time.Second,
|
||||||
}
|
}
|
||||||
client = &http.Client{Transport: tr}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func ChunkedProxyRequest(c *gin.Context, u string, cfg *config.Config, mode string, runMode string) {
|
func ChunkedProxyRequest(c *gin.Context, u string, cfg *config.Config, mode string, runMode string) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue