()
| 284 | } |
| 285 | |
| 286 | func NewHttpClient() *http.Client { |
| 287 | transport := &http.Transport{ |
| 288 | Proxy: http.ProxyFromEnvironment, |
| 289 | TLSClientConfig: &tls.Config{InsecureSkipVerify: conf.Conf.TlsInsecureSkipVerify}, |
| 290 | } |
| 291 | |
| 292 | SetProxyIfConfigured(transport) |
| 293 | |
| 294 | return &http.Client{ |
| 295 | Timeout: time.Hour * 48, |
| 296 | Transport: &safeTransport{base: transport}, |
| 297 | } |
| 298 | } |
| 299 | |
| 300 | type safeTransport struct { |
| 301 | base http.RoundTripper |
no test coverage detected