1. 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
  2. 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
  3. 29 Dec, 2020 2 commits
  4. 28 Dec, 2020 10 commits
  5. 16 Dec, 2020 4 commits
  6. 14 Dec, 2020 4 commits
  7. 16 Nov, 2020 2 commits
  8. 07 Nov, 2020 1 commit
  9. 06 Nov, 2020 1 commit
  10. 05 Nov, 2020 2 commits
  11. 04 Nov, 2020 6 commits
  12. 29 Oct, 2020 2 commits
  13. 27 Oct, 2020 2 commits
  14. 26 Oct, 2020 1 commit
    • Scott Kuhl's avatar
      Intercept DNS requests sent by systemd-resolved. · 502960d7
      Scott Kuhl authored
      Previously, we would find DNS servers we wish to intercept traffic on
      by reading /etc/resolv.conf. On systems using systemd-resolved,
      /etc/resolv.conf points to localhost and then systemd-resolved
      actually uses the DNS servers listed in
      /run/systemd/resolve/resolv.conf. Many programs will route the DNS
      traffic through localhost as /etc/resolv.conf indicates and sshuttle
      would capture it. However, systemd-resolved also provides other
      interfaces for programs to resolve hostnames besides the localhost
      server in /etc/resolv.conf.
      
      This patch adds systemd-resolved's servers into the list of DNS
      servers when --dns is used.
      
      Note that sshuttle will continue to fail to intercept any traffic sent
      to port 853 for DNS over TLS (which systemd-resolved also supports).
      
      For more info, see:
      sshuttle issue #535
      https://www.freedesktop.org/software/systemd/man/systemd-resolved.service.html
      https://github.com/systemd/systemd/issues/6076
      502960d7
  15. 25 Oct, 2020 1 commit