No description
- C 96.7%
- Shell 2.5%
- Makefile 0.8%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| init | ||
| src | ||
| .gitignore | ||
| Makefile | ||
| README.md | ||
TunnelD
High-performance, lightweight SSH Port Forwarding & Caddy Reverse Proxy Daemon written in C.
Features
- Zero-runtime dependencies: Standard POSIX C + SQLite3.
- Embedded WebUI: Monospace dark carbon dashboard with real-time tunnel control.
- Modes:
- Remote Reverse (
-R): expose local service (localhost:20128,192.168.1.1:8080) to remote SSH server port. - Local Forward (
-L): access remote port locally. - Dynamic Proxy (
-D): SOCKS5 proxy over SSH.
- Remote Reverse (
- Process Supervisor: Background
sshprocess management with autostart and crash keepalive. - Caddy Integration: Automatic Caddy reverse-proxy snippet generation (
/etc/caddy/Caddyfile.d/tunneld.caddy) and live reload. - DNS Helper: Detects public IPv4/IPv6 and displays DNS A/AAAA records.
- Native Daemonization: Full double-fork, setsid, PID file, and signal handling (
SIGCHLD,SIGTERM,SIGINT).
Build & Install
make
sudo make install
CLI Usage
tunneld [options]
Options:
-d, --daemon Run in background as Unix daemon
-p, --port <port> HTTP WebUI port (default: 8888)
-b, --bind <ip> Bind IP address (default: 0.0.0.0)
-u, --user <user> Basic Auth user (default: admin)
-w, --pass <pass> Basic Auth password (default: admin123)
-D, --db <path> SQLite database path (default: /var/lib/tunneld/tunnels.db)
-P, --pidfile <path> PID file path (default: /run/tunneld.pid)
-c, --caddy <path> Caddy snippet path (default: /etc/caddy/Caddyfile.d/tunneld.caddy)
Init Scripts Included
- systemd:
init/systemd/tunneld.service->/etc/systemd/system/ - OpenRC:
init/openrc/tunneld.initd->/etc/init.d/tunneld - SysVinit:
init/sysvinit/tunneld.init->/etc/init.d/tunneld - runit:
init/runit/run->/etc/sv/tunneld/run - dinit:
init/dinit/tunneld.dinit->/etc/dinit.d/tunneld - launchd:
init/launchd/com.tunneld.plist->/Library/LaunchDaemons/