mirror of
https://gitclone.com/github.com/MetaCubeX/Clash.Meta
synced 2025-02-23 07:23:17 +08:00
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:
parent
13012a9f89
commit
93d2cfa091
@ -83,8 +83,12 @@ type Metadata struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *Metadata) RemoteAddress() string {
|
func (m *Metadata) RemoteAddress() string {
|
||||||
|
if m.DstIP != nil {
|
||||||
|
return net.JoinHostPort(m.DstIP.String(), m.DstPort)
|
||||||
|
} else {
|
||||||
return net.JoinHostPort(m.String(), m.DstPort)
|
return net.JoinHostPort(m.String(), m.DstPort)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (m *Metadata) SourceAddress() string {
|
func (m *Metadata) SourceAddress() string {
|
||||||
return net.JoinHostPort(m.SrcIP.String(), m.SrcPort)
|
return net.JoinHostPort(m.SrcIP.String(), m.SrcPort)
|
||||||
|
Loading…
Reference in New Issue
Block a user