Skip to main content

xenproxy - Free Fire optimized MITM proxy (fork of mitmproxy).

Project description

XenProxy

A Free Fire-optimized MITM proxy, forked from mitmproxy. XenProxy combines a full-featured HTTPS interception proxy with a dedicated Free Fire bypass pipeline.

Features

Core Proxy (forked from mitmproxy)

  • Interactive console UI, headless dump mode, and web UI
  • HTTP/1, HTTP/2, HTTP/3, and WebSocket interception
  • TLS interception with dynamic certificate generation
  • TCP, UDP, and DNS proxy modes
  • Scriptable via Python addons
  • Full mitmproxy addon ecosystem compatibility

Free Fire Bypass Addon

  • Login interception — hooks into Free Fire API domains (loginbp.ggblueshark.com, prod-api.reward.ff.garena.com, etc.)
  • UID blocking — inspect raw TCP streams and block connections by UID
  • Fingerprint masking — strips proxy-detection headers (Via, X-Forwarded-For, etc.) and rewrites User-Agent
  • JWT forwarding — integrates with the access_jwt token mutation service
  • Runtime commandsff.block_uid, ff.unblock_uid, ff.list_blocked

Backend Pipeline

  • Raw TCP forwarder on :9999 — bidirectional byte-level proxy with game-layer AES decrypt
  • JWT mutation service on :1080 — template-based protobuf payload rewriting
  • Admin HTTP API on :5000 — UID management, stats, health checks
  • UID sync loop — pulls blocklists from remote API every 120s

Architecture

Emulator → Raw Forwarder (:9999) → XenProxy Proxy (:8080) → Game Servers
                                         ↕
                              access_jwt Service (:1080)
                                    (JWT mutation)

Quick Start

# Install
pip install xenproxy

# Start the proxy
xenproxy

# Start the web UI
xenproxy web

# Start headless dump mode
xenproxy dump

Free Fire Pipeline

# Terminal 1: Start the backend services
cd new/python
pip install -r requirements.txt
python main.py

# Terminal 2: Start XenProxy with the bypass addon
xenproxy -s xenproxy/addons/firebypass.py --set ff_bypass=true

Configure your emulator to use the proxy at the host machine's LAN IP on port 8080, and the raw forwarder on port 9999.

Configuration

XenProxy reads ~/.xenproxy/config.yaml on startup. Key options:

Option Default Description
listen_port 8080 Proxy listen port
mode regular Proxy mode (regular, transparent, socks5, reverse, upstream)
ssl_insecure false Disable upstream TLS verification
ff_bypass true Enable Free Fire bypass addon
ff_blocked_uids [] UIDs to block
ff_access_jwt_url http://127.0.0.1:1080 JWT mutation service URL
ff_mask_fingerprint true Strip proxy fingerprints

Building

PyInstaller (standalone binary)

pyinstaller release/specs/standalone.spec --clean
# Output: release/dist/xenproxy.exe

MSIX Installer (Windows Store)

pyinstaller release/specs/onedir.spec --clean
python release/build.py msix-installer

InstallBuilder Installer (Windows)

pyinstaller release/specs/onedir.spec --clean
python release/build.py installbuilder-installer

Docker

docker build -t xenproxy release/docker/
docker run -p 8080:8080 -p 8081:8081 xenproxy

Development

# Install with uv
uv sync

# Run tests
uv run pytest

# Run linter
uv run ruff check xenproxy/

# Type check
uv run mypy xenproxy/

Project Structure

xenproxy/                   # Main proxy package
├── addons/                  # Addon modules
│   ├── firebypass.py        # Free Fire bypass addon
│   └── onboardingapp/       # Certificate installation portal
├── proxy/                   # Proxy core
├── tools/                   # CLI entry points
│   └── main.py              # xenproxy_cli dispatcher
├── net/                     # Network protocols
├── io/                      # I/O and serialization
├── contentviews/            # Content decoders
└── utils/                   # Utilities
web/                         # React/TypeScript web UI frontend
release/                     # Build & installer configs
new/python/                  # Free Fire backend pipeline

License

MIT — see LICENSE.

Credits

XenProxy is a fork of mitmproxy. The original project is maintained by the mitmproxy contributors and licensed under the MIT license.

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

xenproxy-1.0.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

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

xenproxy-1.0.0-py3-none-any.whl (1.8 MB view details)

Uploaded Python 3

File details

Details for the file xenproxy-1.0.0.tar.gz.

File metadata

  • Download URL: xenproxy-1.0.0.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for xenproxy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 951eadfbd84640be16f01c0bb8bda45705d880ee2c11a23657463d70390bfc9a
MD5 ff8917516d97f03fc7faa28a8576d494
BLAKE2b-256 b017277ac78ba8499591053c14262f3b6d9b0301f6d0ac7c630c7ea2f556cbc2

See more details on using hashes here.

File details

Details for the file xenproxy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: xenproxy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 1.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for xenproxy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 472716ac5552ff6d52979f53811153fa5b8dd243f1ad443bdddc26413e9b8f83
MD5 3422f5c7e4e9844b1633c47311602760
BLAKE2b-256 21cf53789f2ab555358008a5dd5555f35b5e41c9e300121d3c8067f082d4b0ca

See more details on using hashes here.

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