mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
Support using proxy dial-up connection to GitHub. (#46)
This commit is contained in:
parent
09163ed4df
commit
4c5d288f03
8 changed files with 86 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