Firegex Python Library and CLI
This is the Python library for Firegex, a firewall built for CTF Attack-Defense competitions. It provides the firegex.nfproxy package used to write Netfilter Proxy Python packet filters, the fgex CLI, and a local proxy simulator (proxysim) for testing filters without a running Firegex instance.
Installation
pip install -U firegex
fgex is an alias package for firegex: installing either one gives you the same firegex module and the fgex/firegex CLI commands.
Documentation
➡️ Netfilter Proxy: writing and testing @pyfilter scripts — the pyfilter decorator, every data structure (RawPacket, TCPInputStream/TCPOutputStream, HttpRequest/HttpResponse and their variants, HttpHistory), packet statements, stream limits, the fgex nfproxy CLI simulator, and a full worked example.
That page is also what's shown in the Firegex web UI itself (the docs button on the nfproxy pages) — both are generated from that single file, so they can never drift out of sync.
Firegex's other filtering modules
This library only covers Netfilter Proxy. Firegex ships several other independent modules, each with its own guide:
- Netfilter Regex — fast, PCRE2/hyperscan-based regex matching against raw traffic.
- Hijack Port to Proxy — redirect traffic to your own external proxy without touching the target service.
- Firewall Rules — plain nftables allow/drop/reject rules.
- TLS Decryption — decrypt-and-reinspect bridge for services that speak TLS natively.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file firegex-4.0.1.tar.gz.
File metadata
- Download URL: firegex-4.0.1.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a08012b68dd011b9a2fb6bb741f60be8bc88c002fef9f5b9a8565ae576ff304c
|
|
| MD5 |
40659ed31aa2c59d43298ea5c1356721
|
|
| BLAKE2b-256 |
d0e872c8bcf8d147d178d1b47be027349b496fb7c79fccce693e51f3978f3340
|
File details
Details for the file firegex-4.0.1-py3-none-any.whl.
File metadata
- Download URL: firegex-4.0.1-py3-none-any.whl
- Upload date:
- Size: 21.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
476accb81f2f8c2e53e50f484744c8cb71a27ee54b3bf33cf154e407c9fa5481
|
|
| MD5 |
24a180ca093ec86a5c87386f0d2dcb67
|
|
| BLAKE2b-256 |
236eae8358931cbbc816cbf122fdd48f1f1585b0d7e6f918c4db76796f7f8e2d
|