summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2018-06-08 20:24:21 +0200
committerRuben Pollan <meskio@sindominio.net>2018-06-12 22:06:45 +0200
commitdd9bcff5a2ea0b6e7bda4eeebfe6b74700f8d974 (patch)
treed32076ec5fa4b6cc6673902774ef1f3b63164a43
parent97e65183582794f91869b34d76017b5d623888c9 (diff)
[feat] add support for tcp management in bitmask-root
-rwxr-xr-xsrc/leap/bitmask/vpn/helpers/linux/bitmask-root9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/leap/bitmask/vpn/helpers/linux/bitmask-root b/src/leap/bitmask/vpn/helpers/linux/bitmask-root
index 3f6c1e74..6b8f3206 100755
--- a/src/leap/bitmask/vpn/helpers/linux/bitmask-root
+++ b/src/leap/bitmask/vpn/helpers/linux/bitmask-root
@@ -130,7 +130,7 @@ ALLOWED_FLAGS = {
"--tls-cipher": ["CIPHER"],
"--cipher": ["CIPHER"],
"--auth": ["CIPHER"],
- "--management": ["DIR", "UNIXSOCKET"],
+ "--management": ["DIR||IP", "UNIXSOCKET||NUMBER"],
"--management-client-user": ["USER"],
"--cert": ["FILE"],
"--key": ["FILE"],
@@ -138,6 +138,7 @@ ALLOWED_FLAGS = {
"--fragment": ["NUMBER"],
"--keepalive": ["NUMBER", "NUMBER"],
"--verb": ["NUMBER"],
+ "--management-client": [],
}
PARAM_FORMATS = {
@@ -392,8 +393,10 @@ def parse_openvpn_flags(args):
(SCRIPT, flag_name))
return None
for param, param_type in zip(flag_params, required_params):
- if PARAM_FORMATS[param_type](param):
- result.append(param)
+ for tpe in param_type.split("||"):
+ if PARAM_FORMATS[tpe](param):
+ result.append(param)
+ break
else:
log("%s: ERROR: Bad argument %s" %
(SCRIPT, param))