summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2023-06-01 22:35:46 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2023-10-24 22:00:28 +0200
commit1156db702993f3d939826d3a3563c519927d6661 (patch)
tree9378adc4a42a451d8f70cea1d96a57dd6cda20c7
parent3d4a0352b1a34195f434c744c71f2d28737564be (diff)
WIP call onEndpointChange
-rw-r--r--tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java7
1 files changed, 7 insertions, 0 deletions
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);
+ }
}
}
}