Repository navigation
Disconnect VPNs automatically, and reach their settings from the menu - #56
Merged
Merged
Conversation
A profile can end its session by itself: after a time connected, after a time without keyboard or mouse input, or at a time of day (H:MM each, the first one reached wins). The daemon enforces it, with the app closed too, against the wall clock so that sleep counts. Watchers that announce the auto_disconnect feature get an Expiring event 5 minutes before (at most half the limit), and Postpone starts the time connected again or moves the time of day an hour later. Reconnections keep the deadlines. The protocol version does not change: older clients get no new event. - CLI: status shows the deadline; `postpone <profile>`. - App: a Schedule tab in the editor, with a switch for the whole (limits kept while off, `enabled = false`) and a checkbox per limit; a warning notification with a Postpone action; "ends at" in the menu. - Menu: a gear after each VPN's switch opens its settings. - While one of its windows is open, the app is a regular one, in the Dock and in Command-Tab. - Reconnecting after an update compares the build too, so a package of the same version built again counts as an update. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automatic disconnection
A profile can end its session by itself (
auto_disconnect = { after = "9:00", idle = "1:00", at = "19:30" }, each optional,H:MM); the first limit reached disconnects.HIDIdleTime), not network traffic. macOS only.Expiringevent, sent only to clients announcing theauto_disconnectfeature inHello;PROTOCOL_VERSIONunchanged.Request::Postpone,omnitunctl postpone, notification action, menu item): the time connected starts again, a time of day moves an hour later; idleness ends with the user's next input.enabled = falsekeeps the limits without applying them.App
Tests
cargo fmt --check,cargo clippy --workspace --all-targets -D warnings,cargo test --workspace(384 passed),swift build,swift test.🤖 Generated with Claude Code