This commit is contained in:
cnlh 2020-01-15 21:55:20 +08:00
parent 151a3f7b98
commit cb6cf89489

View File

@ -55,9 +55,10 @@ func (s *UdpModeServer) process(addr *net.UDPAddr, data []byte) {
}
defer s.task.Client.AddConn()
link := conn.NewLink(common.CONN_UDP, s.task.Target.TargetStr, s.task.Client.Cnf.Crypt, s.task.Client.Cnf.Compress, addr.String(), s.task.Target.LocalProxy)
if target, err := s.bridge.SendLinkInfo(s.task.Client.Id, link, s.task); err != nil {
if clientConn, err := s.bridge.SendLinkInfo(s.task.Client.Id, link, s.task); err != nil {
return
} else {
target := conn.GetConn(clientConn, s.task.Client.Cnf.Crypt, s.task.Client.Cnf.Compress, nil, true)
s.task.Flow.Add(int64(len(data)), 0)
buf := common.BufPoolUdp.Get().([]byte)
defer common.BufPoolUdp.Put(buf)