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.
Metadata
Release files for firegex 4.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| firegex-4.0.6.tar.gz | 19.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| firegex-4.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.6 kB
Release files / firegex-4.0.6.tar.gz
| Download URL | firegex-4.0.6.tar.gz |
|---|---|
| Size | 19.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
941775340bbd369e7ae4383a725d40143fca65e9505d5f22ebe119b4460331cd
|
|
BLAKE2b-256 checksum How to use checksums |
416ae9a6bb67bac6f5e99841a1921549f3bedff23f0d7d5bc078f95e981f4629
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / firegex-4.0.6-py3-none-any.whl
| Download URL | firegex-4.0.6-py3-none-any.whl |
|---|---|
| Size | 21.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9c04cd05bd9083e1919d702eb5d637896ca02e15aaaa6d6edf916cba3f5340a
|
|
BLAKE2b-256 checksum How to use checksums |
cec6894b0792ee062736bf6833b216b6d20badb67cd4ecc31228d7d6b6d0adc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|