code: func newHTTPClient(config *ConnConfig) (*http.Client, error) {
  	// Set proxy function if there is a proxy configured.
  	var proxyFunc func(*http.Request) (*url.URL, error)
  	if config.Proxy != "" {
  		proxyURL, err := url.Parse(config.Proxy)
  		if err != nil {
  			return nil, err
  		}
  		proxyFunc = http.ProxyURL(proxyURL)
  	}
  
  	// Configure TLS if needed.
  	var tlsConfig *tls.Config
  	if !config.DisableTLS {
  		if len(config.Certificates) > 0 {
  			pool := x509.NewCertPool()
  			pool.AppendCertsFromPEM(config.Certificates)
  			tlsConfig = &tls.Config{
  				RootCAs: pool,
  			}
  		}
  	}
  
  	client := http.Client{
  		Transport: &http.Transport{
  			Proxy:           proxyFunc,
  			TLSClientConfig: tlsConfig,
  		},
  	}
  
  	return &client, nil
  }
docs: // newHTTPClient returns a new http client that is configured according to the
  // proxy and TLS settings in the associated connection configuration.