Remote/Local port forwarding in Python by TCP/UDP
Project description
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... ^____^
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file portfly-0.30.tar.gz
.
File metadata
- Download URL: portfly-0.30.tar.gz
- Upload date:
- Size: 33.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 477a998ae5a9a35a70f1576bae78224c95feef7ab756f530d842d49842bc08f6 |
|
MD5 | 3c0cc148039516acb00f7a795001ea9d |
|
BLAKE2b-256 | bdd8b7d4dba8b6559685bf1c50ed89400256882225a0de7676293303a8f05705 |
File details
Details for the file portfly-0.30-py3-none-any.whl
.
File metadata
- Download URL: portfly-0.30-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f8c309f77fa4f5fc22a3148812e1487ffff396d242fb76a091cc29eab624b9e |
|
MD5 | ea126c477743caeb81842c3554f793f9 |
|
BLAKE2b-256 | 43ed0a870eab0c2c8748dfeae07315dae49cf0fb01a807f5434160b956498755 |