Merge pull request #886 from fatedier/websocket

Connect protocol support websocket
This commit is contained in:
fatedier authored and GitHub committed 2018-08-10 16:36:02 +08:00
commit f14ed87b29
12 files changed
+1480 -57

No files matched your search

+4 -3
View File
@@ -186,9 +186,10 @@ func UnmarshalClientConfFromIni(defaultCfg *ClientCommonConf, content string) (c
}
if tmpStr, ok = conf.Get("common", "protocol"); ok {
// Now it only support tcp and kcp.
if tmpStr != "kcp" {
tmpStr = "tcp"
// Now it only support tcp and kcp and websocket.
if tmpStr != "tcp" && tmpStr != "kcp" && tmpStr != "websocket" {
err = fmt.Errorf("Parse conf error: invalid protocol")
return
}
cfg.Protocol = tmpStr
}