enable client to connect non-local [ip:port]

This commit is contained in:
Hurricanezwf
2016-02-29 12:38:45 +08:00
parent c7b0687b2c
commit f02ed95ef1
3 changed files with 8 additions and 1 deletions

View File

@@ -66,6 +66,11 @@ func LoadConf(confFile string) (err error) {
return fmt.Errorf("Parse ini file error: proxy [%s] no passwd found", proxyClient.Name)
}
proxyClient.LocalIp, ok = section["local_ip"]
if !ok {
return fmt.Errorf("Parse ini file error: proxy [%s] no local_ip found", proxyClient.Name)
}
portStr, ok := section["local_port"]
if ok {
proxyClient.LocalPort, err = strconv.ParseInt(portStr, 10, 64)