mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-01 13:17:21 +02:00
Fixed dpcore TLSClientConfig is nil bug
This commit is contained in:
parent
75c351e7e2
commit
fd41a1cb91
@ -2,6 +2,7 @@ package dpcore
|
||||
|
||||
import (
|
||||
"context"
|
||||
"crypto/tls"
|
||||
"errors"
|
||||
"io"
|
||||
"log"
|
||||
@ -130,6 +131,9 @@ func NewDynamicProxyCore(target *url.URL, prepender string, dpcOptions *DpcoreOp
|
||||
|
||||
if dpcOptions.IgnoreTLSVerification {
|
||||
//Ignore TLS certificate validation error
|
||||
if thisTransporter.(*http.Transport).TLSClientConfig == nil {
|
||||
thisTransporter.(*http.Transport).TLSClientConfig = &tls.Config{}
|
||||
}
|
||||
thisTransporter.(*http.Transport).TLSClientConfig.InsecureSkipVerify = true
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user