diff --git a/proxy/proxy.go b/proxy/proxy.go index 57649795..3d5cd1d2 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -548,7 +548,7 @@ func UnwrapRawConn(conn net.Conn) (net.Conn, stats.Counter, stats.Counter) { // 8192 > 4096, there is no need to process pc's bufReader } if uc, ok := conn.(*internet.UDSWrapperConn); ok { - conn = uc.Conn + conn = uc.UnixConn } } return conn, readCounter, writerCounter diff --git a/transport/internet/system_listener.go b/transport/internet/system_listener.go index 1086aef5..e61a1bd2 100644 --- a/transport/internet/system_listener.go +++ b/transport/internet/system_listener.go @@ -54,7 +54,7 @@ func (l *listenUDSWrapper) Accept() (net.Conn, error) { if err != nil { return nil, err } - return &UDSWrapperConn{Conn: conn}, nil + return &UDSWrapperConn{UnixConn: conn.(*net.UnixConn)}, nil } func (l *listenUDSWrapper) Close() error { @@ -66,7 +66,7 @@ func (l *listenUDSWrapper) Close() error { } type UDSWrapperConn struct { - net.Conn + *net.UnixConn } func (conn *UDSWrapperConn) RemoteAddr() net.Addr {