websocket protocol

This commit is contained in:
FishFish
2018-08-03 19:41:54 +08:00
parent 629f2856b1
commit b8037475ed
5 changed files with 177 additions and 15 deletions

View File

@@ -132,6 +132,8 @@ func ConnectServerByProxy(proxyUrl string, protocol string, addr string) (c Conn
case "kcp":
// http proxy is not supported for kcp
return ConnectServer(protocol, addr)
case "websocket":
return ConnectWebsocketServer(addr)
default:
return nil, fmt.Errorf("unsupport protocol: %s", protocol)
}