Skip to content

Improve hostwatch robustness and documentation#650

Merged
brianmay merged 2 commits intosshuttle:masterfrom
skuhl:hw-improve
Jun 2, 2021
Merged

Improve hostwatch robustness and documentation#650
brianmay merged 2 commits intosshuttle:masterfrom
skuhl:hw-improve

Conversation

@skuhl
Copy link
Contributor

@skuhl skuhl commented Jun 2, 2021

If an exception occurs in hostwatch, sshuttle exits. Problems
read/writing the ~/.sshuttle.hosts cache file on the remote machine
would therefore cause sshuttle to exit. With this patch, we simply
continue running without writing/reading the cache file in the remote
home directory. This serves as an alternate fix for
pull request #322 which proposed storing the cache file elsewhere.

A list of included changes:

  • If we can't read or write the host cache file on the server,
    continue running. Hosts can be collected through the netstat,
    /etc/hosts, etc and the information can be reconstructed each run if
    a cache file isn't available to read. We write a log() message when
    this occurs.

  • Add additional types of exceptions to handle.

  • Continue even if we cannot read /etc/hosts on the server.

  • Update man page to mention the cache file on the remote host.

  • Indicate that messages are related to remote host instead of local
    host.

  • Add comments and descriptions to the code.

skuhl added 2 commits June 2, 2021 15:22
If an exception occurs in hostwatch, sshuttle exits. Problems
read/writing the ~/.sshuttle.hosts cache file on the remote machine
would therefore cause sshuttle to exit. With this patch, we simply
continue running without writing/reading the cache file in the remote
home directory. This serves as an alternate fix for
pull request sshuttle#322 which proposed storing the cache file elsewhere.

A list of included changes:

- If we can't read or write the host cache file on the server,
  continue running. Hosts can be collected through the netstat,
  /etc/hosts, etc and the information can be reconstructed each run if
  a cache file isn't available to read. We write a log() message when
  this occurs.

- Add additional types of exceptions to handle.

- Continue even if we cannot read /etc/hosts on the server.

- Update man page to mention the cache file on the remote host.

- Indicate that messages are related to remote host instead of local
  host.

- Add comments and descriptions to the code.
@brianmay brianmay merged commit 78b8070 into sshuttle:master Jun 2, 2021
@skuhl skuhl deleted the hw-improve branch June 30, 2021 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants