Skip to content

Commit

Permalink
Ignore error of socket protection (#37)
Browse files Browse the repository at this point in the history
It is a workaround to allow change server without VPN permission
  • Loading branch information
pappz authored Dec 4, 2024
1 parent 5dde0f4 commit 2648195
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion android/tool/src/main/java/io/netbird/client/tool/IFace.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ public long configureInterface(String address, long mtu, String dns, String sear

@Override
public boolean protectSocket(int fd) {
return vpnService.protect(fd);
vpnService.protect(fd);
// Ignore the error to allow the app to connect to a Management server before the VPN service
// is up and running. This is just a workaround and should be removed in the future.
return true;
}

private int createTun(String ip, int prefixLength, int mtu, String dns, String[] searchDomains, LinkedList<Route> routes) throws Exception {
Expand Down

0 comments on commit 2648195

Please sign in to comment.