Cleanup - WIP

This commit is contained in:
jdl
2026-06-11 18:11:21 +02:00
parent ab2837817d
commit 0902341322
12 changed files with 223 additions and 160 deletions

View File

@@ -9,6 +9,7 @@ import (
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
"vppn/m"
"vppn/peer/control"
"vppn/peer/wginterface"
)
@@ -21,18 +22,6 @@ const (
TimeoutInterval = 30 * time.Second
)
// HubPeer is a peer entry as reported by the hub poller.
type HubPeer struct {
PubKey wgtypes.Key
VPNIP netip.Addr
Name string
IsRelay bool
IsPublic bool
EndpointV4 netip.AddrPort // zero if none
EndpointV6 netip.AddrPort // zero if none
SignPubKey [32]byte
}
type PingEvent struct {
srcVPNIP netip.Addr
ping control.Ping
@@ -70,7 +59,7 @@ type App struct {
selfV6 netip.AddrPort
// Event channels fed by background goroutines
hubAddCh <-chan HubPeer
hubAddCh <-chan m.Peer
hubRemoveCh <-chan wgtypes.Key
pingCh <-chan PingEvent
multicastCh <-chan MulticastEvent