fix: tproxy listener cannot listen udp
This commit is contained in:
parent
545cbeeec0
commit
6ca14c814e
1 changed files with 3 additions and 6 deletions
|
@ -56,13 +56,10 @@ func (t *TProxy) Listen(tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapter
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if t.udp {
|
if t.udp {
|
||||||
if t.lUDP != nil {
|
t.lUDP, err = tproxy.NewUDP(t.RawAddress(), udpIn, natTable, t.Additions()...)
|
||||||
t.lUDP, err = tproxy.NewUDP(t.RawAddress(), udpIn, natTable, t.Additions()...)
|
if err != nil {
|
||||||
if err != nil {
|
return err
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
log.Infoln("TProxy[%s] proxy listening at: %s", t.Name(), t.Address())
|
log.Infoln("TProxy[%s] proxy listening at: %s", t.Name(), t.Address())
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in a new issue