mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-01-30 09:48:55 +01:00
Hyphen in hostname fix
This commit is contained in:
parent
4e945ca4de
commit
4372c6c117
@ -32,7 +32,7 @@ def parse_subnetport(s):
|
|||||||
if s.count(':') > 1:
|
if s.count(':') > 1:
|
||||||
rx = r'(?:\[?([\w\:]+)(?:/(\d+))?]?)(?::(\d+)(?:-(\d+))?)?$'
|
rx = r'(?:\[?([\w\:]+)(?:/(\d+))?]?)(?::(\d+)(?:-(\d+))?)?$'
|
||||||
else:
|
else:
|
||||||
rx = r'([\w\.]+)(?:/(\d+))?(?::(\d+)(?:-(\d+))?)?$'
|
rx = r'([\w\.\-]+)(?:/(\d+))?(?::(\d+)(?:-(\d+))?)?$'
|
||||||
|
|
||||||
m = re.match(rx, s)
|
m = re.match(rx, s)
|
||||||
if not m:
|
if not m:
|
||||||
@ -63,7 +63,7 @@ def parse_ipport(s):
|
|||||||
elif ']' in s:
|
elif ']' in s:
|
||||||
rx = r'(?:\[([^]]+)])(?::(\d+))?$'
|
rx = r'(?:\[([^]]+)])(?::(\d+))?$'
|
||||||
else:
|
else:
|
||||||
rx = r'([\w\.]+)(?::(\d+))?$'
|
rx = r'([\w\.\-]+)(?::(\d+))?$'
|
||||||
|
|
||||||
m = re.match(rx, s)
|
m = re.match(rx, s)
|
||||||
if not m:
|
if not m:
|
||||||
|
Loading…
Reference in New Issue
Block a user