# Leak test

Before **every** opening (and during the trial run in `setup.sh`), a dedicated container checks 16 ways in which
something could get past Tor. If a check fails, the box is stopped **before** you see it.

## The checks

| Step | Check |
|---|---|
| 1 · Exit is Tor | `check.torproject.org` reports `IsTor=true` |
| 2 · Real IP stays hidden | Tor exit ≠ your real IP (the real one is never shown) |
| 3 · Direct IP | even a connection made directly to an IP address ends up at Tor |
| 4 · DNS only via Tor | the system resolver answers via Tor's DNSPort; `dig @1.1.1.1` is redirected too |
| 5 · Forbidden paths are closed | router, computers on the home network, the host (`10.0.2.2`), IPv6, UDP, Tor ControlPort |
| 6 · `.onion` works | via SOCKS (the Tor Browser path) and transparently (automap) |
| 7 · The firewall counted | the counters of dropped attempts went up — dropped alone is not enough |

The test finds the router and home network addresses by itself.

## Results

| Display | Meaning |
|---|---|
| 🧅 ✅ All sealed (16 checks passed) | window opens |
| 🧅 ❌ N of 16 checks failed | real leak found → box is stopped |
| 🧅 ⏳ Not fully checkable: N check(s) without answer via Tor | Tor was too slow (3 attempts × 40 s), **no** leak found → box is stopped anyway, just start it again |

## Run it yourself

```bash
sudo -u onionpod /opt/onionpod/bin/onionpod test     # while the box is running
```

The output also appears in the Details of the launcher window.
