WEb3Pi Tunnel
PoC Python implementation of a basic TCP tunnel. Primary purpose: provide a public IP to clients behind NATs.
It was initially developed alongside the Web3Pi Proxy. There are two parts of the tunnel: the server which accepts connections from external users and forwards to the client, and the client which forwards connections further to a target service.
Configure and Run
Setup
Simply install web3pi-tunnel package using your Python package manager, using pip for example:
pip install web3pi-tunnel
Configuration
Create the .env file or set the system environments with the following entries.
Server
SERVICE_PUBLIC_IP- the network address of the tunnel serverSERVICE_PUBLIC_LISTEN_PORT- the port of tunnel server for external web3 usersTUNNEL_ESTABLISH_PORT- the port of the tunnel server for the tunnel clientPROXY_ESTABLISH_PORT- the port of the tunnel server for statsTUNNEL_SERVICE_AUTH_KEY- the api key to authenticate the tunnel client, any random character stringUSE_UPNP- should the tunnel server use UPnP for the service, default value isFalse, may be set toTrue, optional
The example of the .env file
SERVICE_PUBLIC_IP=127.0.0.1
SERVICE_PUBLIC_LISTEN_PORT=6512
TUNNEL_ESTABLISH_PORT=7634
PROXY_ESTABLISH_PORT=7835
TUNNEL_SERVICE_AUTH_KEY=aaa
Client
TUNNEL_SERVICE_HOST- the network address of the tunnel serverCLIENT_SERVICE_HOST- the network address of the client target serviceCLIENT_SERVICE_PORT- the port of the client target serviceTUNNEL_ESTABLISH_PORT- the port of the tunnel serverTUNNEL_SERVICE_AUTH_KEY- the api key to authenticate the tunnel client, any random character string
The example of the .env file
TUNNEL_SERVICE_HOST=127.0.0.1
CLIENT_SERVICE_HOST=127.0.0.1
CLIENT_SERVICE_PORT=8545
TUNNEL_ESTABLISH_PORT=7634
TUNNEL_SERVICE_AUTH_KEY=aaa
Run
Server
Execute the command
web3pi_tunnel_server
Client
Execute the command
web3pi_tunnel_client
Metadata
Release files for web3pi-tunnel 0.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 |
|---|---|---|---|---|
| web3pi_tunnel-0.1.tar.gz | 22.2 kB | Without provenance | Details for web3pi_tunnel-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| web3pi_tunnel-0.1-py3-none-any.whl | Python 3 | none | any | Details for web3pi_tunnel-0.1-py3-none-any.whl |
Total release size: 51.5 kB
Release files / web3pi_tunnel-0.1.tar.gz
| Download URL | web3pi_tunnel-0.1.tar.gz |
|---|---|
| Size | 22.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4884dd1b107c1c6bb3eacf5f10bd024153faf44593ad48bd30414d255b1b41b
|
|
BLAKE2b-256 checksum How to use checksums |
7e9b86e604c2f09479e9d10e0c04f0f35722fb1284d05ebc46cd71e5f9085bc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-44-generic
|
Release files / web3pi_tunnel-0.1-py3-none-any.whl
| Download URL | web3pi_tunnel-0.1-py3-none-any.whl |
|---|---|
| Size | 29.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35e51804d8afabc98a64b322173a586f0cf471d3e980326235636e72b2128b7f
|
|
BLAKE2b-256 checksum How to use checksums |
c242576701e9130d81128e7c273e3c441d3ed837e5ccd5c6338318319da89a31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-44-generic
|
Security for web3pi-tunnel 0.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.