func (c *HTTPClient) ForceSkipVerify() error {
	return c.Transport.ForceSkipVerify()
}
ForceSkipVerify forces to skip certificate verification
package netx
import (
	"net/http"
	"net/url"
	"time"
	"github.com/ooni/probe-engine/legacy/netx/handlers"
	"github.com/ooni/probe-engine/legacy/netx/modelx"
	"github.com/ooni/probe-engine/legacy/netx/oldhttptransport"
	"github.com/ooni/probe-engine/netx/errorx"
	"golang.org/x/net/http2"
)
type HTTPTransport struct {
	Beginning    time.Time
	Dialer       *Dialer
	Handler      modelx.Handler
	Transport    *http.Transport
	roundTripper http.RoundTripper
}
func newHTTPTransport(
	beginning time.Time,
	handler modelx.Handler,
	dialer *Dialer,
	disableKeepAlives bool,
	proxyFunc func(*http.Request) (*url.URL, error),
) *HTTPTransport {
	baseTransport := &http.Transport{
		ExpectContinueTimeout: 1 * time.Second,
		IdleConnTimeout:       90 * time.Second,
		MaxIdleConns:          100,
		Proxy:                 proxyFunc,
		TLSHandshakeTimeout:   10 * time.Second,
		DisableKeepAlives:     disableKeepAlives,
	}
	ooniTransport := oldhttptransport.New(baseTransport)
	http2.ConfigureTransport(baseTransport)
	dialer.TLSConfig = baseTransport.TLSClientConfig
	baseTransport.DialContext = dialer.DialContext
	baseTransport.MaxConnsPerHost = 1
	baseTransport.DisableCompression = true
	return &HTTPTransport{
		Beginning:    beginning,
		Dialer:       dialer,
		Handler:      handler,
		Transport:    baseTransport,
		roundTripper: ooniTransport,
	}
}
func (t *HTTPTransport) RoundTrip(
	req *http.Request,
) (resp *http.Response, err error) {
	ctx := maybeWithMeasurementRoot(req.Context(), t.Beginning, t.Handler)
	req = req.WithContext(ctx)
	resp, err = t.roundTripper.RoundTrip(req)
	err = errorx.SafeErrWrapperBuilder{
		Error:     err,
		Operation: errorx.HTTPRoundTripOperation,
	}.MaybeBuild()
	return resp, err
}
func (t *HTTPTransport) CloseIdleConnections() {
	type closeIdler interface {
		CloseIdleConnections()
	}
	if tr, ok := t.roundTripper.(closeIdler); ok {
		tr.CloseIdleConnections()
	}
}
func NewHTTPTransportWithProxyFunc(
	proxyFunc func(*http.Request) (*url.URL, error),
) *HTTPTransport {
	return newHTTPTransport(time.Now(), handlers.NoHandler, NewDialer(), false, proxyFunc)
}
func NewHTTPTransport() *HTTPTransport {
	return NewHTTPTransportWithProxyFunc(http.ProxyFromEnvironment)
}
func (t *HTTPTransport) ConfigureDNS(network, address string) error {
	return t.Dialer.ConfigureDNS(network, address)
}
func (t *HTTPTransport) SetResolver(r modelx.DNSResolver) {
	t.Dialer.SetResolver(r)
}
func (t *HTTPTransport) SetCABundle(path string) error {
	return t.Dialer.SetCABundle(path)
}
func (t *HTTPTransport) ForceSpecificSNI(sni string) error {
	return t.Dialer.ForceSpecificSNI(sni)
}
func (t *HTTPTransport) ForceSkipVerify() error {
	return t.Dialer.ForceSkipVerify()
}
type HTTPClient struct {
	HTTPClient *http.Client
	Transport *HTTPTransport
}
func NewHTTPClientWithProxyFunc(
	proxyFunc func(*http.Request) (*url.URL, error),
) *HTTPClient {
	transport := NewHTTPTransportWithProxyFunc(proxyFunc)
	return &HTTPClient{
		HTTPClient: &http.Client{Transport: transport},
		Transport:  transport,
	}
}
func NewHTTPClient() *HTTPClient {
	return NewHTTPClientWithProxyFunc(http.ProxyFromEnvironment)
}
func NewHTTPClientWithoutProxy() *HTTPClient {
	return NewHTTPClientWithProxyFunc(nil)
}
func (c *HTTPClient) ConfigureDNS(network, address string) error {
	return c.Transport.ConfigureDNS(network, address)
}
func (c *HTTPClient) SetResolver(r modelx.DNSResolver) {
	c.Transport.SetResolver(r)
}
func (c *HTTPClient) SetCABundle(path string) error {
	return c.Transport.SetCABundle(path)
}
func (c *HTTPClient) ForceSpecificSNI(sni string) error {
	return c.Transport.ForceSpecificSNI(sni)
}