mirror of
https://github.com/fosrl/newt.git
synced 2026-02-07 21:46:39 +00:00
Set to 127
This commit is contained in:
6
wg/wg.go
6
wg/wg.go
@@ -655,8 +655,10 @@ func (s *WireGuardService) handleUpdatePeer(msg websocket.WSMessage) {
|
|||||||
peerConfig.Endpoint = endpoint
|
peerConfig.Endpoint = endpoint
|
||||||
logger.Info("Updating Endpoint for peer %s to %s", request.PublicKey, request.Endpoint)
|
logger.Info("Updating Endpoint for peer %s to %s", request.PublicKey, request.Endpoint)
|
||||||
} else {
|
} else {
|
||||||
// Request contained endpoint field but it was empty/null - remove endpoint
|
// specify any address to listen for any incoming packets
|
||||||
peerConfig.Endpoint = nil
|
peerConfig.Endpoint = &net.UDPAddr{
|
||||||
|
IP: net.IPv4(127, 0, 0, 1),
|
||||||
|
}
|
||||||
logger.Info("Removing Endpoint for peer %s", request.PublicKey)
|
logger.Info("Removing Endpoint for peer %s", request.PublicKey)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user