From 487733e80a14511c0676126422016bafd74a02c9 Mon Sep 17 00:00:00 2001 From: uoosef Date: Sun, 10 Sep 2023 10:17:28 +0330 Subject: [PATCH] bypass tls error in smart dns --- dialer/http.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dialer/http.go b/dialer/http.go index 5088eae..ee88786 100644 --- a/dialer/http.go +++ b/dialer/http.go @@ -4,6 +4,7 @@ package dialer import ( "context" + "crypto/tls" "net" "net/http" "net/url" @@ -12,6 +13,7 @@ import ( // MakeHTTPClient creates an HTTP client with custom dialing behavior. func (d *Dialer) MakeHTTPClient(enableProxy bool) *http.Client { transport := &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, ForceAttemptHTTP2: false, DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) { return d.TCPDial(network, addr)