This package implements a simple HTTP(S) proxy.
Project description
SimpleHttpProxy
Description
This package implements a simple and partially asynchronous HTTP(S) proxy.
Requirements
This package require:
- python3
- python3 Standard Library
Installation
pip install SimpleHttpProxy
Usages
Default proxy printer using command line
python3 SimpleHttpProxy.py -h
python3 ProxyPrinter.pyz --help
ProxyPrinter --interface 0.0.0.0 --port 8012 --unsecure
ProxyPrinter -i 0.0.0.0 -p 8012 -s
Custom proxy using Python
from SimpleHttpProxy import AbcHttpProxy
class ProxyRestrict(AbcHttpProxy):
@staticmethod
def handle_request(data: bytes) -> bytes:
if b'://www.ruby-lang.org' in data.split(b"\r\n", 1)[0]:
return data.replace(b'www.ruby-lang.org', b'www.python.org', 2)
return data
@staticmethod
def handle_response(data: bytes) -> bytes:
return data.replace(b'www.ruby-lang.org', b'python.org')
Screenshot
Links
Licence
Licensed under the GPL, version 3.
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
SimpleHttpProxy-0.0.1.tar.gz
(5.4 kB
view hashes)