Cleanup - WIP

This commit is contained in:
jdl
2026-06-07 19:42:04 +02:00
parent b8344a20b9
commit e9dffee2de
11 changed files with 310 additions and 42 deletions

View File

@@ -130,12 +130,12 @@ func hubPeerFrom(pubKey wgtypes.Key, vpnIP netip.Addr, p *m.Peer) HubPeer {
var ep4, ep6 netip.AddrPort
if len(p.Addr4) > 0 {
if addr, ok := netip.AddrFromSlice(p.Addr4); ok {
ep4 = netip.AddrPortFrom(addr.Unmap(), p.Port4)
ep4 = netip.AddrPortFrom(addr.Unmap(), p.Port)
}
}
if len(p.Addr6) > 0 {
if addr, ok := netip.AddrFromSlice(p.Addr6); ok {
ep6 = netip.AddrPortFrom(addr, p.Port6)
ep6 = netip.AddrPortFrom(addr, p.Port)
}
}
return HubPeer{