fix: 调整获取远程目的的位置
This commit is contained in:
@ -148,16 +148,7 @@ func (c *conn) AppendToChains(a C.ProxyAdapter) {
|
||||
}
|
||||
|
||||
func NewConn(c net.Conn, a C.ProxyAdapter) C.Conn {
|
||||
var remoteDestination string
|
||||
if c != nil {
|
||||
if tcpAddr, ok := c.RemoteAddr().(*net.TCPAddr); ok {
|
||||
remoteDestination = tcpAddr.IP.String()
|
||||
} else {
|
||||
remoteDestination = parseRemoteDestination(a.Addr())
|
||||
}
|
||||
}
|
||||
|
||||
return &conn{c, []string{a.Name()}, remoteDestination}
|
||||
return &conn{c, []string{a.Name()}, parseRemoteDestination(a.Addr())}
|
||||
}
|
||||
|
||||
type packetConn struct {
|
||||
|
Reference in New Issue
Block a user