# Geneva: a genetic algorithm that finds censorship evasion strategies by exploiting DPI bugs

> Geneva is an academic research tool from the University of Maryland that uses a genetic algorithm to discover censorship evasion strategies by exploiting bugs in deep packet inspection systems. Unlike Tor or VPNs, it runs from the client or server side alone, requires no external relay, and targets Linux with Python 3.6.

**Kkevsterrr/geneva** — automated censorship evasion for the client-side and server-side 

- Repository: https://github.com/Kkevsterrr/geneva
- Website: https://censorship.ai
- Stars: 2,143 · Forks: 204
- Language: Python
- License: BSD-3-Clause
- Published: 2026-10-11 · Updated: 2026-10-11 · Language: en
- Canonical page: https://hysenlabs.com/projects/kkevsterrr-geneva

## One-sided evasion: Geneva exploits DPI bugs from the client or server without an external relay

Most censorship circumvention tools, including Tor and VPNs, route traffic through external servers located outside the censoring regime. Geneva does not. It runs strictly on one side of a connection, either the client or the server, and manipulates the network stream directly to confuse the censor's deep packet inspection system.

Geneva was designed by researchers at the University of Maryland and works by exploiting bugs in censors rather than routing around them. It sends packets that are valid for the endpoints but trigger parsing failures or ambiguities in the censor's DPI engine. Through this approach, Geneva has found several previously unknown bugs in censors in China, India, Kazakhstan, and Iran.

One structural constraint: Geneva cannot defeat IP-address-blocking censorship. Its strategy engine targets content-based filtering by confusing what the censor parses, not by changing where packets are routed.

## Two components: the genetic algorithm that discovers strategies and the engine that applies them

Geneva's codebase splits into two components: a genetic algorithm, implemented in `evolve.py`, that evolves new evasion strategies over time, and a strategy engine in `engine.py` that applies a single strategy over a live network connection.

Training the genetic algorithm requires running it against a real censor. The algorithm repeatedly mutates and recombines strategy descriptions, testing each candidate against the censor to determine whether it successfully evades censorship. Training trips censorship intentionally, many times. Researchers using this component should plan for the training sessions to produce visible network events as a side effect.

Users who already have a working strategy from the published library can skip `evolve.py` entirely and run `engine.py` directly with a known strategy string.

## Linux-only installation: netfilterqueue and raw sockets on Debian or CentOS with Python 3.6

Geneva requires a Debian or CentOS-based Linux system. OS X and Windows are not supported because Geneva depends on netfilter and raw socket access, which are Linux-specific. Python 3.6 is the required version.

Install the system dependencies first:

```bash
sudo apt-get install build-essential python-dev libnetfilter-queue-dev libffi-dev libssl-dev iptables python3-pip
```

Then install the Python dependencies:

```bash
python3 -m pip install -r requirements.txt
```

On Debian 10, the PyPI version of netfilterqueue may not install cleanly, and a direct GitHub install is available as a workaround:

```bash
sudo python3 -m pip install --upgrade -U git+https://github.com/kti/python-netfilterqueue
```

The requirements.txt lists `scapy==2.4.3`, `netfilterqueue`, `cryptography==3.3.2`, `paramiko`, `docker`, and `beautifulsoup4` among its dependencies.

## The strategy language: duplicate, drop, tamper, and fragment compose packet manipulation trees

A censorship evasion strategy in Geneva is a description of how network packets should be modified, not executable code. Geneva calls this format the DNA syntax. Four core building blocks compose every strategy:

`duplicate` takes one packet and returns two identical copies, both of which continue into the next action in the strategy tree.
`drop` takes one packet and returns nothing, removing that packet from the stream before it reaches the censor.
`tamper` takes one packet and returns it with one of its header fields modified according to a specified rule.
`fragment` takes one packet and returns two smaller pieces, either as IP fragments or as TCP segments.

Because `duplicate` and `fragment` each produce two outputs from one input, they introduce branching. Strategies that use them form binary trees rather than linear sequences.

The example strategy from the repository applies to a TCP connection on port 80:

```bash
python3 engine.py --server-port 80 --strategy "[TCP:flags:PA]-duplicate(tamper{TCP:dataofs:replace:10}(tamper{TCP:chksum:corrupt},),)-|" --log debug
```

This strategy duplicates a TCP push-ack packet and then tampers with the data offset and checksum fields of one copy, intending to confuse the censor's parser while the clean copy reaches the server.

## Running engine.py: port flags, iptables NFQUEUE setup, and the stale-rule failure mode

When engine.py starts, it installs iptables rules to intercept matching traffic and route it through Geneva's internal NFQUEUE queues. The debug log from the README example shows the rules being created: OUTPUT and INPUT rules for both TCP and UDP on the specified port, using queue numbers 1 and 2 by default.

If stale iptables rules from a previous Geneva run already claim those queue numbers, startup will fail. Removing those rules before launching engine.py again resolves the conflict.

Port specification supports three forms. A single port is `--server-port 80`. A continuous range uses `--server-port 4000:5000` to cover every port in that range. A discrete list uses `--server-port 80,443,4444` to monitor only those specific ports.

## Limits: IP blocking is out of scope, traffic is unencrypted, and strategies are detectable

Geneva's strategy engine manipulates packets to confuse the censor's parser, but this approach has firm boundaries. IP-address-based blocking falls entirely outside what Geneva can address; it does not change packet destinations or route traffic through an intermediary.

Geneva is not an anonymity tool and does not encrypt any traffic. Observers on the network can see both the Geneva-manipulated packets and the underlying communication. The project's disclaimer notes that Geneva's actions are overt and detectable, and that running it inside a censoring regime carries personal risk.

The project has no graphical user interface and is built for researchers rather than for end users seeking a consumer-grade privacy application. Strategies also carry country-specific success rates, and results can vary by geographic location within the same country.

## Strategy library: per-country success rates for China, Kazakhstan, India, and Iran

The repository includes strategies.md, which contains dozens of evasion strategies found by Geneva's genetic algorithm against censors in China, Kazakhstan, India, and Iran. Each entry in the file lists success rates by country, and a strategy that performs well against one country's censor may not achieve the same rate against another's. Geographic variation within a country can also affect results.

Geneva carries a BSD-3-Clause license; the last push to the repository was on 2026-10-04.

## Conclusion

Geneva is the right tool for network researchers studying censorship circumvention and for server operators inside a censoring regime who want to test packet-level evasion without external relay infrastructure. Skip it if you need a consumer-grade anonymity solution: Geneva does not encrypt traffic and every strategy it runs is detectable on the network. Before using any strategy, check strategies.md for the per-country success rate of the specific strategy you plan to run, and clear any stale iptables rules on Geneva's default NFQUEUE numbers to avoid startup queue conflicts.

## FAQ

### What is Geneva and how does it differ from Tor or a VPN?

Geneva is a research tool that manipulates network packets to confuse deep packet inspection systems, causing the censor to misparse or ignore the traffic. Unlike Tor or VPNs, Geneva requires no external server or relay and runs entirely from the client or server side of the connection.

### What platforms does Geneva support?

Geneva requires a Debian or CentOS-based Linux system with Python 3.6. OS X and Windows are not supported because netfilter and raw socket access are Linux-specific requirements.

### Can Geneva evade all types of internet censorship?

No. Geneva targets censorship that relies on deep packet inspection. It cannot defeat IP-address-blocking censorship, which blocks connections based on destination address regardless of packet contents.

### Does Geneva encrypt the traffic it handles?

No. Geneva does not encrypt any traffic. It manipulates packet headers and structure to confuse the censor's parser, but the payload and connection details remain visible on the network.

### What is the strategy library in Geneva?

The strategy library is a file called strategies.md in the repository. It contains dozens of evasion strategies discovered by Geneva's genetic algorithm, each with per-country success rates for China, Kazakhstan, India, and Iran.

## Sources

- [Issues](https://github.com/Kkevsterrr/geneva/issues)
- [Kkevsterrr/geneva on GitHub](https://github.com/Kkevsterrr/geneva)
- [License: BSD-3-Clause](https://github.com/Kkevsterrr/geneva/blob/master/LICENSE)
- [Project website](https://censorship.ai)
- [README](https://github.com/Kkevsterrr/geneva/blob/master/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/kkevsterrr-geneva
