diff options
author | cyberta <cyberta@riseup.net> | 2019-12-30 09:05:59 -0800 |
---|---|---|
committer | cyberta <cyberta@riseup.net> | 2019-12-30 09:05:59 -0800 |
commit | 699a68fffe39d46f6c35a7facc1fd846c92102d2 (patch) | |
tree | 60096c9a7f44c159a4e1e37990cbc01a2398890a /app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | |
parent | b8ce7160704ce735422cc69cfa9fc646bfae7237 (diff) | |
parent | 56c542d37f3fcaaa69ec8d6ef7014a8cc6dbaa06 (diff) |
Merge branch 'rooted_firewall' into 'master'
firewall
Closes #8939
See merge request leap/bitmask_android!96
Diffstat (limited to 'app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java')
-rw-r--r-- | app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java index 0863cc8e..766dc925 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -47,6 +47,7 @@ import de.blinkt.openvpn.core.connection.Obfs4Connection; import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.VpnNotificationManager; import se.leap.bitmaskclient.pluggableTransports.Shapeshifter; +import se.leap.bitmaskclient.utils.FirewallHelper; import static de.blinkt.openvpn.core.ConnectionStatus.LEVEL_CONNECTED; import static de.blinkt.openvpn.core.ConnectionStatus.LEVEL_WAITING_FOR_USER_INPUT; @@ -89,6 +90,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac private Runnable mOpenVPNThread; private VpnNotificationManager notificationManager; private Shapeshifter shapeshifter; + private FirewallHelper firewallHelper; private static final int PRIORITY_MIN = -2; private static final int PRIORITY_DEFAULT = 0; @@ -192,6 +194,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac VpnStatus.removeStateListener(this); } } + firewallHelper.shutdownFirewall(); } private boolean runningOnAndroidTV() { @@ -446,6 +449,8 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac mProcessThread.start(); } + firewallHelper.startFirewall(); + new Handler(getMainLooper()).post(() -> { if (mDeviceStateReceiver != null) { unregisterDeviceStateReceiver(); @@ -513,6 +518,7 @@ public class OpenVPNService extends VpnService implements StateListener, Callbac super.onCreate(); notificationManager = new VpnNotificationManager(this, this); notificationManager.createOpenVpnNotificationChannel(); + firewallHelper = new FirewallHelper(this); } @Override |