Skip to content

Commit

Permalink
fix v2ray#356
Browse files Browse the repository at this point in the history
  • Loading branch information
DarienRaymond committed Jan 8, 2017
1 parent 5b89c6a commit f75d948
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion transport/internet/websocket/dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f75d948

Please sign in to comment.