Cleanup - WIP
This commit is contained in:
15
peer/app.go
15
peer/app.go
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user