From 27de61a59dbd9ac107a97c23ea238f852c5482cd Mon Sep 17 00:00:00 2001 From: nadoo <287492+nadoo@users.noreply.github.com> Date: Wed, 19 Jan 2022 23:32:44 +0800 Subject: [PATCH] unix: use net.Dial to avoid interface binding Influence --- proxy/unix/client.go | 2 +- proxy/unix/server.go | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/proxy/unix/client.go b/proxy/unix/client.go index 7743dba..2ab2a19 100644 --- a/proxy/unix/client.go +++ b/proxy/unix/client.go @@ -27,7 +27,7 @@ func (s *Unix) Addr() string { // Dial connects to the address addr on the network net via the proxy. // NOTE: must be the first dialer in a chain func (s *Unix) Dial(network, addr string) (net.Conn, error) { - return s.dialer.Dial("unix", s.addr) + return net.Dial("unix", s.addr) } // DialUDP connects to the given address via the proxy. diff --git a/proxy/unix/server.go b/proxy/unix/server.go index f2330bb..32fcb8c 100644 --- a/proxy/unix/server.go +++ b/proxy/unix/server.go @@ -123,8 +123,6 @@ func (s *Unix) ServePacket(pc net.PacketConn) { continue } - log.F("!!! unix ServePacker read from: %s", srcAddr) - var session *Session sessionKey := srcAddr.String()