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

@@ -12,11 +12,12 @@ import (
type ProxyClient struct {
Name string
Passwd string
LocalIp string
LocalPort int64
}
func (p *ProxyClient) GetLocalConn() (c *conn.Conn, err error) {
c, err = conn.ConnectServer("127.0.0.1", p.LocalPort)
c, err = conn.ConnectServer(p.LocalIp, p.LocalPort)
if err != nil {
log.Error("ProxyName [%s], connect to local port error, %v", p.Name, err)
}