distant icon indicating copy to clipboard operation
distant copied to clipboard

Add support for server lifetime

Open chipsenkbeil opened this issue 4 years ago • 1 comments

Terminates client/server after some period of time, regardless of active connections. Designed for security at work. Default should be 8 hours.

chipsenkbeil avatar Sep 15 '21 02:09 chipsenkbeil

Used to have this as --shutdown-after. The annoying thing was that this was done by checking if we had no active connections to the server. Instead, we probably want multiple options:

  1. Never expire
  2. Expire after X amount of time regardless of connections
  3. Expire after X amount of time with no connections

chipsenkbeil avatar Jul 24 '22 20:07 chipsenkbeil

Could rename --shutdown-after to --shutdown and provide an enum that parses a string.

  1. --shutdown never will yield Shutdown::Never
  2. --shutdown [lonely=]<number> will yield Shutdown::Lonely(Duration) (compatible with old --shutdown-after <number>
  3. --shutdown always=<number> will yield Shutdown::Always(Duration) that will shut the server down after N seconds regardless

chipsenkbeil avatar Aug 18 '22 22:08 chipsenkbeil

Resolved by https://github.com/chipsenkbeil/distant/commit/74a37209eb2e973200011ed19d86ee8840cea1f4.

chipsenkbeil avatar Aug 18 '22 23:08 chipsenkbeil

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

github-actions[bot] avatar Jul 06 '23 03:07 github-actions[bot]