no message

This commit is contained in:
arraykeys
2018-07-05 20:18:12 +08:00
parent 12dd591c58
commit 6b4ee97f05
2 changed files with 12 additions and 2 deletions

View File

@ -689,7 +689,14 @@ server连接到bridge的时候,如果同时有多个client连接到同一个brid
`./proxy help client`
### **5.SOCKS5代理**
提示:SOCKS5代理,支持CONNECT,UDP协议,不支持BIND,支持用户名密码认证.
提示:
SOCKS5代理,支持CONNECT,UDP协议,不支持BIND,支持用户名密码认证.
***如果你的VPS是阿里云腾讯云这种VPS就是ifconfig看不见你的公网IP只能看见内网IP***
***那么需要加上`-g VPS公网IP`参数SOCKS5代理的UDP功能才能正常工作。***
#### **5.1.普通SOCKS5代理**
`./proxy socks -t tcp -p "0.0.0.0:38080"`

View File

@ -405,7 +405,10 @@ func (s *Socks) proxyUDP(inConn *net.Conn, methodReq socks.MethodsRequest, reque
}
host, _, _ := net.SplitHostPort((*inConn).LocalAddr().String())
_, port, _ := net.SplitHostPort(udpListener.LocalAddr().String())
s.log.Printf("proxy udp on %s , for %s", udpListener.LocalAddr(), inconnRemoteAddr)
if len(*s.cfg.LocalIPS) > 0 {
host = (*s.cfg.LocalIPS)[0]
}
s.log.Printf("proxy udp on %s , for %s", net.JoinHostPort(host, port), inconnRemoteAddr)
request.UDPReply(socks.REP_SUCCESS, net.JoinHostPort(host, port))
s.userConns.Set(inconnRemoteAddr, inConn)
var (