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.2.tar.gz (22.0 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.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl (10.2 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

masktunnel-1.1.2-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.2-py3-none-any.whl (5.7 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: masktunnel-1.1.2.tar.gz
  • Upload date:
  • Size: 22.0 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.2.tar.gz
Algorithm Hash digest
SHA256 ca2c17ffcfce7700ad2ac119f73b241311a32e15fc0c9654c7c43ca1ad9f4a89
MD5 313f5fdfab4d75ff9a956bace20d9164
BLAKE2b-256 cf25d9d626c5be37e46a74a5da59e8c301e3cf500772b32e0eee02a316e8f310

See more details on using hashes here.

Provenance

The following attestation bundles were made for masktunnel-1.1.2.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.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for masktunnel-1.1.2-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 ef0818ebd2e08146b8cd45c42cbc2dc74cb083c5c6849f2804221d4c56a06712
MD5 ff84359c635b7e09e57b6df469eb00a1
BLAKE2b-256 b6be099ec509dbae8ea4245d55cd70468a1de2b9a77340301862b66cd021b2e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for masktunnel-1.1.2-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.2-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.2-py3-none-manylinux1_x86_64.manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_5_x86_64.whl
Algorithm Hash digest
SHA256 a39103ae3592f0e461e7810a6f51cef3ff691d3ce52937ad7631c6a6bbb22e85
MD5 840487c30b9ddeca1024b7c20f44d4f2
BLAKE2b-256 e98e4822d1cc961518df93bfd3a4a3fd1fd8988132e6291286c66da6497715a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for masktunnel-1.1.2-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.2-py3-none-any.whl.

File metadata

  • Download URL: masktunnel-1.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6d4cfd402fc0ce62dc8f05c49dc41128748172c104bdee22afdd178410c5cade
MD5 f7492f73915d942c6165b490ba654fad
BLAKE2b-256 9001dc61c6cddecea0e1da44c0bdcf791480045ebf88cb2c5e32ad0bd8d90bec

See more details on using hashes here.

Provenance

The following attestation bundles were made for masktunnel-1.1.2-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