fix: skip verify connect to https

This commit is contained in:
Daniel Ding
2024-01-24 20:16:50 +08:00
parent 9fbf960ad2
commit cb08ea20cd

View File

@@ -163,7 +163,10 @@ func (t *HttpProxy) tunnel(w http.ResponseWriter, conn net.Conn) {
func (t *HttpProxy) openConn(remote string) (net.Conn, error) { func (t *HttpProxy) openConn(remote string) (net.Conn, error) {
if strings.HasPrefix(remote, "https://") { if strings.HasPrefix(remote, "https://") {
return tls.Dial("tcp", remote[8:], nil) conf := &tls.Config{
InsecureSkipVerify: true,
}
return tls.Dial("tcp", remote[8:], conf)
} else if strings.HasPrefix(remote, "http://") { } else if strings.HasPrefix(remote, "http://") {
remote = remote[7:] remote = remote[7:]
} }