fix: inbound nil pointer
This commit is contained in:
parent
1c65a2c1b4
commit
f390b9cf2f
3 changed files with 3 additions and 3 deletions
|
@ -57,7 +57,7 @@ func (m *Mixed) Listen(tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapter)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if m.udp {
|
if m.udp {
|
||||||
m.lUDP, err = socks.NewUDP(m.Address(), udpIn, m.Additions()...)
|
m.lUDP, err = socks.NewUDP(m.RawAddress(), udpIn, m.Additions()...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ func (r *Redir) Address() string {
|
||||||
// Listen implements constant.InboundListener
|
// Listen implements constant.InboundListener
|
||||||
func (r *Redir) Listen(tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapter) error {
|
func (r *Redir) Listen(tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapter) error {
|
||||||
var err error
|
var err error
|
||||||
r.l, err = redir.New(r.Address(), tcpIn, r.Additions()...)
|
r.l, err = redir.New(r.RawAddress(), tcpIn, r.Additions()...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ func (t *TProxy) Listen(tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapter
|
||||||
}
|
}
|
||||||
if t.udp {
|
if t.udp {
|
||||||
if t.lUDP != nil {
|
if t.lUDP != nil {
|
||||||
t.lUDP, err = tproxy.NewUDP(t.Address(), udpIn, t.Additions()...)
|
t.lUDP, err = tproxy.NewUDP(t.RawAddress(), udpIn, t.Additions()...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue