WIP
This commit is contained in:
@@ -47,6 +47,13 @@ func (a *App) devAddDirect(p *Peer, endpoint netip.AddrPort) {
|
||||
p.State = StateDirect
|
||||
}
|
||||
|
||||
func (a *App) devAddRelayed(p *Peer, relayVPNIP netip.Addr) {
|
||||
port := ForwarderBasePort + uint16(p.VPNIP.As4()[3])
|
||||
endpoint := netip.AddrPortFrom(relayVPNIP, port)
|
||||
devRetry(p.VPNIP, "AddRelayed", func() error { return a.dev.AddDirect(p.PubKey(), endpoint, p.VPNIP) })
|
||||
p.State = StateRelayed
|
||||
}
|
||||
|
||||
func (a *App) devSetRelay(p *Peer, endpoint netip.AddrPort) {
|
||||
devRetry(p.VPNIP, "SetRelay", func() error { return a.dev.SetRelay(p.PubKey(), endpoint, a.vpnNet) })
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user