unix: use net.Dial to avoid interface binding Influence

This commit is contained in:
nadoo 2022-01-19 23:32:44 +08:00
parent 720f12aa0a
commit 27de61a59d
2 changed files with 1 additions and 3 deletions

View File

@ -27,7 +27,7 @@ func (s *Unix) Addr() string {
// Dial connects to the address addr on the network net via the proxy. // Dial connects to the address addr on the network net via the proxy.
// NOTE: must be the first dialer in a chain // NOTE: must be the first dialer in a chain
func (s *Unix) Dial(network, addr string) (net.Conn, error) { 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. // DialUDP connects to the given address via the proxy.

View File

@ -123,8 +123,6 @@ func (s *Unix) ServePacket(pc net.PacketConn) {
continue continue
} }
log.F("!!! unix ServePacker read from: %s", srcAddr)
var session *Session var session *Session
sessionKey := srcAddr.String() sessionKey := srcAddr.String()