summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-10-08 11:55:15 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-10-08 11:55:57 +0200
commit71821ce8806a33158d4bb870ceb9f621008d3565 (patch)
tree71c2833f4a09f5ad882433d6a84d50b1b2bdb46a /helpers
parentee2cda435f209df2a5ce647a36f51bc7011c6bdf (diff)
[feat] pass udp flag to bitmask-root
Diffstat (limited to 'helpers')
-rw-r--r--helpers/bitmask-root9
1 files changed, 6 insertions, 3 deletions
diff --git a/helpers/bitmask-root b/helpers/bitmask-root
index 929e0f9..ed0fe8e 100644
--- a/helpers/bitmask-root
+++ b/helpers/bitmask-root
@@ -89,12 +89,15 @@ def is_ipv6_disabled():
def tostr(s):
return s.decode('utf-8')
-VERSION = "14"
+VERSION = "15"
SCRIPT = "bitmask-root"
NAMESERVER_TCP = "10.41.0.1"
NAMESERVER_UDP = "10.42.0.1"
-# for the time being, we're hardcoding tcp on connection params.
-NAMESERVER = NAMESERVER_TCP
+
+if os.getenv("UDP") == "1":
+ NAMESERVER = NAMESERVER_UDP
+else:
+ NAMESERVER = NAMESERVER_TCP
BITMASK_CHAIN = "bitmask"
BITMASK_CHAIN_NAT_OUT = "bitmask"
BITMASK_CHAIN_NAT_POST = "bitmask_postrouting"