Conversation
- Introduced Tailscale configuration and management in the service. - Added functions for installing, starting, and managing Tailscale daemons and funnels. - Enhanced ProcessInfo to track Tailscale status and ports. - Updated ServiceManager to handle Tailscale alongside existing tunneling options (ngrok, Cloudflare). - Implemented validation for Tailscale configuration parameters. - Created a new TailscaleConfigurator class for managing Tailscale setup and validation. - Added logging for Tailscale subprocess activities. - Updated unit tests to cover new Tailscale functionality.
- Introduced `tailscale_advertise_tags` to ServiceConfig and related classes. - Updated ServiceConfigHandler to handle new argument for Tailscale. - Modified TailscaleConfigurator to utilize advertise tags during authentication. - Adjusted validation logic to check for presence of Tailscale auth key and tags. - Enhanced installation and daemon management functions to ensure proper handling of Tailscale. - Updated unit tests to cover new `tailscale_advertise_tags` parameter.
mnaqvi-ks
requested review from
amuley-ks,
bpadhan-ks,
mbachhav-ks and
pkamble-ks
September 18, 2026 10:13
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.
Adds Tailscale Funnel as a new tunnel option for Commander Service Mode, alongside the existing Ngrok and Cloudflare integrations. Users can now expose the Service Mode REST API over a public HTTPS URL using their own Tailscale account, with no changes to how Ngrok/Cloudflare already work.
Features
-ts, --tailscale <auth-key>/-tst, --tailscale_advertise_tags <tags>, following the same single-flag convention as-ng/-cf. Mutually exclusive with Ngrok/Cloudflare.tailscaledisn't running.tailscale up; never touches the Service Mode API Key, which continues to gate every API request unchanged.service-create/service-start/service-status/service-stop. Startup failures roll back cleanly (including already-started Ngrok/Cloudflare processes).service-status, and included in Docker vault-record metadata (-ur).--auth-key=file:...) instead of a raw CLI argument, avoiding exposure viapsto other local users. Never logged.Design notes
service-stoponly resets the Funnel exposure — it doesn't log the machine out of Tailscale or stop the daemon, sincetailscaledis system-wide and may be used for other things on the same machine.-ts <key>as a single flag) intentionally matches the existing-ng/-cfconvention rather than a separate enable+key pair.Files changed
keepercommander/service/config/tailscale_config.py(new)ngrok_config.py/cloudflare_config.pykeepercommander/service/util/tunneling.pytailscaleCLI wrapper functions (install, daemon start, auth, Funnel start/stop/status, URL lookup)keepercommander/service/core/service_manager.pystart_service/stop_service/get_status, including rollback-on-failure and interrupt handlingkeepercommander/service/core/process_info.pytailscale_enabled/tailscale_portlifecycle tracking (no PID — Tailscale has no Commander-owned subprocess)keepercommander/service/core/globals.pykeepercommander/service/commands/create_service.py-ts/-tstCLI flags and config schema fieldskeepercommander/service/commands/service_config_handlers.pykeepercommander/service/commands/integrations/vault_metadata.pyget_service_url()helper; fixes Docker metadata write-back timing so it waits for the real URLkeepercommander/service/config/config_validation.pyvalidate_tailscale_auth_keykeepercommander/service/config/models.py/service_config.pytailscale,tailscale_auth_key,tailscale_advertise_tags,tailscale_public_urlconfig fields, defaults, and backward-compat migrationkeepercommander/resources/service_config.inikeepercommander/service/README.md--force-reauth/single-use-key noteunit-tests/service/test_create_service.pyCompatibility
No changes to
ngrok_config.pyorcloudflare_config.py. All changes to shared files are additive, confirmed via diff review. Full existing test suite (279 tests) passes unchanged.