[🚀] InsecureSkipVerify

This commit is contained in:
2024-09-06 15:37:13 +08:00
parent 3bc6282168
commit bbf89b2f08
5 changed files with 98 additions and 52 deletions

View File

@ -3,6 +3,7 @@ package http
import (
"bytes"
"context"
"crypto/tls"
"fmt"
"gitea.bvbej.com/bvbej/base-golang/pkg/downloader/base"
"gitea.bvbej.com/bvbej/base-golang/pkg/downloader/fetcher"
@ -355,6 +356,9 @@ func (f *Fetcher) buildClient() (*http.Client, error) {
DialContext: func(ctx context.Context, network, addr string) (net.Conn, error) {
return dialer.Dial(network, addr)
},
TLSClientConfig: &tls.Config{
InsecureSkipVerify: f.Ctl.ContextInsecureSkipVerify(),
},
}
if f.Ctl.ContextProxy() != nil {
transport.Proxy = f.Ctl.ContextProxy()