1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-07-03 04:25:23 +00:00

Verfiy Domain correctly

This commit is contained in:
Shelikhoo 2016-08-13 22:50:24 +08:00
parent 427bed5ddb
commit 1fe090dbfd
No known key found for this signature in database
GPG Key ID: 7791BDB0709ABD21

View File

@ -1,6 +1,7 @@
package ws
import (
"crypto/tls"
"fmt"
"net"
@ -48,7 +49,9 @@ func wsDial(src v2net.Address, dest v2net.Destination) (*wsconn, error) {
return internet.DialToDest(src, dest)
}
dialer := websocket.Dialer{NetDial: commonDial, ReadBufferSize: 65536, WriteBufferSize: 65536}
tlsconf := &tls.Config{ServerName: dest.Address().Domain()}
dialer := websocket.Dialer{NetDial: commonDial, ReadBufferSize: 65536, WriteBufferSize: 65536, TLSClientConfig: tlsconf}
effpto := func(dst v2net.Destination) string {