File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -151,19 +151,8 @@ func SpeedTest(c *cli.Context) error {
151151 network = "ip"
152152 }
153153
154- transport := & http.Transport {
155- Proxy : http .ProxyFromEnvironment ,
156- DialContext : (& net.Dialer {
157- Timeout : 30 * time .Second ,
158- KeepAlive : 30 * time .Second ,
159- }).DialContext ,
160- ForceAttemptHTTP2 : true ,
161- MaxIdleConns : 100 ,
162- IdleConnTimeout : 90 * time .Second ,
163- TLSHandshakeTimeout : 10 * time .Second ,
164- ExpectContinueTimeout : 1 * time .Second ,
165- TLSClientConfig : & tls.Config {InsecureSkipVerify : c .Bool (defs .OptionSkipCertVerify )},
166- }
154+ transport := http .DefaultTransport .(* http.Transport ).Clone ()
155+ transport .TLSClientConfig = & tls.Config {InsecureSkipVerify : c .Bool (defs .OptionSkipCertVerify )}
167156
168157 // bind to source IP address if given, or if ipv4/ipv6 is forced
169158 if src := c .String (defs .OptionSource ); src != "" || (forceIPv4 || forceIPv6 ) {
You can’t perform that action at this time.
0 commit comments