[tor-commits] [orbot/master] add new functionality to allow for checking connections against app blacklist
n8fr8 at torproject.org
n8fr8 at torproject.org
Tue Apr 28 21:05:00 UTC 2020
commit a266c65d772cffb3d42a803ebb1231bdbea467aa
Author: n8fr8 <nathan at guardianproject.info>
Date: Thu Sep 5 12:01:36 2019 -0400
add new functionality to allow for checking connections against app blacklist
---
.../java/org/torproject/android/service/vpn/Tun2Socks.java | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/orbotservice/src/main/java/org/torproject/android/service/vpn/Tun2Socks.java b/orbotservice/src/main/java/org/torproject/android/service/vpn/Tun2Socks.java
index e7f0591b..a0ded90e 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/vpn/Tun2Socks.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/vpn/Tun2Socks.java
@@ -134,6 +134,16 @@ public class Tun2Socks
private native static void terminateTun2Socks();
+ public static boolean checkIsAllowed (int protocol, String sourceAddr, int sourcePort, String destAddr, int destPort) {
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
+ {
+ return isAllowedQ(protocol, sourceAddr, sourcePort, destAddr, destPort);
+ }
+ else
+ return isAllowed(protocol, sourceAddr, sourcePort, destAddr, destPort);
+ }
+
public static boolean isAllowed (int protocol, String sourceAddr, int sourcePort, String destAddr, int destPort) {
TCPSourceApp.AppDescriptor aInfo = TCPSourceApp.getApplicationInfo(mContext, sourceAddr, sourcePort, destAddr, destPort);
More information about the tor-commits
mailing list