diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-06-01 22:35:46 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2023-06-01 22:35:46 +0200 |
commit | 0aec7ebc4281f912f9506b382cbec0955db685b3 (patch) | |
tree | 3b7cfbdb274c817d3ec5ab8bd0b357793210d1f1 /tunnel | |
parent | f5a5d9ff45e689c573d2144c2c0880218baef6ac (diff) |
WIP call onEndpointChange
Diffstat (limited to 'tunnel')
-rw-r--r-- | tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java | 7 |
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); + } } } } |