This commit is contained in:
jdl
2026-06-07 20:30:31 +02:00
parent 747d73890f
commit 3877ec5f35
15 changed files with 173 additions and 80 deletions

View File

@@ -29,6 +29,7 @@ type HubPeer struct {
IsPublic bool
EndpointV4 netip.AddrPort // zero if none
EndpointV6 netip.AddrPort // zero if none
SignPubKey [32]byte
}
type PingEvent struct {
@@ -36,10 +37,10 @@ type PingEvent struct {
ping control.Ping
}
// MulticastEvent carries a raw signed beacon for verification in the event loop.
type MulticastEvent struct {
pubKey wgtypes.Key
vpnIP netip.Addr
endpoint netip.AddrPort
signed []byte // nacl/sign signed beacon (64-byte sig || 35-byte payload)
src netip.Addr // physical LAN source address
}
// App is the peer application. All mutable state lives here and is