Skip to content

Repository files navigation

tunk - Docker-like Tunnel Manager

Simple, declarative, scalable tunnel management

tunk is a daemon-based tunnel manager with a client-daemon architecture. It manages SSH tunnels through a plugin-based backend system, allowing you to define tunnels declaratively and control them via CLI.

Quick Start

# Install (requires systemd)
curl -fsSL https://raw.githubusercontent.com/s0mecode/tunk/refs/heads/main/install-systemd.sh | bash

# Create a backend config ( ~/.config/tunk/backends/my-ssh.ron )
SecureShell(
  (ip: "1.2.3.4", port: 22),
  (username: "user", key_path: Some("/home/user/.ssh/id_rsa"), password: None),
)

# Create a tunnel config ( ~/.config/tunk/tunnels/web.ron )
(
  backends: [File("my-ssh")],
  direction: Reverse,
  local: (ip: "127.0.0.1", port: 8080),
  remote: (ip: "0.0.0.0", port: 80),
)

# Manage tunnels
tunk list          # List all tunnels
tunk start web     # Start tunnel
tunk stop web      # Stop tunnel
tunk restart web   # Restart tunnel
tunk status web    # Check status
tunk reload        # Reload configs

Architecture

  • tunk (CLI): Client sending commands to daemon via Unix socket
  • tunkd (Daemon): Manages tunnel lifecycle, handles auto-restart
  • tunk-backends: Pluggable tunnel providers (SSH supported)

Documentation

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages