Background Mode

Run tunnels in the background with daemon mode.

Start Tunnel in Background

Add -d flag to run the tunnel as a daemon:

bash
drip http 3000 -d

The tunnel runs in the background and survives terminal closure.

Multiple Background Tunnels

Run several tunnels simultaneously:

bash
drip http 3000 -d
drip http 8080 -n api -d
drip tcp 5432 -d

List Running Tunnels

View all active background tunnels:

bash
drip list

Alternative commands (aliases):

bash
drip ls
drip ps
drip status

Output shows:

  • Tunnel type (HTTP/HTTPS/TCP)
  • Local port
  • Public URL
  • Process ID (PID)
  • Uptime

Interactive Mode

Select tunnels interactively to attach or stop:

bash
drip list -i

This opens an interactive menu where you can:

  • Select a tunnel to attach to its logs
  • Select a tunnel to stop it
  • View tunnel details

View Tunnel Logs

Attach to a running tunnel to see real-time logs:

bash
drip attach http 3000

Alternative commands:

bash
drip logs http 3000
drip tail tcp 5432

Press Ctrl+C to detach (tunnel keeps running).

If you don't specify type and port, you'll be prompted to select from running tunnels.

Stop Tunnels

Stop a specific tunnel:

bash
drip stop http 3000

Stop all running tunnels:

bash
drip stop all

Alternative command:

bash
drip kill http 3000

Daemon Storage

Daemon information is stored in ~/.drip/daemons/:

Info files: {type}_{port}.json

json
{
  "pid": 12345,
  "type": "http",
  "port": 3000,
  "subdomain": "myapp",
  "server": "tunnel.example.com:443",
  "url": "https://myapp.tunnel.example.com",
  "start_time": "2024-01-12T10:30:00Z",
  "executable": "/usr/local/bin/drip"
}

Log files: {type}_{port}.log

Automatic Cleanup

Drip automatically cleans up stale daemon entries when:

  • The process is no longer running
  • The daemon info file is corrupted
  • You run drip list