Tunnel through barriers, instantly - expose local services to the internet
Project description
Tunnel through barriers, instantly
Expose localhost to the internet. One command. Zero config.
Open source - Self-hostable - Enterprise security - Free forever
pip install instanton && instanton --port 8000
That's it. You now have a public HTTPS URL. No signup. No config files. No BS.
Quick Start - Why Instanton - Features - Benchmarks - Deployment - Configuration
The Problem
You're building something awesome on localhost:8000. Now you need to:
- Share it with a client
- Test webhooks from Stripe/GitHub
- Demo to your team
- Debug a mobile app
The old way: Port forwarding, firewall rules, dynamic DNS, SSL certificates, nginx configs...
The Instanton way:
instanton --port 8000
⚡ Instanton v1.0.0
✓ Tunnel established
✓ HTTPS certificate provisioned
Public URL: https://abc123.instanton.tech
Forwarding: https://abc123.instanton.tech → http://localhost:8000
Inspector: http://localhost:4040
Press Ctrl+C to stop
Why Instanton?
What ngrok charges $240/year for...
|
Instanton gives you free. Forever.Plus:
|
Feature Comparison
| Instanton | ngrok | Cloudflare Tunnel | tunnelto | |
|---|---|---|---|---|
| Open Source | ✅ Full | ❌ | ❌ | ✅ |
| Self-Hostable | ✅ | ❌ | ❌ | ✅ |
| HTTP/3 (QUIC) | ✅ | ❌ | ✅ | ❌ |
| Zero Trust | ✅ Free | ❌ | $7/user/mo | ❌ |
| Load Balancing | ✅ 9 algos | ⚠️ Limited¹ | ✅ Via LB² | ❌ |
| DDoS Protection | ✅ | Paid | ✅ | ❌ |
| Traffic Inspector | ✅ | Paid | ❌ | ⚠️ Basic |
| Native Python SDK | ✅ | ❌ | ❌ | ❌ |
| TCP/UDP Tunnels | ✅ | ✅ | ✅ | ❌ |
| Price | $0 | $10-65+/mo | $0-7/user | $0-4/mo³ |
¹ ngrok: Endpoint Pooling with equal distribution only (custom algorithms coming soon)
² Cloudflare Tunnel: Via Cloudflare Load Balancing integration
³ tunnelto: Free basic usage, $4/mo for 20 custom subdomains
Quick Start
Installation
pip install instanton
HTTP Tunnel
# Basic - expose port 8000
instanton --port 8000
# Custom subdomain
instanton --port 8000 --subdomain myapp
# With traffic inspector
instanton --port 8000 --inspect
TCP Tunnel (Databases, SSH)
# PostgreSQL
instanton tcp 5432
# MySQL
instanton tcp 3306
# SSH
instanton tcp 22
UDP Tunnel (Gaming, VoIP, DNS)
# Game server
instanton udp 27015
# DNS
instanton udp 53
Python SDK
import instanton
# Async context manager
async with instanton.forward(8000) as tunnel:
print(f"Public URL: {tunnel.url}")
# Your app is now accessible at tunnel.url
await your_app.run()
# Sync API
tunnel = instanton.forward_sync(8000)
print(tunnel.url)
Long-Running APIs (AI, Streaming)
# No timeout - perfect for AI inference, video streaming
instanton --port 8000 --no-request-timeout
Features
🚀 Performance
|
🔐 Security
|
📊 Observability
|
⚖️ Load Balancing9 algorithms:
|
🔌 Protocols
|
🛠️ Developer Experience
|
Benchmarks
| Metric | Instanton | ngrok | Cloudflare | Winner |
|---|---|---|---|---|
| Latency | 5ms | 15ms | 10ms | 🏆 Instanton |
| Throughput | 1.2 Gbps | 500 Mbps | 1 Gbps | 🏆 Instanton |
| Connections/sec | 6,500 | 1,000 | 3,000 | 🏆 Instanton |
| Memory (idle) | 35 MB | 50 MB | 30 MB | Cloudflare |
| Cold Start | 250ms | 2s | 3s | 🏆 Instanton |
How we achieve this:
┌─────────────────────────────────────────────────────────────────┐
│ INSTANTON ARCHITECTURE │
├─────────────────────────────────────────────────────────────────┤
│ │
│ Client Relay Server Origin │
│ │ │ │ │
│ │◄──── QUIC/HTTP3 ─────────►│◄────── HTTP/WS ───────►│ │
│ │ (0-RTT, multiplexed) │ (pooled) │ │
│ │ │ │ │
│ │ ┌─────────────────────┐ │ │ │
│ │ │ • LZ4 compression │ │ │ │
│ │ │ • Connection pool │ │ │ │
│ │ │ • Zero-copy buffers │ │ │ │
│ │ │ • uvloop (Linux) │ │ │ │
│ │ └─────────────────────┘ │ │ │
│ │
└─────────────────────────────────────────────────────────────────┘
Zero Trust Security
ZERO TRUST ARCHITECTURE
┌──────────────────────────────────────────────────────────────────┐
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ Identity │───►│ Device │───►│ Risk │───►│ Access │ │
│ │ Verify │ │ Posture │ │ Score │ │ Decision │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ │
│ Trust Levels: │
│ ═══════════════════════════════════════════════════════════ │
│ UNTRUSTED ──► LOW ──► MEDIUM ──► HIGH ──► VERIFIED │
│ │ │ │ │ │ │
│ ▼ ▼ ▼ ▼ ▼ │
│ Block Limited Standard Extended Full │
│ Access Access Access Access │
│ │
└──────────────────────────────────────────────────────────────────┘
|
🔒 TLS 1.3 ECDHE + AES-GCM ChaCha20-Poly1305 Certificate pinning Perfect forward secrecy |
🛡️ DDoS Protection Rate limiting (3 algorithms) Bot detection IP reputation scoring Geo-blocking Slowloris mitigation |
🔑 Authentication JWT (HS256, RS256) OAuth2 / OIDC mTLS certificates API keys (Argon2) Basic auth |
Deployment
Docker
# Run the relay server
docker run -d \
--name instanton-server \
-p 443:443 \
-p 80:80 \
-e INSTANTON_DOMAIN=tunnel.example.com \
-v instanton-certs:/app/certs \
ghcr.io/drruin/instanton-server:latest
Docker Compose
version: '3.8'
services:
instanton:
image: ghcr.io/drruin/instanton-server:latest
ports:
- "443:443"
- "80:80"
environment:
- INSTANTON_DOMAIN=tunnel.example.com
volumes:
- certs:/app/certs
restart: unless-stopped
volumes:
certs:
Kubernetes (Helm)
# Add the Helm repository
helm repo add instanton https://drruin.github.io/instanton
helm repo update
# Install
helm install instanton instanton/instanton-server \
--set domain=tunnel.example.com \
--set ingress.enabled=true
Kubernetes (Manual)
kubectl apply -f https://raw.githubusercontent.com/DrRuin/instanton/main/deploy/k8s/
Configuration
CLI Options
instanton --help
Options:
--port INTEGER Local port to expose [required]
--subdomain TEXT Request specific subdomain
--server TEXT Relay server address
--auth-token TEXT Authentication token
--timeout INTEGER Connection timeout (seconds) [default: 30]
--idle-timeout INTEGER Idle timeout (seconds) [default: 300]
--no-request-timeout Disable request timeout (for long-running APIs)
--inspect Enable traffic inspector at localhost:4040
--quic / --no-quic Use QUIC transport [default: enabled]
--verbose Enable verbose logging
--version Show version
--help Show this message
Environment Variables
export INSTANTON_SERVER=relay.example.com
export INSTANTON_AUTH_TOKEN=your-token
export INSTANTON_DOMAIN=tunnel.example.com
export INSTANTON_LOG_LEVEL=info
Config File (instanton.yaml)
server: relay.example.com
auth_token: ${INSTANTON_AUTH_TOKEN}
tunnels:
web:
port: 8000
subdomain: myapp
api:
port: 3000
subdomain: api
no_request_timeout: true
db:
type: tcp
port: 5432
Testing
# Clone the repository
git clone https://github.com/DrRuin/instanton.git
cd instanton
# Install development dependencies
pip install -e ".[dev]"
# Run all tests (1000+)
pytest tests/ -v
# Run with coverage
pytest tests/ -v --cov=instanton --cov-report=html
# Run specific test categories
pytest tests/test_protocol.py -v
pytest tests/test_security.py -v
pytest tests/test_loadbalancer.py -v
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
# Fork and clone
git clone https://github.com/YOUR_USERNAME/instanton.git
cd instanton
# Create a branch
git checkout -b feature/amazing-feature
# Make your changes, then test
pytest tests/ -v
ruff check src/
ruff format src/
# Commit and push
git commit -m "Add amazing feature"
git push origin feature/amazing-feature
# Open a Pull Request
Roadmap
- HTTP/HTTPS tunnels
- TCP/UDP tunnels
- QUIC/HTTP3 transport
- Zero Trust security
- 9 load balancing algorithms
- DDoS protection
- Traffic inspector
- Prometheus metrics
- OpenTelemetry tracing
- Docker & Kubernetes
- Helm charts
- Python SDK
- SAML authentication
- Web dashboard
- Terraform provider
- VS Code extension
License
MIT License - see LICENSE for details.
Life's too short for port forwarding and firewall configs.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file instanton-0.4.0.tar.gz.
File metadata
- Download URL: instanton-0.4.0.tar.gz
- Upload date:
- Size: 731.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b15931a5ace541445b5011a2273a9555766f24ce14040288e33aabc536c38b6
|
|
| MD5 |
690730acb41bf75dd83f4607ba322265
|
|
| BLAKE2b-256 |
e901b135da8f781e3494a4626f12d2e38e8a80f20390ab42c3510cb76ae9e0d6
|
Provenance
The following attestation bundles were made for instanton-0.4.0.tar.gz:
Publisher:
release.yml on DrRuin/instanton
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
instanton-0.4.0.tar.gz -
Subject digest:
2b15931a5ace541445b5011a2273a9555766f24ce14040288e33aabc536c38b6 - Sigstore transparency entry: 812077427
- Sigstore integration time:
-
Permalink:
DrRuin/instanton@5f49563dbc1220b6f5c67e564f26be8d8f1c8708 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/DrRuin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5f49563dbc1220b6f5c67e564f26be8d8f1c8708 -
Trigger Event:
release
-
Statement type:
File details
Details for the file instanton-0.4.0-py3-none-any.whl.
File metadata
- Download URL: instanton-0.4.0-py3-none-any.whl
- Upload date:
- Size: 253.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34cbe75a811a7f08b14332b069de4d9c11b92c2ef87b753fb21c7490c91ddf40
|
|
| MD5 |
42fea3599d407d2cb80b12a53077c679
|
|
| BLAKE2b-256 |
c9326967fb74c6af83ba86a72a92cecf209f014996d1ee23c4c068f247bb76b5
|
Provenance
The following attestation bundles were made for instanton-0.4.0-py3-none-any.whl:
Publisher:
release.yml on DrRuin/instanton
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
instanton-0.4.0-py3-none-any.whl -
Subject digest:
34cbe75a811a7f08b14332b069de4d9c11b92c2ef87b753fb21c7490c91ddf40 - Sigstore transparency entry: 812077467
- Sigstore integration time:
-
Permalink:
DrRuin/instanton@5f49563dbc1220b6f5c67e564f26be8d8f1c8708 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/DrRuin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5f49563dbc1220b6f5c67e564f26be8d8f1c8708 -
Trigger Event:
release
-
Statement type: