mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-05 12:57:38 +03:00
Refactor socksaddr
This commit is contained in:
parent
9378ae739c
commit
b35c53ca8f
54 changed files with 1191 additions and 666 deletions
|
@ -13,12 +13,8 @@ func LocalAddrs() ([]netip.Addr, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return common.Map(common.Filter(common.Map(interfaceAddrs, func(addr net.Addr) M.Addr {
|
||||
return common.Map(interfaceAddrs, func(addr net.Addr) netip.Addr {
|
||||
return M.AddrFromNetAddr(addr)
|
||||
}), func(addr M.Addr) bool {
|
||||
return addr != nil
|
||||
}), func(it M.Addr) netip.Addr {
|
||||
return it.Addr()
|
||||
}), nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue