Skip to main content
# p22p
Relay data between two clients using a central server.
This is usefull if you want two programs to communicate, which would normally be blocked by a firewall of a router/proxy.
For example, if you want to play a Game with a friend, but the firewall of your/your friends router would block incomming connections, you could both use p22p to connect to the central server and bypass the restriction (both connections would be outgoing). This only works if your router/proxy allows outgoing connections.

# Features
- Relay any number of socket-connections using one connection
- clients have a default server configured
- can be used from commandline, GUI or python
- old pure-socket version available
- create any number of password protected groups with up to 65535 clients
- communication between groupmembers is compressed and encrypted with group password (=server cant read data, he only has a hashed version of the pswd)
- command-line-interface (command-line arguments and command-loop)
- asynchronous (=highly scaleable, no thread-overhead)
- create reserved groups (clients get json-data required to create a group)
- reserved groups can be configured to only allow data exchange between group-creator and the other clients (no connection between other clients allowed)
- pypy compatible (=higher performance)
- buitin help
- designed for TCP
- you can use any twisted endpoint to connect to the server.

# Features in v0.3
Due to a full rewrite, v0.4 does not support all the features of v0.3. Here is a list of additional features in v0.3
- uses websockets (you can still use them in v0.4 using the `-e` parameter)
- commandloop

# Requirements
P22P requires python 2.7.X (not tested with 3.X.X). Get it here: https://www.python.org/downloads/release/python-2711/
P22P requires the following packages from pypi:
- twisted

You can install these requirements by running `pip -r requirements.txt`.
If you dont have pip installed, see https://pip.pypa.io/en/latest/installing/ for a tutorial on installing pip.

# Installation
1. Install `python2.7` and `pip`.
2. In a console, type `pip install p22p`.

# Launching P22P
1. Open a Console/Shell
- **Windows:** Press `Windows`and `r` at the same time, then type `cmd` and press enter.
- **Linux:** If you are a linux user, you probably already know how to open a shell.
2. Start P22P:
a) Type `p22p --help` (insert the path to the `client.py` file there) to see a list of available commands
b) Type `p22p gui`
3. Done

# Security Warning
**Keep your Group Password secret! Only join Groups where you can thrust the other clients!**
Anyone in the group can open a connection between his computer and any port on your computer.
Because the connection to the target-port on your computer is opened localy, even programs only accepting connections from `localhost` may accept the connection.
`Reserved Groups` can be created with the option to disable connections between non-creator clients. This is usefull for groups where you cant thrust everyone. However, you should not rely on this security-feature.
**Always use the latest Version** unless you have a good reason to use an old version (e.g. requires the use of normal sockets)
Old Versions may be unstable and/or contain security issues

# Tipps
- you can improve performance by using pypy.
- There is a script to build an exe from the source. This requires `pyinstaller`.

# Versions
At the time of uploading the p22p-scripts, there have already been some versions.
Here are the most notable changes:
- `v0.1` is the original version. It uses a socket-select combo to achieve high efficency. It is unstable, only allows connections between two clients but has the best performance. It does not require any dependencies.
- `v0.2` is a complete rewrite from scratch. It now allows the use of Groups, uses websockets (autobahn+twisted).
- `v0.3` is based on `v0.2`. The most important new feature is the ability to reserve groups.
- `v0.4` is a complete rewrite from scratch. It offers nearly the same functionality as `v0.3`, but no interactie commandloop. It no longer uses websockets and is now fully asynchronous. It also adds a GUI for the client.

Metadata

Release files for p22p 0.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for p22p 0.4.2
File Size Uploaded Provenance
p22p-0.4.2.tar.gz 21.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for p22p 0.4.2
File Interpreter ABI Platform
p22p-0.4.2-py2-none-any.whl Python 2 none any Details

Total release size: 49.6 kB

Release files / p22p-0.4.2.tar.gz

Download URL p22p-0.4.2.tar.gz
Size 21.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7ce8f13354737024cd3bada571c061320b4463b50ed1da40447bba910340732c
BLAKE2b-256 checksum
How to use checksums
0b14d68935f48f4244f1d24be95e8cad834446331b4aa6fba1aa6be7572a781b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / p22p-0.4.2-py2-none-any.whl

Download URL p22p-0.4.2-py2-none-any.whl
Size 27.7 kB
Tags Python 2
SHA-256 checksum
How to use checksums
d6bdb6e787fdf8200cb6b5574d1f15bc377a211221966288d0774ebdaf971af8
BLAKE2b-256 checksum
How to use checksums
1af056074cbfff80d9c03eb9bc3a353186e1b0e059326d70fe7f5b0c0f2bedc2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for p22p 0.4.2

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.

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