websocket: update muxer for websocket

This commit is contained in:
fatedier
2018-08-10 11:43:08 +08:00
parent 64136a3b3e
commit 7793f55545
4 changed files with 143 additions and 155 deletions

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 != "websocket" {
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
}