Skip to main content

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)

Source distribution for firegex 4.0.6
File Size Uploaded
firegex-4.0.6.tar.gz 19.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for firegex 4.0.6
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

5.0.1

41 release files

5.0.0

41 release files

This release

4.0.6 This release

2 release files

4.0.5

2 release files

4.0.4

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.5.3

2 release files

3.5.2

2 release files

3.5.1

2 release files

3.5.0

2 release files

3.4.11

2 release files

3.4.10

2 release files

3.4.9

2 release files

3.4.8

2 release files

3.4.7

2 release files

3.4.6

2 release files

3.4.5

2 release files

3.4.4

2 release files

3.4.3

2 release files

3.4.2

2 release files

3.4.1

2 release files

3.4.0

2 release files

3.3.1

2 release files

3.3.0

2 release files

3.2.13

2 release files

3.2.12

2 release files

3.2.11

2 release files

3.2.10

2 release files

3.2.9

2 release files

3.2.8

2 release files

3.2.7

2 release files

3.2.6

2 release files

3.2.5

2 release files

3.2.4

2 release files

3.2.3

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page