Add a way to trigger punch backs via lighthouse (#394)

This commit is contained in:
Nathan Brown
2021-03-01 19:06:01 -06:00
committed by GitHub
parent 2a4beb41b9
commit b6234abfb3
6 changed files with 65 additions and 46 deletions

View File

@ -65,6 +65,12 @@ func (c *Control) ShutdownBlock() {
// RebindUDPServer asks the UDP listener to rebind it's listener. Mainly used on mobile clients when interfaces change
func (c *Control) RebindUDPServer() {
_ = c.f.outside.Rebind()
// Trigger a lighthouse update, useful for mobile clients that should have an update interval of 0
c.f.lightHouse.SendUpdate(c.f)
// Let the main interface know that we rebound so that underlying tunnels know to trigger punches from their remotes
c.f.rebindCount++
}
// ListHostmap returns details about the actual or pending (handshaking) hostmap