portfly
A pure Python implementation of SSH Port Forwarding, includes remote forwarding and local forwarding, featured by non-blocking socket, event IO and UDP forwarding path.
Port Forwarding
Remote Port Forwarding:
Local Port Forwarding:
Installation
$ pip install portfly
Usage
On server side, you need to setup portfly to listen, even udp forwarding path is used:
$ python -m portfly -s server_listen_ip:port
On client side, you control all the details:
# remote forwarding by tcp is the default
$ python -m portfly -c [-x] [--log {INFO|DEBUG} <settings>
# local forwarding by tcp:
$ python -m portfly -c -L <settings>
# local forwarding by udp:
$ python -m portfly -c -L -u <udpport> <settings>
# remote forwarding by udp:
$ python -m portfly -u <udpport> <settings>
The <settings> part is just like ssh, which is:
mapping_port:target_ip:target_port+server_ip:target_port
The extra + can leave the whole parameters unquoted.
Each client process can map only one port to/from server. But server can be connected by many clients simultaneously.
Have Fun... ^____^
Metadata
Release files for portfly 0.30
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| portfly-0.30.tar.gz | 33.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| portfly-0.30-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.2 kB
Release files / portfly-0.30.tar.gz
| Download URL | portfly-0.30.tar.gz |
|---|---|
| Size | 33.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
477a998ae5a9a35a70f1576bae78224c95feef7ab756f530d842d49842bc08f6
|
|
BLAKE2b-256 checksum How to use checksums |
bdd8b7d4dba8b6559685bf1c50ed89400256882225a0de7676293303a8f05705
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.3
|
Release files / portfly-0.30-py3-none-any.whl
| Download URL | portfly-0.30-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f8c309f77fa4f5fc22a3148812e1487ffff396d242fb76a091cc29eab624b9e
|
|
BLAKE2b-256 checksum How to use checksums |
43ed0a870eab0c2c8748dfeae07315dae49cf0fb01a807f5434160b956498755
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.3
|