Skip to main content

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:

remote_port_forwarding

Local 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)

Source distribution for portfly 0.30
File Size Uploaded
portfly-0.30.tar.gz 33.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for portfly 0.30
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

0.36

2 release files

0.35

2 release files

0.34

2 release files

0.33

2 release files

0.32

2 release files

0.31

2 release files

This release

0.30 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page