Skip to main content

Multi Purpose UDP, TCP, TCP/SSL Proxy for python

Project description

Python Proxy

Multi Purpose UDP, TCP, TCP/SSL Proxy for python

Python Proxy is a proxy library made for python for security minded individuals, or just people wanting to proxy their traffic, This proxy has implementation for different protocols such as UDP, TCP, and TCP/SSL.

Installation

Python Proxy can be installed from pip with pip install Python_Proxy

Usage

To use the library, import it in your python script. Udp:

from Python_Proxy import UdpProxy

proxy = UdpProxy('127.0.0.1', 4444, '192.168.18.218', 4444)
proxy.run()

TCP:

from Python_Proxy import TcpProxy

proxy = TcpProxy('127.0.0.1', 4444, '192.168.18.218', 4444)
proxy.run()

SSL: For ssl, you have to generate your own certificate files first. This certificate file will be used by the proxy server, and you also have to install the generated certificate as trusted root ca in your computer. For the generation of certificate files, i created a script named GenerateCertificates.py. Create the Certificate files python -m Python_Proxy.GenerateCertificates -H host.com -I 127.0.0.1 -o certs

from Python_Proxy import TcpSslProxy

proxy = TcpSslProxy('127.0.0.1', 443, '<REMOTE_IP>', 443, 'host.com', '.\certs\server.crt', '.\certs\server.key')
proxy.run()

You can also add a custom callback on all the proxies, that allow you to read and modify the data being sent/recieve. Callbacks functions should accept 2 parameters, data, which is the data sent/recieved and toServer which indiciates where the data is going

from Python_Proxy import UdpProxy

def customCallback(data, toServer):
    if(toServer):
        data = b"MODIFIED"
    return data
    
proxy = UdpProxy('127.0.0.1', 4444, '192.168.18.218', 4444, callback=customCallback)
proxy.run()

"Buy Me A Coffee"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Python_Proxy-0.0.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Python_Proxy-0.0.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file Python_Proxy-0.0.1.tar.gz.

File metadata

  • Download URL: Python_Proxy-0.0.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for Python_Proxy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1a84f31782377dabd1c47a737830d93d8a784e5f92d8884b5b6c5d4c36276f37
MD5 1fc267444281514a24fa32d7e5bed656
BLAKE2b-256 84d72412ac0b82fdbe37d0142a9b764c20d1430b85b1d07eb233e4cfeed93ba4

See more details on using hashes here.

File details

Details for the file Python_Proxy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: Python_Proxy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for Python_Proxy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2dc17875f7ebd4527c55a72ce4c214784f80677fce6ca0c9f2145b54369205b1
MD5 269fb42fef71c2ad26bc46df7013ddbf
BLAKE2b-256 b92b896e75b6c5b61a8c1c1b84c86636a7c17c49848b6e45ea75cc3fe3e24298

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page