mirror of
https://github.com/luscis/openlan.git
synced 2025-10-06 00:57:03 +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) {
|
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:]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user