fix: when ssh connect to a ip, if this ip map to a domain in clash, change ip to host may redirect to a diffrent ip

This commit is contained in:
gVisor bot 2022-04-04 10:39:26 +08:00
parent d71f031de9
commit 3a6569aca2

View File

@ -83,7 +83,11 @@ type Metadata struct {
}
func (m *Metadata) RemoteAddress() string {
return net.JoinHostPort(m.String(), m.DstPort)
if m.DstIP != nil {
return net.JoinHostPort(m.DstIP.String(), m.DstPort)
} else {
return net.JoinHostPort(m.String(), m.DstPort)
}
}
func (m *Metadata) SourceAddress() string {