Skip to main content

HTTP MITM proxy with browser fingerprinting (CFFI backend)

Project description

MaskTunnel Python Bindings

PyPI version

Python bindings for MaskTunnel — an HTTP(S) MITM proxy that adapts its browser fingerprint based on the request User-Agent.

This package wraps the Go implementation and exposes a Python-friendly API.

Overview

MaskTunnel is an HTTP proxy that dynamically changes its fingerprint to mimic real browsers (Chrome / Firefox / Safari / Edge) according to the User-Agent header in requests.

Key capabilities:

  • Browser-like TLS fingerprints (JA3 / JA4)
  • Browser-like HTTP/2 fingerprints (e.g. Akamai-style settings and frame patterns)
  • Automatic selection based on User-Agent
  • Optional response JavaScript injection
  • Optional upstream proxy chaining

Installation

Using pip (Recommended)

pip install masktunnel

Build from source (sdist)

Building from source requires:

  • Python 3.9+
  • Go toolchain
  • A C toolchain suitable for building Python extensions

Quick Start

Run a proxy server

from masktunnel import Server

server = Server()
print(f"Proxy running at: {server.addr}")

# Blocking; run in a thread if needed
server.start()

Use CLI

After installation:

masktunnel server --port 8080

API

Server

Create a server with options:

from masktunnel import Server, ServerOptions

opts = ServerOptions(
	port="8080",
	username="",
	password="",
	payload="",
	upstream_proxy="",
	user_agent="",
	verbose=0,
)

server = Server(options=opts)

Common operations:

server.start()
server.stop()
server.reset_sessions()

Notes

  • The native module is generated at build time into masktunnellib/.
  • Prefer installing wheels when available; building from source depends on the local toolchain.

Links

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

masktunnel-1.1.3.tar.gz (22.1 kB view details)

Uploaded Source

Built Distributions

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

masktunnel-1.1.3-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (10.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

masktunnel-1.1.3-py3-none-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl (11.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64manylinux: glibc 2.5+ x86-64

masktunnel-1.1.3-py3-none-any.whl (5.7 MB view details)

Uploaded Python 3

File details

Details for the file masktunnel-1.1.3.tar.gz.

File metadata

  • Download URL: masktunnel-1.1.3.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for masktunnel-1.1.3.tar.gz
Algorithm Hash digest
SHA256 06f1021db22b1d774db3a903ddc82d08fb8b140d4837ee1236a5e4a4599ac14a
MD5 7abfb0f1286a1729dc446e16c6ad4096
BLAKE2b-256 6b32e5467cafb1915839773048d1a99baa2ce7087b2fb8ef26fd05c534df2b84

See more details on using hashes here.

Provenance

The following attestation bundles were made for masktunnel-1.1.3.tar.gz:

Publisher: publish-pypi.yml on cloudflyer-project/masktunnel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file masktunnel-1.1.3-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for masktunnel-1.1.3-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 bcc81a9e056a1feed155f012a5fcf78a26d6c4fd76183bcd1c847f84c2fe85b4
MD5 136dc9aee1d0be1d97118c6c76f200b2
BLAKE2b-256 cc85daf9e88f74a579dcd290c3d8d9cebb70582eb09146aebdb7f143cbf4353f

See more details on using hashes here.

Provenance

The following attestation bundles were made for masktunnel-1.1.3-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl:

Publisher: publish-pypi.yml on cloudflyer-project/masktunnel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file masktunnel-1.1.3-py3-none-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl.

File metadata

File hashes

Hashes for masktunnel-1.1.3-py3-none-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 27aaae2019a0c302d88a53040a46a1c9533401319a3abfd0d624b44cbb01cb4c
MD5 adfd6891fbbe858635045f4faa67be89
BLAKE2b-256 c7b165a775f6c925804fb76fefa4b6ceaed0fc79ea97db21e2ca428fe1f02b75

See more details on using hashes here.

Provenance

The following attestation bundles were made for masktunnel-1.1.3-py3-none-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl:

Publisher: publish-pypi.yml on cloudflyer-project/masktunnel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file masktunnel-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: masktunnel-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 5.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for masktunnel-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 36c5d8ae1470bf2dd3855da143bcfa122c2644ba5bf6744b8e2a37f8b7a9fe74
MD5 032ad067aefe27b63d3acbbd35c9d963
BLAKE2b-256 804ad924c69fc97fcd45fa689b6240429cef16c5af2033f760642ebe8a6a7f7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for masktunnel-1.1.3-py3-none-any.whl:

Publisher: publish-pypi.yml on cloudflyer-project/masktunnel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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