Set to 127

This commit is contained in:
Owen
2025-05-13 11:41:55 -04:00
parent 175718a48e
commit 494e30704b

View File

@@ -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)
} }
} }