Add Developer Insecure Skip Verify for testing

pull/238/head
Shelikhoo 8 years ago
parent 02e3c17c97
commit f7ce9d3be6
No known key found for this signature in database
GPG Key ID: 7791BDB0709ABD21

@ -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() {

@ -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
}

@ -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}

Loading…
Cancel
Save