Support using proxy dial-up connection to GitHub.

This commit is contained in:
三千 2025-02-09 21:41:55 +08:00
parent f5c32915b9
commit c7aea91c43
8 changed files with 80 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,
}