summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bouve <crahan@n00.be>2019-02-13 20:01:09 +0100
committerBrian May <brian@linuxpenguins.xyz>2019-02-14 14:14:56 +1100
commit4372c6c11739eb479ffb74f933699960686c9408 (patch)
treebe4e51ed978b7622fdf7985c94dd31915587b957
parent4e945ca4de8587e37dc793e7dccd12adc8cf9713 (diff)
Hyphen in hostname fix
-rw-r--r--sshuttle/options.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshuttle/options.py b/sshuttle/options.py
index df01989..a19d5ef 100644
--- a/sshuttle/options.py
+++ b/sshuttle/options.py
@@ -32,7 +32,7 @@ def parse_subnetport(s):
if s.count(':') > 1:
rx = r'(?:\[?([\w\:]+)(?:/(\d+))?]?)(?::(\d+)(?:-(\d+))?)?$'
else:
- rx = r'([\w\.]+)(?:/(\d+))?(?::(\d+)(?:-(\d+))?)?$'
+ rx = r'([\w\.\-]+)(?:/(\d+))?(?::(\d+)(?:-(\d+))?)?$'
m = re.match(rx, s)
if not m:
@@ -63,7 +63,7 @@ def parse_ipport(s):
elif ']' in s:
rx = r'(?:\[([^]]+)])(?::(\d+))?$'
else:
- rx = r'([\w\.]+)(?::(\d+))?$'
+ rx = r'([\w\.\-]+)(?::(\d+))?$'
m = re.match(rx, s)
if not m: