mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
ws: fixed a bug when ws used as a middle layer protocol(tls,ws,vmess)
This commit is contained in:
1 parent
a26e437b5d
commit
2fcef7b00c
3 files changed
+17
-4
No files matched your search
@@ -32,6 +32,11 @@ func NewWS(s string, dialer proxy.Dialer) (*WS, error) {
|
||||
|
||||
addr := u.Host
|
||||
|
||||
// TODO:
|
||||
if addr == "" {
|
||||
addr = dialer.Addr()
|
||||
}
|
||||
|
||||
colonPos := strings.LastIndex(addr, ":")
|
||||
if colonPos == -1 {
|
||||
colonPos = len(addr)
|
||||
|
||||
Reference in new issue
Block a user