This commit is contained in:
jdl
2026-06-08 17:29:45 +02:00
parent 96e7916721
commit a2e43ba49f
6 changed files with 20 additions and 23 deletions

View File

@@ -39,10 +39,12 @@ func (a *App) devPeers() []wgtypes.Peer {
func (a *App) devAddPeer(p *Peer) {
devRetry(p.VPNIP, "AddPeer", func() error { return a.dev.AddPeer(p.PubKey()) })
p.State = StateRelayed
}
func (a *App) devAddDirect(p *Peer, endpoint netip.AddrPort) {
devRetry(p.VPNIP, "AddDirect", func() error { return a.dev.AddDirect(p.PubKey(), endpoint, p.VPNIP) })
p.State = StateDirect
}
func (a *App) devSetRelay(p *Peer, endpoint netip.AddrPort) {
@@ -51,10 +53,12 @@ func (a *App) devSetRelay(p *Peer, endpoint netip.AddrPort) {
func (a *App) devPromote(p *Peer) {
devRetry(p.VPNIP, "Promote", func() error { return a.dev.Promote(p.PubKey(), p.VPNIP) })
p.State = StateDirect
}
func (a *App) devAddProbe(p *Peer, endpoint netip.AddrPort) {
devRetry(p.VPNIP, "AddProbe", func() error { return a.dev.AddProbe(p.PubKey(), endpoint) })
p.State = StateProbing
}
func (a *App) devRemove(p *Peer) {