Cleanup - audit

This commit is contained in:
jdl
2026-06-13 19:55:16 +02:00
parent 2e19f0945f
commit b6052ee7b8
5 changed files with 34 additions and 43 deletions

View File

@@ -95,14 +95,6 @@ func (a *App) switchActiveRelay() {
a.relay = best
}
func preferredEndpoint(v4, v6 netip.AddrPort) netip.AddrPort {
// We always prefer v4 since all peers can connect to IPv4 addresses.
if v4.IsValid() {
return v4
}
return v6
}
func roleFor(selfIsPublic bool, selfIP netip.Addr, peerIsPublic bool, peerVPNIP netip.Addr) control.Role {
if !selfIsPublic && peerIsPublic {
return control.Client