Ephemeral WireGuard Tunnels, Remote Support Shells & Encrypted File Inboxes for Asuswrt-Merlin Routers
Powered by Tailscale's TailCat engine (magicsock + WireGuard + DERP NAT traversal) without requiring a Tailscale account or central coordination server.
π Read the Official Wiki & Documentation | GitHub Wiki
TAILCAT ZER0 v1.8.0 β±|γ
(ΛΛ γ7
|γΛγ΅
Instant Tunnel Manager γγΛ,)γ
========================================================================
1. π Remote Support Shell Full root or view-only access [π’ Root + π View]
2. π₯ Receive Files & Folders Direct P2P file/folder drop box [βͺ Inactive]
3. π Share Directory (SFTP) Share a folder from your drive [π’ Active: 28m]
4. π Expose Router WebGUI Access to router's web interface [βͺ Inactive]
------------------------------------------------------------------------
5. β±οΈ Configure Default Timeout Current: 30 min
6. βοΈ Manage TAILCAT ZER0 Update, reinstall, or remove
========================================================================
ποΈ View Sessions | π Stop | β©οΈ Exit:
Run this command directly in your router SSH terminal:
curl -fsSL https://raw.githubusercontent.com/underd0se/tailcat-zero/main/install.sh | shLaunch the interactive TUI dashboard:
tailcatzeroTAILCAT ZER0 can also be run directly from scripts or the command line:
tailcatzero status # Display running sessions and connect tokens
tailcatzero ssh [root|view] # Start remote shell tunnel (default: root)
tailcatzero view # Start restricted view-only diagnostic shell
tailcatzero recv [/path/to/inbox] # Start encrypted file & directory receiver (default /tmp/tailcat-inbox)
tailcatzero files [/path] [ro|rw] # Start SFTP directory share (default /jffs ro)
tailcatzero webgui # Start router WebGUI tunnel
tailcatzero requests # List pending guest permission requests
tailcatzero approve [id|cmd] [--once] # Approve guest request (session-wide or single-use)
tailcatzero deny [id|cmd] # Deny guest request and suppress repeat prompts
tailcatzero allow <cmd> # Proactively permit command in view-only mode
tailcatzero revoke <cmd> # Revoke command permission from view-only mode
tailcatzero timeout [min|persistent] # Query or configure default auto-kill session timeout
tailcatzero stop all # Stop all active sessions
tailcatzero stop [SSH|VIEW|RECV|FILES|WEBGUI] # Stop specific service
tailcatzero update # Update TAILCAT ZER0 script & engine (hash-verified)
tailcatzero check-update # Check upstream version & hash for updates
tailcatzero --version # Display version & active script hash- π Restricted View-Only Diagnostic Shell:
- Zero-trust, read-only inspection shell designed for untrusted assistance or safe remote triage.
- Extensive Inspection Commands: System health (
uptime,free,df,ps,top,dmesg,sysinfo), networking & WiFi (ip,netstat,route,ping,mtr,wl,leases,wifi,ports), NVRAM queries (nvram get,nvram show,logread), text processing (cat,head,tail,grep,rg,tree,sort,uniq,diff), and Entware queries (opkg list/info/find/status/search/depends). - π On-Demand Permission Escalation: Remote technicians or friends can run
request <command>(or respondywhen prompted on unapproved commands) to request live host authorization. The host router admin receives real-time notification alerts across admin terminals, syslog, and the TUI dashboard (π [P]ending Requests), and can approve session-wide, approve once, or deny. - π‘οΈ Hardened Multi-Layer Security Sandbox: Prohibits file redirections (
>,>>,<), subshells (`/$()), command chaining (;,&&,||), mutating binaries (rm,mv,cp,touch,chmod,dd), state mutations (nvram set/commit,reboot,kill), and package changes (opkg install/remove). - β‘ Unix Pipeline Support: Supports Unix pipelines (
|) between allowed tools (e.g.ps | grep dnsmasq,nvram show | grep dhcp).
- π± Live Active Session Card:
- Dedicated interactive dashboard displaying a real-time auto-kill countdown, active service details, shareable capability token, and 1-key quick actions (
[s] Stop,[r] Refresh,[q] QR Code,[b] Back).
- Dedicated interactive dashboard displaying a real-time auto-kill countdown, active service details, shareable capability token, and 1-key quick actions (
- π· Integrated ASCII QR Codes:
- Displays inline ASCII QR codes generated by the router's built-in
qrencodeengine for instant token capture with phones and laptops.
- Displays inline ASCII QR codes generated by the router's built-in
- π¬ Ready-to-Paste Chat Snippets:
- Automatically creates pre-formatted 2-line invite text ready to copy-paste directly into Discord, Slack, or WhatsApp for remote technicians or friends.
- π Instant Remote Shell (Passwordless Support Access):
- Spawns an encrypted P2P WireGuard shell powered by TailCat's built-in SSH runtime.
- Zero Friction: Share the token with any assistant or administrator β they connect immediately (
tailcat ssh <token>) with zero passwords to disclose and zero SSH keys to manage.
- π₯ Encrypted File Receiver:
- Turn your router into a secure file receiver inbox (
/tmp/tailcat-inboxor mounted USB storage). - Send firmware images or JFFS backups from any PC:
tailcat cp backup.tar.gz <token>:
- Turn your router into a secure file receiver inbox (
- π SFTP Directory Share:
- Serve any router directory (e.g.
/jffsor USB mount) read-only or read-write to remote clients using native SFTP.
- Serve any router directory (e.g.
- π WebGUI Remote Access:
- Expose local WebUI (port 8443 / 80) over a secure token without opening WAN firewall ports.
- β±οΈ Flexible Auto-Kill & Persistent Mode:
- All tunnels support custom auto-kill countdown timers (default: 30 minutes) or
0for Persistent mode (runs until manually stopped).
- All tunnels support custom auto-kill countdown timers (default: 30 minutes) or
| Security Measure | Implementation |
|---|---|
| Capability-Based Tokens | 256-bit cryptographically secure ephemeral tokens. Possession is permission. |
| Restricted View Shell | Dedicated read-only shell wrapper blocking write binaries, redirections, subshells, chaining, and state mutation. |
| No WAN Ports Open | Uses DERP relays and UDP NAT hole-punching. Zero incoming firewall holes opened. |
| Configurable Auto-Kill | Background watchdog automatically kills tunnels on expiry, or persists when set to 0. |
| Clean Reboot Teardown | Session locks and state are stored in volatile memory (/tmp) and cleaned up on reboot. |
Install tailcat on your laptop or client device:
- macOS:
brew install tailcat - Linux / Go:
go install github.com/tailscale/tailcat/cmd/tailcat@latest - Prebuilt Binaries: TailCat Releases
# Connect to router SSH (root or view-only)
tailcat ssh tcXXXXXXXXX
# Send file to router
tailcat cp firmware.trx tcXXXXXXXXX:
# Browse router files
tailcat ls tcXXXXXXXXX
# Forward router WebGUI to your local browser
tailcat forward tcXXXXXXXXX 8443
# Then open: https://localhost:8443If you maintain an Asuswrt-Merlin script or help users troubleshoot on forums like SNBForums, diagnosing issues usually involves endless back-and-forth posts asking users to copy-paste logs, check configs, or run diagnostic commands.
With TAILCAT ZER0, you can directly inspect the router yourself in minutes:
- Ask the user to run one command:
tailcatzero view
- They PM you the token shown on their screen.
- Connect directly from your terminal:
tailcat ssh <token>
Why this is safe and easy for both sides:
- Read-only by default: You can run diagnostic tools (
sysinfo,logread,ip route,netstat,nvram get,df, etc.) to see what is happening. System writes, deletions, and state modifications are blocked. - On-demand permission: If you need to run a specific command outside the default list, type
request <command>. The user gets an instant notification on their terminal and approves it with a single keystroke (P). - No passwords shared: The user never shares their admin password, SSH password, or private SSH keys.
- No firewall changes: Zero ports are opened on the router; connections travel peer-to-peer over WireGuard.
- Auto-kills itself: The session shuts down automatically after 30 minutes.
If you need to inspect their WebGUI settings directly, have them run tailcatzero webgui. Then run tailcat forward <token> 8443 on your computer and open https://localhost:8443 in your browser.
Launch tailcatzero and select Option 6 (Manage TAILCAT ZER0) β Option 3 (Complete Uninstall), or run:
rm -rf /jffs/addons/tailcatzero /jffs/addons/tailcat /jffs/scripts/tailcat /jffs/scripts/tailcatzero /opt/bin/tailcatzero- π₯ Recursive Folder Support by Default (
--accept-dirs): Senders can now upload entire directory trees (tailcat cp -r) as well as single files to the encrypted file drop box, preserving original filenames and subfolders. - β‘ Hash & MD5-Based Update Checking: The
updateprocess now verifies upstream files against cryptographic hashes (md5sum), detecting changes even when SemVer tags are not bumped and preventing unnecessary flash memory writes when files are identical. Addedtailcatzero check-updatefor non-destructive update detection. - π‘οΈ View-Only Sandbox Dynamic Approvals & Proactive Permissions: Added
tailcatzero allow <cmd>andtailcatzero revoke <cmd>for host permission management, and single-use execution approvals (approve --once). - π¦ Namespace Protection: Standardized exclusively on
tailcatzerowithout symlink hijacking of the officialtailcatGo package name.
- π‘οΈ View-Only Sandbox Hardening: Neutralized shell breakouts via
env <cmd>and interactive pagers (less/more), blocked in-tool file writing (sort -o,uniq [in out],xxd), restricted network and WiFi mutation (route,arp,wl), protected sensitive security files (/etc/shadow,.ssh/id_*,dropbear,.key), and blocked credential leaks innvram show/nvram get. β οΈ GTFOBin Detection & Threat Warnings: Host TUI and headless CLI now display explicit high-visibility security warnings when a guest requests permission for binaries with subshell or file-writing capabilities.- π Zero-Config WebGUI Forwarding: Replaced SOCKS proxy guidance with native
tailcat forward <TOKEN> <port>, providing instant browser access viahttps://localhost:<port>. - π¦ Core Script Harmonization: Renamed repository script from
tailcattotailcatzeroto align with the router command name.
- π On-Demand Permission Escalation for View-Only Sessions: Remote support guests and friends connected to restricted view-only sessions can request execution permissions for additional commands in real-time (
request <cmd>,req <cmd>, or interactive[y/N]prompt on blocked commands). - β‘ Dual-Channel Host Approvals (TUI & Headless CLI): The host router administrator is notified instantly via syslog and admin terminals (
/dev/pts/*). Host can approve or deny via:- Interactive TUI Dashboard: Dynamic badge (
π [P]ending Requests) on main menu and active session cards with hotkey[P]opening an interactive modal. - Headless CLI:
tailcatzero requests,tailcatzero approve [id|cmd] [--once],tailcatzero deny [id|cmd],tailcatzero allow <cmd>, andtailcatzero revoke <cmd>.
- Interactive TUI Dashboard: Dynamic badge (
- π― Granular Approval Scopes: Host can choose between "Approve for this session" (session-wide allowlist cached in memory) or "Approve once" (single execution token).
- π‘οΈ Irreversible Hardware Safeguards (Hard Red Lines): Destructive partition and flash corruption commands (
dd of=/dev/mtd*,flash_erase*,rm -rf /,nvram erase) are hard-blocked from ever being requested or authorized.
- π Restricted View-Only Diagnostic Shell (
tailcat-view-shell): Introduced a zero-trust, read-only remote support shell option (Option 1 -> 2ortailcatzero view/tailcatzero ssh view) for safe technical assistance without disclosing root write access. - π‘οΈ Hardened Multi-Layer Security Sandbox: Prohibits file redirections (
>,>>,<), subshells (`/$()), command chaining (;,&&,||), state-modifying binaries (rm,mv,cp,touch,chmod,dd), router state mutation (nvram set/commit/unset,reboot,kill), and package changes (opkg install/remove/upgrade). - π¦ Deep Entware & Asuswrt Diagnostics: Permits extensive read-only tools across system health (
uptime,free,df,ps,top,dmesg,sysinfo), network & WiFi (ip addr/route,netstat,route,ping,mtr,wl,leases,wifi,ports), NVRAM queries (nvram get,nvram show), text processing (cat,head,tail,grep,rg,tree,sort,uniq,diff), and Entware queries (opkg list/info/find/status/search/depends). - β‘ Safe Unix Pipeline Execution: Supports Unix pipelines (
|) between allowed inspection tools (e.g.ps | grep dnsmasq,nvram show | grep dhcp,opkg list-installed | grep python). - π Remote Support Submenu (Option 1): Main menu Option 1 now provides a clean choice between
1. Full Root Shell (Read-Write)and2. View-Only Diagnostic Shell (Read-Only), with dynamic badging ([π’ Root + π View]). - ποΈ 5-Slot Multi-Service Concurrency: Extended active session slots and termination confirmation to support up to 5 concurrent tunnels (SSH Root, SSH View, File Receiver, SFTP, and WebGUI) running simultaneously on independent WireGuard nodes.
- β±οΈ CLI Timeout Management: Added
tailcatzero timeout [min|persistent]for non-interactive timeout inspection and configuration without opening the TUI. - π‘οΈ DERP Map URL Preservation: Preserves existing
DERP_URLsettings in/jffs/addons/tailcat/tailcat.cfgwhen adjusting timeout parameters. - π» 64-Bit x86 Support (
amd64): Extended installer and updater to detectx86_64/amd64, enabling deployment on x86 Asuswrt-Merlin machines and virtualized testbeds. - π©Ή Self-Healing CLI Dependency Installation: Invoking tunnel subcommands (
ssh,recv,files,webgui) without pre-existing binaries automatically downloads and configures dependencies on-the-fly. - π§Ή Self-Healing Session & Watchdog Reaping: Automatically clears dead process state files, dumps, and orphaned watchdog subshells.
- π WebGUI Protocol & Port Accuracy: Unified
get_webgui_connect_infoacross overview, session cards, and CLI status for exact HTTP vs HTTPS port resolution. - ποΈ Comprehensive Uninstaller: Removes legacy
/opt/bin/tailcatbinaries and applies POSIX case-insensitive cleanup toinit-start.
- π± Project Rebranding to TAILCAT ZER0: Officially rebranded to TAILCAT ZER0 with the dedicated CLI command
tailcatzero. - π₯οΈ Non-Interactive CLI Dispatcher: Added
tailcatzerocommand-line subcommands (status,stop [all|SVC],ssh,webgui,update,-v,-h) for seamless headless automation and scripting. - β±οΈ Persistent Mode & Custom Timeout: Enter
0(orpersistent) for non-expiring tunnels without background watchdog overhead, or specify any custom minute duration with interactive in-place input validation. - π Guaranteed Ephemeral Tokens (
--key=new): Enforces--key=newon every session spawn to guarantee fresh, unique cryptographic keys and prevent token reuse. - π Dual Script & Engine Updater: Option 6 (
manage_tailcat_menu) andtailcatzero updatecleanly update both the shell script from GitHub and the official Go engine binary. - π Streamlined 6-Item Menu: Consolidated configuration and maintenance under a dedicated management submenu with active badges and hotkey bar.
- β‘ Multi-Service Concurrency: Full concurrent execution across SSH, File Receiver, SFTP, and WebGUI with independent WireGuard userspace nodes.
- π± Side-by-Side ASCII Cat Header: Clean Japanese minimalist ASCII cat (
β±|γ) paired with project title and subtitle. - βοΈ Dedicated Management Submenu: Interactive menu for updating binaries, reinstalling from GitHub, or cleanly uninstalling.
- π Selective & Batch Process Killer: Interactive process list to terminate specific individual sessions or all active tunnels.
- β¨ Flicker-Free Clean Canvas: VT100 screen clearing with non-intrusive toast notifications.
- β©οΈ Submenu Navigation & Cancellation Support: Added full support for canceling and returning to the main menu using
e/b/cancelfrom Inbox destination selection, SFTP directory/mode prompts, and Auto-Kill timeout configuration.
- π§Ή Active Session Header: Renamed card header to concise
Active Session. - βοΈ Cleaner Status Details: Removed redundant explanations from Auto-Kill and Security metadata rows.
- π‘οΈ Anti-Bleed Snippet Dividers: Replaced fixed-width closed boxes with horizontal rule dividers (
βββ) so long tokens and commands naturally flow without line-wrap border corruption. - β¨οΈ Integrated Bold Underline Hotkeys: Replaced bracketed keys with in-word highlighted hotkeys (Stop Session, Refresh, QR, Main Menu) and merged the prompt into a single inline action bar.
- π¨ High-Contrast Terminal Color Refinements: Upgraded Chat Invite Snippets to high-contrast crisp white (
C_WHITE) and cyan borders (C_CYAN) with highlighted yellow commands (C_YELLOW), ensuring pristine visibility across dark-background terminals.
- π± Live Active Session Card: Dedicated interactive dashboard with live auto-kill countdown, active service details, and 1-key quick actions (
sto stop,rto refresh,qfor QR code,bto exit). - π· Integrated ASCII QR Codes: Direct rendering of ASCII QR codes in terminal via router's built-in
qrencodefor rapid mobile/tablet token capture. - π¬ Ready-to-Paste Chat Snippets: Generates pre-formatted 2-line invite text ready to copy-paste into Discord, Slack, or WhatsApp.
- β‘ Global Contextual Hotkeys: Single-key controls across the menu (
sto stop immediately,tfor timeout,vfor session card). - π― KISS Feature Alignment: Streamlined menu to the 4 core sharing pillars (Shell, File Receiver, SFTP, WebGUI), eliminating unnecessary feature creep.
- πΎ Dynamic USB Storage Detection: Automatically offers mounted USB partitions (
/tmp/mnt/*) for Inbox storage to avoid RAM exhaustion.
- π Instant Remote Shell (Passwordless): Ephemeral WireGuard shell powered by TailCat's native SSH server with capability-based token access (no passwords or SSH keys to configure).
- π₯ Encrypted File Receiver: Write-only peer-to-peer file drop receiver into
/tmp/tailcat-inbox. - π€ SFTP File Share: Read-only directory serving with native SFTP path confinement.
- π WebGUI Remote Port Forwarder: Securely forward local router management WebUI (port 8443).
- β±οΈ Automated 30-Minute Session Auto-Kill: Background supervisor process automatically tears down active sessions when timer expires.
- π¦ Universal ARMv7 & ARM64 Architecture Support: Automatically fetches official
tailscale/tailcatv0.4.0static binaries for all Asuswrt-Merlin routers.
See CHANGELOG.md for full history.
GPL-3.0 License.