From b60241655f0e6bc557806df672fd9728d5687011 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Thu, 1 Jun 2023 22:35:46 +0200 Subject: WIP call onEndpointChange --- tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'tunnel/src/main/java/com/wireguard/android') diff --git a/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java b/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java index f53a1fc9..6bd42936 100644 --- a/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java +++ b/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java @@ -879,6 +879,13 @@ public final class GoBackend implements Backend { TunnelHandle tunnel = TunnelHandle.newBuilder().setHandle(currentTunnelHandle).build(); IpcSetRequest request = IpcSetRequest.newBuilder().setTunnel(tunnel).setConfig(goConfig).build(); IpcSetResponse resp = stub.ipcSet(request); + + for (final Peer peer : currentConfig.getPeers()) { + final InetEndpoint ep = peer.getEndpoint().orElse(null); + if (ep == null) + continue; + currentTunnel.onEndpointChange(peer.getPublicKey(), ep); + } } } } -- cgit v1.2.3