commands for xtcp, stcp add 'bind_port', fix #767

This commit is contained in:
fatedier
2018-05-16 23:45:44 +08:00
parent c7a457a045
commit 3e349455a0
5 changed files with 23 additions and 3 deletions

View File

@@ -675,6 +675,10 @@ func (cfg *StcpProxyConf) CheckForCli() (err error) {
err = fmt.Errorf("bind_addr shouldn't be empty")
return
}
if cfg.BindPort == 0 {
err = fmt.Errorf("bind_port should be set")
return
}
}
return
}
@@ -777,6 +781,10 @@ func (cfg *XtcpProxyConf) CheckForCli() (err error) {
err = fmt.Errorf("bind_addr shouldn't be empty")
return
}
if cfg.BindPort == 0 {
err = fmt.Errorf("bind_port should be set")
return
}
}
return
}