ws: fixed a bug when ws used as a middle layer protocol(tls,ws,vmess)

This commit is contained in:
nadoo committed 2018-08-08 00:03:32 +08:00
1 parent a26e437b5d
commit 2fcef7b00c
3 files changed
+17 -4

No files matched your search

+3 -1
View File
@@ -91,7 +91,9 @@ func (c *Client) Exchange(reqBytes []byte, clientAddr string, preferTCP bool) ([
if answer.IP != "" {
ips = append(ips, answer.IP)
}
ttl = int(answer.TTL)
if answer.TTL != 0 {
ttl = int(answer.TTL)
}
}
}