summaryrefslogtreecommitdiffhomepage
path: root/tunnel/src/main/java/com/wireguard
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2023-05-22 00:11:26 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2023-05-22 00:11:26 +0200
commit853cfd17d08f1a9c13ad93e5ff1aae58881f9f45 (patch)
tree4a891c1dddf82266fd608237b9fae0b07dc40af4 /tunnel/src/main/java/com/wireguard
parent276128328fd8aea4ff9fb7af3f3f933d591e1261 (diff)
WIP wgSetConfig IPv4/IPv6
Diffstat (limited to 'tunnel/src/main/java/com/wireguard')
-rw-r--r--tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java12
1 files changed, 8 insertions, 4 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 24f1adc8..481ef8ae 100644
--- a/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java
+++ b/tunnel/src/main/java/com/wireguard/android/backend/GoBackend.java
@@ -149,6 +149,8 @@ public final class GoBackend implements Backend {
private static native int wgGetSocketV6(int handle);
+ private static native int wgSetConfig(int handle, String settings);
+
private static native void wgSetFd(int handle, int tunFd);
private static native void wgTurnOff(int handle);
@@ -322,8 +324,9 @@ public final class GoBackend implements Backend {
LibwgGrpc.LibwgBlockingStub stub = LibwgGrpc.newBlockingStub(channel);
TunnelHandle handle = TunnelHandle.newBuilder().setHandle(currentTunnelHandle).build();
- IpcSetRequest request = IpcSetRequest.newBuilder().setTunnel(handle).setConfig(goConfig).build();
- IpcSetResponse resp = stub.ipcSet(request);
+ // IpcSetRequest request = IpcSetRequest.newBuilder().setTunnel(handle).setConfig(goConfig).build();
+ // IpcSetResponse resp = stub.ipcSet(request);
+ wgSetConfig(handle, request);
}
private static String downloadPacFile(Network network, Uri pacFileUrl) {
@@ -875,8 +878,9 @@ public final class GoBackend implements Backend {
LibwgGrpc.LibwgBlockingStub stub = LibwgGrpc.newBlockingStub(channel);
TunnelHandle tunnel = TunnelHandle.newBuilder().setHandle(currentTunnelHandle).build();
- IpcSetRequest request = IpcSetRequest.newBuilder().setTunnel(tunnel).setConfig(goConfig).build();
- IpcSetResponse resp = stub.ipcSet(request);
+ // IpcSetRequest request = IpcSetRequest.newBuilder().setTunnel(tunnel).setConfig(goConfig).build();
+ // IpcSetResponse resp = stub.ipcSet(request);
+ wgSetConfig(handle, request);
}
}
}