etunnel for Python
websocket-client based.
Zero registration: every SDK client speaks the same tiny wire protocol
(PROTOCOL.md) against any etunnel server
(default wss://t.etun.uk/tunnel).
Install
pip install etunnel
Python >= 3.8 (websocket-client installed automatically).
CLI
etunnel 3000
Prints TUNNEL_URL: https://<subdomain>.t.etun.uk — that URL now routes to
your local service. Ctrl-C closes the tunnel.
Reconnects automatically. If the connection drops (including a server
restart) the CLI re-dials with exponential backoff (500ms → 30s, ±20%
jitter, reset on success) and prints TUNNEL_URL: again. The subdomain is
reclaimed, not re-randomised: the client replays the server's signed
resumeToken in hello.resume, so links already shared keep working (the
server needs a stable SESSION_SECRET; see PROTOCOL.md §1). Set
ETUNNEL_RECONNECT=0 to restore the old one-shot behaviour.
Embed
from etunnel import connect
t = connect("wss://t.etun.uk/tunnel", 3000, {})
print(t["url"])
Environment variables
| Variable | Meaning | Default |
|---|---|---|
ETUNNEL_SERVER |
tunnel server WebSocket URL | wss://t.etun.uk/tunnel |
ETUNNEL_LOCAL |
local port or host:port (or 1st CLI arg) |
3000 |
ETUNNEL_TOKEN |
paid-plan API key (optional) | - |
ETUNNEL_RECONNECT |
0 disables auto-reconnect (one-shot CLI) |
enabled |
ETUNNEL_SUBDOMAIN |
custom subdomain (paid plans) | random |
License
MIT — see LICENSE. Buffer-based protocol client: request and response bodies are buffered per stream (fine for webhooks/dashboards/demos; use the Go SDK for streaming and WebSocket pass-through).
Metadata
Release files for etunnel 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| etunnel-1.3.1.tar.gz | 6.4 kB | With provenance | Details for etunnel-1.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| etunnel-1.3.1-py3-none-any.whl | Python 3 | none | any | Details for etunnel-1.3.1-py3-none-any.whl |
Total release size: 13.1 kB
Release files / etunnel-1.3.1.tar.gz
| Download URL | etunnel-1.3.1.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92cfad80bcf6f86e4c37e3ab94a6d84778420d31dc8d1c1d92908ad263fea542
|
|
BLAKE2b-256 checksum How to use checksums |
59d5b391ae748341eece1257da6b8be795c649e8ac92144e52b72b51d11906c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / etunnel-1.3.1-py3-none-any.whl
| Download URL | etunnel-1.3.1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3fb4595e3f5fed5867f9b70946c03ff8769d6d568bbe628d8e30e50a4c43552c
|
|
BLAKE2b-256 checksum How to use checksums |
0be421b5c03b5ba6250df5f7f683ff9b4c11b439ae5bf07000e8594324ea92c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for etunnel 1.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for etunnel-1.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.