1. 04 Jan, 2021 2 commits
    • Scott Kuhl's avatar
      tproxy: Skip firewall chains if packets have local destination. (#578) · 97c25e98
      Scott Kuhl authored
      If you use the tproxy method with a large subnet (such as 0/0), then
      (1) you may not receive UDP packets that sshuttle/tproxy can handle
      and (2) you are unable to connect to your machine using an IP that
      your computer recognizes as its own.
      
      To resolve those issues, any traffic to an IP that the host knows is
      local, does not go through the sshuttle chains.
      97c25e98
    • Scott Kuhl's avatar
      Improve error messages related to sshuttle server. (#580) · b7730fc1
      Scott Kuhl authored
      * Improve error messages related to sshuttle server.
      
      There are many GitHub issues related to the cryptic message:
      fatal: expected server init string 'SSHUTTLE0001'; got b''
      
      The code that prints that message is after another check that is
      intended to verify that the server is still running. This code was
      faulty since the server is still running when rv==None (but exited
      when rv==0).
      
      I corrected this problem and then investigated ways to clarify the
      error message. I added additional exit codes for the server: 97 (exec
      in the shell returned), 98 (the python exec() function called
      returned). The end result is that the cryptic error message above will
      now print a more appropriate error message that should aid in
      debugging.
      
      I also changed the server so that it catches Fatal() and exits with
      exit code 99 (like the client does). Previously, it was just an
      unhandled exception on the server.
      
      I suspect some of the error messages were caused by restricted shells.
      I also investigated and added comments about how sshuttle might behave
      if it is being run on a server that has a restricted shell.
      
      This commit also replaces a couple of exit() calls in cmdline.py with
      'return' since exit() is intended for interactive use. This change
      doesn't impact the server.
      
      * Remind user to exclude remote host when server exits with 255.
      b7730fc1
  2. 01 Jan, 2021 1 commit
    • Scott Kuhl's avatar
      Refactor debug, log and Fatal messages. · 7fc33c00
      Scott Kuhl authored
      This commit rewrites the log() function so that it will append a
      newline at the end of the message if none is present. It doesn't make
      sense to print a log message without a newline since the next log
      message (which will write a prefix) expects to be starting at the
      beginning of a line.
      
      Although it isn't strictly necessary, this commit also removes any
      newlines at the ends of messages. If I missed any, including the
      newline at the end of the message will continue to work as it did
      before.
      
      Previously, some calls were missing the newline at the end even though
      including it was necessary for subsequent messages to appear
      correctly.
      
      This code also cleans up some redundant prefixes. The log() method
      will prepend the prefix and the different processes should set their
      prefix as soon as they start.
      
      Multiline messages are still supported (although the prefix for the
      additional lines was changed to match the length of the prefix used
      for the first line).
      7fc33c00
  3. 31 Dec, 2020 1 commit
    • Scott Kuhl's avatar
      Ignore quotes in config file passed to sshuttle with @ · 563f4147
      Scott Kuhl authored
      When users put parameters in a config file and pass them to sshuttle
      using '@', they might copy the quotes from the command line into the
      config file. This fix first ensures that we strip whitespace from the
      beginning/end of each line in the config file. Then, if the line
      begins and ends with a matching quote character, strip those too.
      
      Fixes #573.
      563f4147
  4. 29 Dec, 2020 2 commits
  5. 28 Dec, 2020 10 commits
  6. 16 Dec, 2020 4 commits
  7. 14 Dec, 2020 4 commits
  8. 16 Nov, 2020 2 commits
  9. 07 Nov, 2020 1 commit
  10. 06 Nov, 2020 1 commit
  11. 05 Nov, 2020 2 commits
  12. 04 Nov, 2020 6 commits
  13. 29 Oct, 2020 2 commits
  14. 27 Oct, 2020 2 commits