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.
Metadata
Release files for hazetunnel 2.0.1
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 |
|---|---|---|---|---|
| hazetunnel-2.0.1.tar.gz | 7.5 kB | Without provenance | Details for hazetunnel-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hazetunnel-2.0.1-py3-none-any.whl | Python 3 | none | any | Details for hazetunnel-2.0.1-py3-none-any.whl |
Total release size: 16.9 kB
Release files / hazetunnel-2.0.1.tar.gz
| Download URL | hazetunnel-2.0.1.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4015733dd4337d0e53aa092c7935f01118de290b66f38b4d45947800a8496fae
|
|
BLAKE2b-256 checksum How to use checksums |
8eb0e44693d24a6975f630f95178f1defcc97a9620c747b6c167dd47037e4681
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / hazetunnel-2.0.1-py3-none-any.whl
| Download URL | hazetunnel-2.0.1-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
116ac94fec014b5f63c4950e41c9f0fa1221b34d8e3ebd2bb4c856d4353991e5
|
|
BLAKE2b-256 checksum How to use checksums |
9413826a3f3e6ec8d5cfdc62c91af784dd7085a93d645e74a2e9b19d45ddf128
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Security for hazetunnel 2.0.1
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.