mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 12:40:07 +00:00
fix: field name "VerifySSL" to "SkipVerifySSL" in Transport config (#305)
This commit is contained in:
@@ -14,23 +14,23 @@ var (
|
||||
func init() {
|
||||
HttpClientSkipTlsVerify = httpClient(_httpClient{
|
||||
Transport: httpTransport(_httpTransport{
|
||||
VerifySSL: true,
|
||||
SkipVerifySSL: true,
|
||||
}),
|
||||
})
|
||||
HttpClient = httpClient(_httpClient{
|
||||
Transport: httpTransport(_httpTransport{
|
||||
VerifySSL: false,
|
||||
SkipVerifySSL: false,
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
||||
type _httpTransport struct {
|
||||
VerifySSL bool
|
||||
SkipVerifySSL bool
|
||||
}
|
||||
|
||||
func httpTransport(conf _httpTransport) *http.Transport {
|
||||
return &http.Transport{
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: conf.VerifySSL},
|
||||
TLSClientConfig: &tls.Config{InsecureSkipVerify: conf.SkipVerifySSL},
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user