diff options
author | Arne Schwabe <arne@rfc2549.org> | 2018-01-16 11:18:32 +0100 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2018-01-16 11:18:32 +0100 |
commit | 0995ae9c586ba5dfd376519df13d5336a9025558 (patch) | |
tree | 3948d2906953a31112bc575b84dc982ffe5e259e /main | |
parent | c627e2a2b9b8a2c4ed158c0b742b532110a52597 (diff) |
Don't ignore redirect gateway from OpenVPN3 (closes #824)
Diffstat (limited to 'main')
-rw-r--r-- | main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 3 | ||||
-rw-r--r-- | main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java index 894021a3..eb15607d 100644 --- a/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/main/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -71,6 +71,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac private static final String RESUME_VPN = "de.blinkt.openvpn.RESUME_VPN"; public static final String NOTIFICATION_CHANNEL_BG_ID = "openvpn_bg"; public static final String NOTIFICATION_CHANNEL_NEWSTATUS_ID = "openvpn_newstat"; + public static final String VPNSERVICE_TUN = "vpnservice-tun"; private String lastChannel; private static boolean mNotificationAlwaysVisible = false; @@ -987,7 +988,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac private boolean isAndroidTunDevice(String device) { return device != null && - (device.startsWith("tun") || "(null)".equals(device) || "vpnservice-tun".equals(device)); + (device.startsWith("tun") || "(null)".equals(device) || VPNSERVICE_TUN.equals(device)); } public void setMtu(int mtu) { diff --git a/main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java b/main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java index fee47664..8ff32027 100644 --- a/main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java +++ b/main/src/ovpn3/java/de/blinkt/openvpn/core/OpenVPNThreadv3.java @@ -166,7 +166,12 @@ public class OpenVPNThreadv3 extends ClientAPI_OpenVPNClient implements Runnable @Override public boolean tun_builder_reroute_gw(boolean ipv4, boolean ipv6, long flags) { - //ignore + if (ipv4) + mService.addRoute("0.0.0.0", "0.0.0.0", "127.0.0.1", OpenVPNService.VPNSERVICE_TUN); + + if (ipv6) + mService.addRoutev6("::/0", OpenVPNService.VPNSERVICE_TUN); + return true; } |