mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2024-12-30 02:37:01 +00:00
Refactor: return metadata.Addr only
This commit is contained in:
@@ -25,9 +25,6 @@ func (m *Metadata) SourceAddress() string {
|
||||
}
|
||||
|
||||
func (m *Metadata) Addr() net.Addr {
|
||||
if udpAddr := m.UDPAddr(); udpAddr != nil {
|
||||
return udpAddr
|
||||
}
|
||||
return &Addr{metadata: m}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user