Relay data between clients using a central server
Project description
# 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.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
p22p-0.4.2.tar.gz
(21.9 kB
view details)
Built Distribution
p22p-0.4.2-py2-none-any.whl
(27.7 kB
view details)
File details
Details for the file p22p-0.4.2.tar.gz
.
File metadata
- Download URL: p22p-0.4.2.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ce8f13354737024cd3bada571c061320b4463b50ed1da40447bba910340732c |
|
MD5 | 4372cab6af95c999b8973412a9d378b7 |
|
BLAKE2b-256 | 0b14d68935f48f4244f1d24be95e8cad834446331b4aa6fba1aa6be7572a781b |
File details
Details for the file p22p-0.4.2-py2-none-any.whl
.
File metadata
- Download URL: p22p-0.4.2-py2-none-any.whl
- Upload date:
- Size: 27.7 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6bdb6e787fdf8200cb6b5574d1f15bc377a211221966288d0774ebdaf971af8 |
|
MD5 | c6fbffcb7664279df9320948ff23eb53 |
|
BLAKE2b-256 | 1af056074cbfff80d9c03eb9bc3a353186e1b0e059326d70fe7f5b0c0f2bedc2 |