• Tony's avatar
    Properly decode seed hosts argument in server.py · 9f238ebc
    Tony authored
    When I starting sshuttle with option `--seed-hosts example.com`, got the following error:
    
    ```
    hostwatch: Starting hostwatch with Python version 3.5.2
    hostwatch: Traceback (most recent call last):
    --->   File "sshuttle.server", line 144, in start_hostwatch
    --->   File "sshuttle.hostwatch", line 272, in hw_main
    --->   File "sshuttle.hostwatch", line 234, in check_host
    --->   File "sshuttle.hostwatch", line 32, in _is_ip
    --->   File "/usr/lib/python3.5/re.py", line 163, in match
    --->     return _compile(pattern, flags).match(string)
    ---> TypeError: cannot use a string pattern on a bytes-like object
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "assembler.py", line 37, in <module>
      File "sshuttle.server", line 393, in main
      File "sshuttle.ssnet", line 596, in runonce
      File "sshuttle.server", line 324, in hostwatch_ready
    sshuttle.helpers.Fatal: hostwatch process died
    ```
    
    It seems like the list of hosts is not properly decoded on the server side. This is an attempt to fix that.
    9f238ebc
Name
Last commit
Last update
..
methods Loading commit data...
tests Loading commit data...
__init__.py Loading commit data...
__main__.py Loading commit data...
assembler.py Loading commit data...
client.py Loading commit data...
cmdline.py Loading commit data...
firewall.py Loading commit data...
helpers.py Loading commit data...
hostwatch.py Loading commit data...
linux.py Loading commit data...
options.py Loading commit data...
sdnotify.py Loading commit data...
server.py Loading commit data...
ssh.py Loading commit data...
ssnet.py Loading commit data...
ssyslog.py Loading commit data...
stresstest.py Loading commit data...