AiTun
AiTun - Secure tunnel service that exposes local servers to the public internet, supporting IPv6/IPv4 P2P and relay modes.
Installation
pip install aitun
Usage
# Quick start - expose local port 8080 (free tunnel, no sign-up)
aitun -p 8080
# With explicit server
aitun -s aitun.cc:6639 -p 8080
# With auth token (registered subdomain)
aitun -k YOUR_TOKEN -p 8080
# With TCP forwarding (SSH + MySQL)
aitun -k YOUR_TOKEN -p 8080 --tcp-ports 22,3306
# Run as daemon
aitun -p 80 --daemon
# Stop daemon
aitun --stop
CLI Flags
| Flag | Description |
|---|---|
-p PORT |
Local service port (default: 0 = no HTTP port; TCP-only mode with --tcp-ports) |
-k TOKEN |
Auth token for registered subdomain (omit for free tunnel) |
-s SERVER |
Server address (default: aitun.cc:6639) |
--host HOST |
Local service address (default: localhost) |
--tcp-ports PORTS |
TCP forwarding ports, comma-separated (requires -k) |
--p2p |
Enable P2P direct connection (default: enabled) |
--no-p2p |
Disable P2P, force server relay mode |
--daemon |
Run as background daemon |
--stop |
Stop running daemon |
Modes
- Free Tunnel: Instant proxy URL like
aitun.cc/abc123(no sign-up, 24h validity) - Subdomain: Custom subdomain like
myapp.t.aitun.cc(HTTPS, requires sign-in) - Short Domain: Short subdomain like
myapp.aitun.cc(requires sign-in) - TCP Forwarding: Forward SSH, MySQL, etc. via SNI routing (requires
-kand--tcp-ports) - SSH ProxyCommand: Use
aitun ssh-proxy host.t.aitun.cc 22to wrap SSH in TLS for subdomain routing
License
MIT
Release files for aitun 4.9.34
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aitun-4.9.34.tar.gz | 32.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aitun-4.9.34-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 65.0 MB
Release files / aitun-4.9.34.tar.gz
| Download URL | aitun-4.9.34.tar.gz |
|---|---|
| Size | 32.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
654132f25c972463fb68a7814d03fa6c1e39cabf7089b8f8e37c3f088dbfd9fb
|
|
BLAKE2b-256 checksum How to use checksums |
4315d61cc3af6ee567018963dcf1b6ffa7362162e50d9ca1836bae1998888975
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / aitun-4.9.34-py3-none-any.whl
| Download URL | aitun-4.9.34-py3-none-any.whl |
|---|---|
| Size | 32.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
76342b18c1aac7d9ac4a150b49ebf394ef3610fd4a4cbbffbd09f0ad35d83ebb
|
|
BLAKE2b-256 checksum How to use checksums |
87d151ae74b9ae7efb57d28acb576e85bdb1461ce74e08a4f16d08f0b6bfc61c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|