public key bug and multiuser enhancement and server ip support and config file of client optimization

This commit is contained in:
刘河
2019-03-26 23:34:55 +08:00
parent 00a4a33c5f
commit 42a73fa392
22 changed files with 155 additions and 70 deletions

View File

@@ -251,7 +251,7 @@ func (s *Sock5ModeServer) Auth(c net.Conn) error {
//start
func (s *Sock5ModeServer) Start() error {
return conn.NewTcpListenerAndProcess(":"+strconv.Itoa(s.task.Port), func(c net.Conn) {
return conn.NewTcpListenerAndProcess(s.task.ServerIp+":"+strconv.Itoa(s.task.Port), func(c net.Conn) {
if err := s.CheckFlowAndConnNum(s.task.Client); err != nil {
logs.Warn("client id %d, task id %d, error %s, when socks5 connection", s.task.Client.Id, s.task.Id, err.Error())
c.Close()