mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-16 16:12:22 +08:00
Fix SOCKS outbound
This commit is contained in:
parent
efe33cf48d
commit
be61ca64d4
|
@ -113,9 +113,17 @@ func (h *Socks) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.
|
|||
}
|
||||
|
||||
func (h *Socks) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext) error {
|
||||
if h.resolve {
|
||||
return NewDirectConnection(ctx, h.router, h, conn, metadata)
|
||||
} else {
|
||||
return NewConnection(ctx, h, conn, metadata)
|
||||
}
|
||||
}
|
||||
|
||||
func (h *Socks) NewPacketConnection(ctx context.Context, conn N.PacketConn, metadata adapter.InboundContext) error {
|
||||
if h.resolve {
|
||||
return NewDirectPacketConnection(ctx, h.router, h, conn, metadata)
|
||||
} else {
|
||||
return NewPacketConnection(ctx, h, conn, metadata)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user