Documentation

Routing tools

Every way to put a tool onto a tailnet with TailMux — and which one a given tool needs.

View as Markdown

TailMux does not install a VPN interface, so a tool does not reach a tailnet just because TailMux is running: it reaches it through one of five access paths. Nearly every “this tool doesn't work with TailMux” report is a tool pointed at the wrong path. Pick the path from what the tool speaks, not from what it is called.

Pick an access path#

Your toolUse
A browser, or anything following the system proxythe PAC file (automatic in the app)
A command that honors HTTP_PROXY — curl, git, npm, pip, most HTTP CLIstailmux run for one command, tailmux env for a shell
ssh, scp, rsync -e ssh, Git over SSHtailmux ssh, or a ProxyCommand in ~/.ssh/config
Anything that takes a ProxyCommand-style stdin/stdout hooktailmux connect <host> <port>
A raw-TCP or GUI client that only accepts host:port — databases, RDP, SMB, SFTP tools, IDE remotestailmux tunnel, or a tunnel in the app
A tool that speaks SOCKS5 onlypoint it at the router SOCKS endpoint, 127.0.0.1:43101

All of these keep the same guarantee: the hostname picks the profile, and a hostname owned by one profile is never retried on another. See limitations and routing model for the boundary itself.

Browser and system proxy#

The macOS and Fedora apps point the system proxy at the TailMux PAC for you. Without the app, serve the PAC and set it manually — it is a plain URL any browser accepts:

zsh — tailmux
$tailmux pac status$tailmux pac print   # inspect the generated rules

The PAC sends configured suffixes to the local proxy and leaves everything else direct, so public browsing is untouched. Full walkthrough: browser routing.

tailmux run — one command#

tailmux run executes a command with HTTP_PROXY/HTTPS_PROXY/ALL_PROXY pointed at the TailMux router, and NO_PROXY covering loopback. Only that command is affected — your shell keeps its own environment:

zsh — tailmux
$tailmux run curl https://grafana.acme-corp.ts.net/$tailmux run git clone https://git.acme-corp.ts.net/team/service.git$tailmux run npm install --registry https://registry.acme-corp.ts.net/

Flags after the command name belong to the command, not to TailMux, so tailmux run curl -v … does what you expect.

The router is not a general internet proxy. A host no profile owns is refused, not sent direct — an HTTP client sees TailMux: no profile rule for host. Only the PAC leaves public traffic direct. Keep builds and package managers that also fetch public dependencies outside tailmux run and tailmux env, or point them at a registry that lives on the tailnet.

tailmux env — a whole shell#

For a session rather than a single command, export the same variables into the current shell:

zsh — tailmux
$eval "$(tailmux env)"

Which prints, and therefore sets:

tailmux env
1export HTTP_PROXY=http://127.0.0.1:431002export HTTPS_PROXY=http://127.0.0.1:431003export ALL_PROXY=socks5h://127.0.0.1:431014export NO_PROXY=localhost,127.0.0.1,::1

socks5h matters: the h means the proxy resolves the hostname, which is exactly what makes suffix routing work. A tool configured with plain socks5 resolves locally first, gets NXDOMAIN for a tailnet name, and fails before TailMux sees it. More examples: curl, git & npm per tailnet.

tailmux ssh — shells and everything SSH#

tailmux ssh wraps your system ssh with the right ProxyCommand and then replaces itself with the real ssh process, so keys, agent, known_hosts, signals, and exit status behave exactly as usual:

zsh — tailmux
$tailmux ssh admin@host.work.ts.net

To make plain ssh, scp, Git remotes, and GUI SSH clients work with no prefix at all, put the same option in ~/.ssh/config:

~/.ssh/config
1Host *.work.ts.net2    ProxyCommand tailmux connect %h %p

The SSH page covers wildcard vs. per-host entries, GUI tools, aliases, and the SOCKS variant for clients that only speak SOCKS5.

tailmux connect — one raw TCP stream#

tailmux connect <host> <port> opens a single TCP stream on stdin/stdout through the profile that owns the hostname. It is the primitive behind tailmux ssh, and it fits anything with a ProxyCommand-shaped hook. It is also the shortest reachability check for one port:

zsh — tailmux
$tailmux connect nas.home-lab.ts.net 8080

tailmux tunnel — a fixed local port#

A tunnel gives a client a stable 127.0.0.1:<port> that relays into one profile, which is the only thing that works for clients that neither speak proxies nor accept a ProxyCommand:

zsh — tailmux
$tailmux tunnel --listen 127.0.0.1:15432 db.internal.example:5432$tailmux tunnel --profile work --listen 127.0.0.1:13389 10.10.20.15:3389

The profile is taken from the target's suffix; --profile forces one and is required for raw-IP targets. The apps keep tunnels running for you — tunnels and database & GUI clients.

What will not work#

  • ping — ICMP is not TCP and cannot cross a proxy. Use tailmux diag path <url>, which runs a tailnet-level ping inside the profile. See the limitations page.
  • tailmux run ssh … — tailmux run sets HTTP_PROXY-style variables and OpenSSH ignores them entirely. Use tailmux ssh or a ProxyCommand.
  • GUI clients under tailmux run — database GUIs, RDP clients, and SFTP apps ignore proxy environment variables. Give them a tunnel.
  • Raw IP addresses — an IP carries no profile ownership, so it is denied by default. Name the profile explicitly (tailmux tunnel --profile) or declare ip_routes in the config.
  • Generic UDP — no UDP association, no DNS straight to a tailnet resolver. Use tailmux dns query --profile to inspect per-profile DNS.

When a tool still fails#

  1. tailmux test host.your-tailnet.ts.net — does a profile own the name? If it prints no match, the suffix does not match your tailnet's MagicDNS base domain; see suffixes & ownership.
  2. tailmux status — is the owning profile logged in and running?
  3. tailmux connect host 22 — is the host reachable through that profile at all?
  4. tailmux diag path … — owner, peer visibility, direct vs. DERP, HTTP timing.
Routing changes — profiles, suffixes, ports, IP routes — take effect when the router restarts, not on save. If a name still fails to classify right after an edit, restart the router (the apps prompt you to).