diff --git a/transport/internet/ws/config.go b/transport/internet/ws/config.go index e078d607..8ae70e2f 100644 --- a/transport/internet/ws/config.go +++ b/transport/internet/ws/config.go @@ -1,11 +1,12 @@ package ws type Config struct { - ConnectionReuse bool - Path string - Pto string - Cert string - PrivKey string + ConnectionReuse bool + Path string + Pto string + Cert string + PrivKey string + DeveloperInsecureSkipVerify bool } func (this *Config) Apply() { diff --git a/transport/internet/ws/config_json.go b/transport/internet/ws/config_json.go index eb479479..0ebc6237 100644 --- a/transport/internet/ws/config_json.go +++ b/transport/internet/ws/config_json.go @@ -25,5 +25,6 @@ func (this *Config) UnmarshalJSON(data []byte) error { this.Pto = jsonConfig.Pto this.PrivKey = jsonConfig.PrivKey this.Cert = jsonConfig.Cert + this.DeveloperInsecureSkipVerify = false return nil } diff --git a/transport/internet/ws/dialer.go b/transport/internet/ws/dialer.go index 70e5ab81..5cd3ecf8 100644 --- a/transport/internet/ws/dialer.go +++ b/transport/internet/ws/dialer.go @@ -49,7 +49,7 @@ func wsDial(src v2net.Address, dest v2net.Destination) (*wsconn, error) { return internet.DialToDest(src, dest) } - tlsconf := &tls.Config{ServerName: dest.Address().Domain()} + tlsconf := &tls.Config{ServerName: dest.Address().Domain(), InsecureSkipVerify: effectiveConfig.DeveloperInsecureSkipVerify} dialer := websocket.Dialer{NetDial: commonDial, ReadBufferSize: 65536, WriteBufferSize: 65536, TLSClientConfig: tlsconf}