mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2024-11-14 21:31:16 +08:00
fix: tracker remote addr check
This commit is contained in:
parent
30f93debc4
commit
573216befb
@ -112,7 +112,7 @@ func (tt *tcpTracker) Upstream() any {
|
||||
|
||||
func NewTCPTracker(conn C.Conn, manager *Manager, metadata *C.Metadata, rule C.Rule, uploadTotal int64, downloadTotal int64, pushToManager bool) *tcpTracker {
|
||||
if conn != nil {
|
||||
if tcpAddr, ok := conn.RemoteAddr().(*net.TCPAddr); ok {
|
||||
if tcpAddr, ok := conn.RemoteAddr().(*net.TCPAddr); ok && tcpAddr.IP != nil {
|
||||
metadata.RemoteDst = tcpAddr.IP.String()
|
||||
} else {
|
||||
metadata.RemoteDst = conn.RemoteDestination()
|
||||
|
Loading…
Reference in New Issue
Block a user