SimpleHttpProxy
Description
This package implements a simple and partially asynchronous HTTP(S) proxy.
Requirements
This package require:
- python3
- python3 Standard Library
Installation
Pip
python3 -m pip install SimpleHttpProxy
Git
git clone "https://github.com/mauricelambert/SimpleHttpProxy.git"
cd "SimpleHttpProxy"
python3 -m pip install .
Wget
wget https://github.com/mauricelambert/SimpleHttpProxy/archive/refs/heads/main.zip
unzip main.zip
cd SimpleHttpProxy-main
python3 -m pip install .
cURL
curl -O https://github.com/mauricelambert/SimpleHttpProxy/archive/refs/heads/main.zip
unzip main.zip
cd SimpleHttpProxy-main
python3 -m pip install .
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
Proxy Server:
from SimpleHttpProxy import AbcHttpProxy
class ProxyRestrict(AbcHttpProxy):
def handle_request(self, 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
def handle_response(self, data: bytes) -> bytes:
return data.replace(b'www.ruby-lang.org', b'www.python.org')
proxy = ProxyRestrict()
proxy.start()
Python Client:
from urllib.request import Request, urlopen
r = Request("http://ruby-lang.org/")
r.set_proxy('127.0.0.1:8012', 'http')
print(urlopen(r).read()[3150:4000].decode())
Screenshots
Links
Licence
Licensed under the GPL, version 3.
Metadata
Release files for SimpleHttpProxy 0.0.3
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 | Actions |
|---|---|---|---|---|
| simplehttpproxy-0.0.3.tar.gz | 18.9 kB | Without provenance | Details for simplehttpproxy-0.0.3.tar.gz |
Release files / simplehttpproxy-0.0.3.tar.gz
| Download URL | simplehttpproxy-0.0.3.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0c02e50bce7816e1aa7b3942a89ce5d2820ae29d698d13371f0686ee016b09d
|
|
BLAKE2b-256 checksum How to use checksums |
c20905a4517007e9c4332fbe28b2105fa79b2522a75a887ef81444570b9ab32c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.8
|
Security for SimpleHttpProxy 0.0.3
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.