1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 01:57:12 -05:00
This commit is contained in:
Darien Raymond 2017-01-08 16:01:28 +01:00
parent 5b89c6aada
commit f75d94817a
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -86,7 +86,11 @@ func wsDial(src v2net.Address, dest v2net.Destination, options internet.DialerOp
}
}
uri := protocol + "://" + dest.NetAddr() + "/" + wsSettings.Path
host := dest.NetAddr()
if (protocol == "ws" && dest.Port == 80) || (protocol == "wss" && dest.Port == 443) {
host = dest.Address.String()
}
uri := protocol + "://" + host + "/" + wsSettings.Path
conn, resp, err := dialer.Dial(uri, nil)
if err != nil {