mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-04 00:31:10 +08:00
Support using proxy dial-up connection to GitHub.
This commit is contained in:
parent
f5c32915b9
commit
c7aea91c43
8 changed files with 80 additions and 9 deletions
|
|
@ -17,12 +17,13 @@ var (
|
|||
gtr *http.Transport
|
||||
)
|
||||
|
||||
func initGitHTTPClient() {
|
||||
func initGitHTTPClient(cfg *config.Config) {
|
||||
gtr = &http.Transport{
|
||||
MaxIdleConns: 30,
|
||||
MaxConnsPerHost: 30,
|
||||
IdleConnTimeout: 30 * time.Second,
|
||||
}
|
||||
initTransport(cfg, gtr)
|
||||
gclient = &http.Client{
|
||||
Transport: gtr,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue