Support using proxy dial-up connection to GitHub. (#46)

This commit is contained in:
三千 2025-02-10 00:45:37 +08:00 committed by GitHub
parent 09163ed4df
commit 4c5d288f03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 86 additions and 9 deletions

View file

@ -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,
}