portfly
A 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 for udp forwarding path:
$ 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.
Metadata
Release files for portfly 0.31
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.31.tar.gz | 33.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| portfly-0.31-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.9 kB
Release files / portfly-0.31.tar.gz
| Download URL | portfly-0.31.tar.gz |
|---|---|
| Size | 33.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e53dad31e4e6667ea054f2d5662313f06a856a101226501cd5ff380c08628007
|
|
BLAKE2b-256 checksum How to use checksums |
c6b0f1735207515a5dff70b45aa70e6a371bf9b9460dc97559f44087803c234d
|
| 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.31-py3-none-any.whl
| Download URL | portfly-0.31-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a06b1b7f0d72e7fafda7b134cac22b5923b31fb659e91d3d462d45929bb1c6a9
|
|
BLAKE2b-256 checksum How to use checksums |
699b2cde751095b9553c03062b32b708c7115566982d56c9a2256569762a2427
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.3
|