utils/vhost: update for vhost_https

This commit is contained in:
fatedier
2016-06-24 15:43:58 +08:00
parent 0a50c3bd82
commit b14441d5cd
6 changed files with 108 additions and 121 deletions

View File

@@ -225,11 +225,16 @@ func doLogin(req *msg.ControlReq, c *conn.Conn) (ret int64, info string) {
}
// check if vhost_port is set
if s.Type == "http" && server.VhostMuxer == nil {
if s.Type == "http" && server.VhostHttpMuxer == nil {
info = fmt.Sprintf("ProxyName [%s], type [http] not support when vhost_http_port is not set", req.ProxyName)
log.Warn(info)
return
}
if s.Type == "https" && server.VhostHttpsMuxer == nil {
info = fmt.Sprintf("ProxyName [%s], type [https] not support when vhost_https_port is not set", req.ProxyName)
log.Warn(info)
return
}
// set infomations from frpc
s.UseEncryption = req.UseEncryption