PyProxy - Very Simple TCP/UDP Proxy
About
PyProxy is a very simple TCP/UDP pure Python proxy. It can be easily extended for custom data handling logic.
Usage
>pyproxy.py -h
usage: pyproxy.py [-h] (--tcp | --udp) -s SRC -d DST [-q | -v]
TCP/UPD proxy.
optional arguments:
-h, --help show this help message and exit
--tcp TCP proxy
--udp UDP proxy
-s SRC, --src SRC Source IP and port, i.e.: 127.0.0.1:8000
-d DST, --dst DST Destination IP and port, i.e.: 127.0.0.1:8888
-q, --quiet Be quiet
-v, --verbose Be loudCustom data handlers
Proxy uses two data handlers for incoming and outgoing data. By default both are set to identity function.
LOCAL_DATA_HANDLER = lambda x:x
REMOTE_DATA_HANDLER = lambda x:xOne can easily implement own rules. It might be very useful while testing network applications.
def custom_data_handler(data):
# code goes here
pass
LOCAL_DATA_HANDLER = custom_data_handler
REMOTE_DATA_HANDLER = lambda x:'constant_value'License
Code is released under MIT license © Radoslaw '[rsc]' Matusiak.

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
