Skip to main content

tailctx - Tailscale context manager

tailctx is a tool to help manage several environment for your Tailscale VPNs.

Traditionally, Tailscale only supports connecting to one login server, requiring to delete the state in order to connect to another one, which makes it unpractical when having several separate corporate environments, or a corporate and personal VPNS. tailctx runs tailscaled with a separate state directory, stored in the user's home directory, in order to persist the distinct states.

Once a context is launched, it can be used and configured as any other Tailscale connection, though the tailscale command.

Install

# Install from HEAD
$ pip install --force-reinstall git+https://github.com/apognu/tailctx.git

Usage

$ sudo tailctx start personal
INFO: creating new tailscale context `personal`
$ sudo tailscale up --login-server=...
$ sudo tailctx stop

$ sudo tailctx start personal
INFO: using existing tailscale context `personal`

$ tailctx status
State: connected
Context: personal

Hostname: hostname
DNS name: hostname.ns.example.com
IP address: 100.64.0.100

Hosts:

        Hostname       DNS name      IP address                            Exitable
  ✓     otherhost      100.64.0.3    otherhost.ns.example.com              ✓

$ sudo tailctx exit -s otherhost
INFO: exit node was set as `otherhost`

$ tailctx status
State: connected
Context: personal

Hostname: hostname
DNS name: hostname.ns.example.com
IP address: 100.64.0.100

Hosts:

        Hostname       DNS name      IP address                            Exitable
  ✓ 🌐  otherhost      100.64.0.3    otherhost.ns.example.com              ✓

Release files for tailctx 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tailctx 0.8.0
File Size Uploaded
tailctx-0.8.0.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tailctx 0.8.0
File Interpreter ABI Platform
tailctx-0.8.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / tailctx-0.8.0.tar.gz

Download URL tailctx-0.8.0.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d130fbf86864a040b6a4f4af6d3ee3efd63c7f119d8b5dde54cdef3fd565ab54
BLAKE2b-256 checksum
How to use checksums
586ae912ac0dec848bbb9cdc20080eaee00386fdc65fa2e8e6ef5e7089f988f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.3 Linux/6.11.9-arch1-1

Release files / tailctx-0.8.0-py3-none-any.whl

Download URL tailctx-0.8.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd00f919676cef0cf005470919ceec15e280b6c3af0ed65fdb2ee34963df79b4
BLAKE2b-256 checksum
How to use checksums
70e661942f5e5bfac20cc92e608c35e2da234b308669ad9657deec75c6f6380a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.12.3 Linux/6.11.9-arch1-1

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 release files

0.7.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page