Skip to main content

Tunnel V4

A modern tunnel system built on Cloudflare Workers and Durable Objects.

Features

  • 🚀 Remote Terminal - SSH-like terminal access to your servers
  • 📡 SOCKS5 Proxy - Secure proxy through your nodes
  • ⚡ Command Execution - Run commands remotely
  • 🔒 Secure - End-to-end encrypted connections
  • 🌍 Global - Powered by Cloudflare's edge network

Installation

pip install m_tunnel4

Quick Start

Start Agent on Your Server

# Basic usage
tunnel agent --id my-server @all

# With custom tags
tunnel agent --id my-server --tags env=prod,region=us @all

# Specific services only
tunnel agent --id my-server @term @socks5

Use CLI to Connect

# List nodes
tunnel list

# Remote terminal
tunnel term --node my-server

# Execute command
tunnel exec --node my-server "uptime"

# SOCKS5 proxy
tunnel socks5 --node my-server --port 1080

Configuration

Environment Variables

  • TUNNEL_WORKER_URL - Override default Worker URL
  • TUNNEL_ENV - Environment (dev/prod)
  • TUNNEL_DEBUG - Enable debug logging

Custom Worker URL

export TUNNEL_WORKER_URL="wss://your-worker.workers.dev"
tunnel agent --id my-server @all

Services

Built-in Services

  • @all - All services (exec, term, socks5)
  • @exec - Remote command execution
  • @term - Remote terminal
  • @socks5 - SOCKS5 proxy

Port Forwarding

# Forward local service
tunnel agent --id my-server myapi:8080

Development

# Clone repository
git clone https://github.com/yourusername/tunnel-v4.git
cd tunnel-v4

# Install in development mode
export TUNNEL_DEV=1
pip install -e .

# Run agent (development uses tunnel4 command)
tunnel4 agent --id test @all

License

MIT License

Links

Metadata

Release files for m-tunnel4 4.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for m-tunnel4 4.0.3
File Size Uploaded
m_tunnel4-4.0.3.tar.gz 49.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for m-tunnel4 4.0.3
File Interpreter ABI Platform
m_tunnel4-4.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 115.9 kB

Release files / m_tunnel4-4.0.3.tar.gz

Download URL m_tunnel4-4.0.3.tar.gz
Size 49.4 kB
Tags Source
SHA-256 checksum
How to use checksums
a560efa04633adf25fe5b57b519b090b6a3e7c2eba8e9f5a73024d1baa4b4572
BLAKE2b-256 checksum
How to use checksums
e72f95ccfd578cc74ffffae8a5f12c6b2913cd1a729681fdc114489172e7c9bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / m_tunnel4-4.0.3-py3-none-any.whl

Download URL m_tunnel4-4.0.3-py3-none-any.whl
Size 66.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
170c8d883b48ecceb9548dfe4cef6a238974c8ad271bb8ca68a3c3da19b2bb06
BLAKE2b-256 checksum
How to use checksums
47103cc69a6bb06fc08d551dc031aace3b12cfbb0fd5cad864d70173b0debb49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

4.0.3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page