Mitm proxy that defends against TLS and JS worker fingerprinting.
Project description
Python Usage
Usage
from hazetunnel import HazeTunnel
from browserforge.headers import HeaderGenerator
...
# Initialize the proxy
proxy = HazeTunnel(port='8080', payload='alert("Hello World!");')
proxy.launch()
# Send the request
requests.get(
url='https://example.com',
headers=HeaderGenerator().generate(browser='chrome'),
proxies={'https': proxy.url},
verify=proxy.cert
).text
# Stop the proxy
proxy.stop()
HazeTunnel parameters
Parameters:
port (Optional[str]): Specify a port to listen on. Default is random.
payload (Optional[str]): Payload to inject into responses
user_agent (Optional[str]): Optionally override all User-Agent headers
upstream_proxy (Optional[str]): Optionally forward requests to an upstream proxy
Using a context manager
A context manager will automatically close the server when not needed anymore.
with HazeTunnel(port='8080', payload='alert("Hello World!");') as proxy:
# Send the request
requests.get(
url='https://example.com',
headers=HeaderGenerator().generate(browser='chrome'),
proxies={'https': proxy.url},
verify=proxy.cert
).text
CLI
Download the latest version of the API:
python -m hazetunnel fetch
Remove all files before uninstalling
python -m hazetunnel remove
Run the MITM proxy:
python -m hazetunnel run -p 8080 --verbose
All commands
Usage: python -m hazetunnel [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
fetch Fetch the latest version of hazetunnel-api
remove Remove all library files
run Run the MITM proxy
version Display the current version
See here for more information and examples.
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
hazetunnel-2.0.1.tar.gz
(7.5 kB
view details)
Built Distribution
File details
Details for the file hazetunnel-2.0.1.tar.gz
.
File metadata
- Download URL: hazetunnel-2.0.1.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4015733dd4337d0e53aa092c7935f01118de290b66f38b4d45947800a8496fae |
|
MD5 | 6a4bcebc1634286f8b4da02cd4882e64 |
|
BLAKE2b-256 | 8eb0e44693d24a6975f630f95178f1defcc97a9620c747b6c167dd47037e4681 |
File details
Details for the file hazetunnel-2.0.1-py3-none-any.whl
.
File metadata
- Download URL: hazetunnel-2.0.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 116ac94fec014b5f63c4950e41c9f0fa1221b34d8e3ebd2bb4c856d4353991e5 |
|
MD5 | 86712abf995a7d01ec922cc508945a7d |
|
BLAKE2b-256 | 9413826a3f3e6ec8d5cfdc62c91af784dd7085a93d645e74a2e9b19d45ddf128 |