mirror of
https://github.com/luscis/openlan.git
synced 2025-10-05 16:47:11 +08:00
fix: skip verify connect to https
This commit is contained in:
@@ -163,7 +163,10 @@ func (t *HttpProxy) tunnel(w http.ResponseWriter, conn net.Conn) {
|
||||
|
||||
func (t *HttpProxy) openConn(remote string) (net.Conn, error) {
|
||||
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://") {
|
||||
remote = remote[7:]
|
||||
}
|
||||
|
Reference in New Issue
Block a user