mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 23:47:07 -05:00
Add Developer Insecure Skip Verify for testing
This commit is contained in:
parent
02e3c17c97
commit
f7ce9d3be6
@ -1,11 +1,12 @@
|
|||||||
package ws
|
package ws
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
ConnectionReuse bool
|
ConnectionReuse bool
|
||||||
Path string
|
Path string
|
||||||
Pto string
|
Pto string
|
||||||
Cert string
|
Cert string
|
||||||
PrivKey string
|
PrivKey string
|
||||||
|
DeveloperInsecureSkipVerify bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Config) Apply() {
|
func (this *Config) Apply() {
|
||||||
|
@ -25,5 +25,6 @@ func (this *Config) UnmarshalJSON(data []byte) error {
|
|||||||
this.Pto = jsonConfig.Pto
|
this.Pto = jsonConfig.Pto
|
||||||
this.PrivKey = jsonConfig.PrivKey
|
this.PrivKey = jsonConfig.PrivKey
|
||||||
this.Cert = jsonConfig.Cert
|
this.Cert = jsonConfig.Cert
|
||||||
|
this.DeveloperInsecureSkipVerify = false
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ func wsDial(src v2net.Address, dest v2net.Destination) (*wsconn, error) {
|
|||||||
return internet.DialToDest(src, dest)
|
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}
|
dialer := websocket.Dialer{NetDial: commonDial, ReadBufferSize: 65536, WriteBufferSize: 65536, TLSClientConfig: tlsconf}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user