Github Page: https://github.com/masoudir/simple_udp_proxy
Introduction to simple_udp_proxy
This is a python implementation of the simple_udp_proxy. This code, automatically creates a bidirectional bridge between new udp connections to a unique udp port by creating a proxy for each new connection. The total structure of this proxy is illustrated as below:
This package could be used for every UDP nodes and also every nodes using MAVLink protocol such as MAVProxy, MissionPlanner, Ardupilot-SITL, PX4-SITL and etc. This package will be very useful for devices that use one port number for UDP broadcasting, so that you can use different client UDP applications for receiving their UDP packets separately.
Installation
Installing via pip
Just follow these codes:
pip install -U simple_udp_proxy
or
pip3 install -U simple_udp_proxy
The -U parameter allow to update simple_udp_proxy version if it is already installed.
Installing via git
Just clone the project:
git clone https://github.com/masoudir/simple_udp_proxy
How to use
Commands
python3 simple-udp-proxy.py -h- Shows available commands for help.python3 simple-udp-proxy.py --i [INPUT_PORT]- Input UDP port (default = 14550).python3 simple-udp-proxy.py --o [OUTPUT_PORT]- Initial UDP output port (Other UDP ports start from this UDP port with the incremental of 1) (default = 1220).python3 simple-udp-proxy.py --verbose [VERBOSE]- D: Disable Verbose, 1: Enable Verbose (Make all output logs visible).python3 simple-udp-proxy.py --log [LOG]- 0: Disable Logging, 1: Enable Logging.
Example:
python3 simple-udp-proxy.py --i 14520 --o 4520 --log 1 -- verbose 1- Creates a proxy in 14520 UDP port and forwards to ports starting from 4520
The structure would be as follow:
client node with port 5678 <---> PROXY in 14520 port <---> APPLICATION#1 host access port with 4520 port
client node with port 7852 <---> PROXY in 14520 port <---> APPLICATION#2 host access port with 4521 port
...
...
...
Python code
Just follow "test/test.py" as below:
python3 test/test.py
This code creates a new UDP port while a new incoming UDP port wants to send data to the host UDP port which is set on 14550.
The code is as below:
from simple_udp_proxy import simple_udp_proxy as px
px.is_verbose = True
px.is_log_enabled = True
proxy = px.UdpProxy(in_port=14550, out_port=1220, buf_size=1024)
while True:
pass
License
The source code generated by Masoud Iranmehr (@masoudir) is available under the permissive MIT License.
Metadata
Release files for simple-udp-proxy 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| simple_udp_proxy-0.0.4.tar.gz | 3.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_udp_proxy-0.0.4-py2-none-any.whl | Python 2 | none | any | Details |
Total release size: 8.4 kB
Release files / simple_udp_proxy-0.0.4.tar.gz
| Download URL | simple_udp_proxy-0.0.4.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
181deb731d2f741576f1c7871084284ad3ba5e50606ecc777c720a92d880b767
|
|
BLAKE2b-256 checksum How to use checksums |
1b1679e4f4d2cca189f771b6f7c51656c834ba75599601a562d9fde7fbf74ffb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.6.0 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/2.7.17
|
Release files / simple_udp_proxy-0.0.4-py2-none-any.whl
| Download URL | simple_udp_proxy-0.0.4-py2-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
ee76728c163a7c429bd2b9981ad13260756df736733642b84dc389e224d481ee
|
|
BLAKE2b-256 checksum How to use checksums |
2c35f1600cd1b4c83a7a406c092a253f6a70798dfbe1081025d3bc5c8ff02e5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.6.0 requests/2.24.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/2.7.17
|
Security for simple-udp-proxy 0.0.4
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.