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

@@ -116,7 +116,7 @@ func (hp *HubPoller) applyPeerConfig(peer *m.Peer) {
if peer == nil || len(peer.WGPubKey) != wgtypes.KeyLen {
return
}
if len(peer.Addr4) == 0 || peer.Port4 == 0 {
if len(peer.Addr4) == 0 || peer.Port == 0 {
return
}
@@ -131,7 +131,7 @@ func (hp *HubPoller) applyPeerConfig(peer *m.Peer) {
hp.logf("Invalid public IP for peer %d", peer.PeerIP)
return
}
endpoint := netip.AddrPortFrom(ip.Unmap(), peer.Port4)
endpoint := netip.AddrPortFrom(ip.Unmap(), peer.Port)
if peer.Relay {
if err := applyBaseConfig(hp.WGClient, hp.WGDevName, pubKey, endpoint, hp.Network); err != nil {