From 2b9d0520b0701ad1c5ff95b439e4e515a75afac8 Mon Sep 17 00:00:00 2001 From: Aykhan Shahsuvarov Date: Sun, 25 May 2025 19:16:30 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Update=20client=20configs=20to?= =?UTF-8?q?=20skip=20connection=20verification=20if=20it=20is=20not=20secu?= =?UTF-8?q?re?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/config.go | 2 +- requests/client.go | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/config/config.go b/config/config.go index 8fdb6f6..0e21772 100644 --- a/config/config.go +++ b/config/config.go @@ -15,7 +15,7 @@ import ( ) const ( - VERSION string = "0.6.3" + VERSION string = "0.6.4" DefaultUserAgent string = "Dodo/" + VERSION DefaultMethod string = "GET" DefaultTimeout time.Duration = time.Second * 10 diff --git a/requests/client.go b/requests/client.go index 621490d..cffae25 100644 --- a/requests/client.go +++ b/requests/client.go @@ -2,6 +2,7 @@ package requests import ( "context" + "crypto/tls" "errors" "math/rand" "net/url" @@ -39,8 +40,11 @@ func getClients( } clients = append(clients, &fasthttp.HostClient{ - MaxConns: int(maxConns), - IsTLS: isTLS, + MaxConns: int(maxConns), + IsTLS: isTLS, + TLSConfig: &tls.Config{ + InsecureSkipVerify: true, + }, Addr: addr, Dial: dialFunc, MaxIdleConnDuration: timeout, @@ -56,6 +60,9 @@ func getClients( client := &fasthttp.HostClient{ MaxConns: int(maxConns), IsTLS: isTLS, + TLSConfig: &tls.Config{ + InsecureSkipVerify: true, + }, Addr: URL.Host, MaxIdleConnDuration: timeout, MaxConnDuration: timeout,