Capture
Transparent capture (Linux)
Pro feature. Transparent capture needs Akev Pro or its 14-day trial. Without a licence it stops working, and its settings stay stored.
Some programs ignore proxy settings entirely: Go and Rust binaries built without proxy support, games, Electron apps that override the environment, daemons started by systemd, anything with a hard-coded HTTP client. Transparent capture gets their traffic anyway: the Linux kernel redirects their TCP connections to Akev, Akev reads where each connection was really going, and intercepts it exactly like a proxied request.
Akev never changes your firewall itself — that needs root. It writes the exact commands, you review and run them, and Akev shows when redirected connections start arriving.
How it works
- Akev runs a second listener, the transparent port (8001 by default, separate from the proxy port so the proxy keeps working as a normal explicit proxy).
- An nftables (or iptables)
REDIRECTrule sends the chosen connections to that port. - For every connection, Akev asks the kernel for the original destination
(
SO_ORIGINAL_DST/IP6T_SO_ORIGINAL_DST) and treats it like aCONNECTtunnel to it:- TLS is intercepted with a certificate for the name in the ClientHello (SNI), or passed through untouched for hosts in TLS passthrough and ClientHellos Akev can't intercept;
- plain HTTP/1 and HTTP/2 are parsed and recorded;
- anything else (SSH, databases, custom protocols) is piped to the original destination unchanged, and recorded as a tunnel.
- Requests show up in Traffic with Proxy mode: Transparent capture (redirected) in the
Connection tab, the URL built from the
Hostheader / SNI and the original port, and the process that made them.
Connections made to the transparent port directly (not redirected) are handled like direct
requests to the proxy port: the Host header or SNI decides where they go.
Setting it up
Open Connect → Transparent capture (Linux) (or Settings → Proxy → Transparent capture → Set up):
- If the status says the listener is off, click Turn on (or enable Transparent listener in Settings → Proxy).
- Pick what to capture — see below — and the destination ports (
80 + 443, every TCP port, or your own list) and firewall tool (nftables, oriptableson older systems). - Run the numbered commands in a terminal, in order. Steps marked as root start with
sudo; the others run as you. - Run the check command. It sends a request to
192.0.2.1(an address that never answers) with the host nameakev.cert, so it can only succeed if the kernel redirected it to Akev: it prints200, and the status at the top of the panel turns green — Redirection is working — with the connection listed. The status keeps updating: the most recent redirected connections, their original destination and the process behind them.
The commands are bash/zsh (the rules are passed with a here-document; in fish, run bash
first). Every rule lives in Akev's own table (inet akev, or the AKEV chain for
iptables), so loading the rules again replaces them and nothing else in your firewall is
touched. Loopback destinations are never redirected, and you can exclude more destinations
(IPs / CIDR ranges) under More options.
Per app (recommended)
Only programs launched inside Akev's capture cgroup are redirected; the rest of the machine is untouched, and Akev's own connections can't loop back because Akev isn't in it.
systemctl --user start akev-capture.slice # 1. create the capture slice (as you)
sudo nft -f - <<'EOF' # 2. load the rules (as root)
table inet akev
delete table inet akev
table inet akev {
chain output {
type nat hook output priority -100; policy accept;
ip daddr 127.0.0.0/8 return
ip6 daddr ::1 return
socket cgroupv2 level 5 "user.slice/user-1000.slice/user@1000.service/akev.slice/akev-capture.slice" tcp dport { 80, 443 } redirect to :8001
}
}
EOF
systemd-run --user --scope --quiet --slice=akev-capture.slice -- env SSL_CERT_FILE=… "$SHELL" # 3. launch(Akev fills in your own user id, cgroup path and port.) Step 3 opens a captured shell: everything you start from it is captured. Type a program instead of leaving the field empty to launch just that program. Programs already running elsewhere are not captured — quit them first (browsers hand new windows to a running instance).
With Trust Akev's CA on, the launch command also sets the CA variables most tools read
(SSL_CERT_FILE, CURL_CA_BUNDLE, REQUESTS_CA_BUNDLE, NODE_EXTRA_CA_CERTS, …) so HTTPS can
be intercepted without touching the system trust store. Browsers and Java keep their own trust
stores: use the browser interceptors, or trust the CA system-wide (Settings → Certificates).
The slice must exist before the rules are loaded (nftables resolves the cgroup path when the rule is added). If you stop the slice or log out, run steps 1 and 2 again.
Without systemd, choose Launch with → Without systemd: Akev then creates a plain cgroup
(/sys/fs/cgroup/akev-capture, root) and you move a shell into it with
echo $$ | sudo tee /sys/fs/cgroup/akev-capture/cgroup.procs.
Per user
Every connection of one other user account is redirected (meta skuid). Handy with a
dedicated account for the program under test (sudo -u tester some-app). Capturing the user
Akev itself runs as would redirect Akev's own connections, so Akev refuses unless upstream
sockets are marked (below).
Whole machine
Every connection except Akev's own. Akev is kept out either:
- by user id (default):
meta skuid <akev's uid> return. Note that this also leaves out every other program of that user — fine when Akev runs as root or as a dedicated user, not when it runs as you (use per-app capture for your own programs, or the mark); - by firewall mark: set Firewall mark in Settings → Proxy (or click Use mark 0x1a4b in
the panel). Akev then sets
SO_MARKon every upstream connection and the rules start withmeta mark 0x1a4b return. Setting a mark needsCAP_NET_ADMIN; if Akev doesn't have it, the plan starts withsudo setcap cap_net_admin+ep /path/to/akev(restart Akev afterwards; re-run after updating Akev). Settings → Proxy shows whether marking works.
If the rules catch Akev's own connections anyway, Akev detects each looped connection, refuses it, and the panel shows a red warning with the count.
Stopping
Run the commands under When you're done — sudo nft delete table inet akev (or the
iptables equivalents), and systemctl --user stop akev-capture.slice for per-app capture
(this also ends programs still running in the slice). Until you do, redirected connections
fail whenever Akev isn't running. Akev can't remove the rules for you (that needs root), so
the Stop button on the active chip opens the panel at these commands.
Limits
- Linux only. macOS (pf
rdr+ theDIOCNATLOOKioctl on/dev/pf, which needs root) and Windows (WinDivert, a signed kernel driver plus administrator rights) aren't supported yet. - TCP only. QUIC / HTTP/3 (UDP 443) isn't redirected. Browsers fall back to HTTP/2 over TCP when QUIC fails; if a program insists on QUIC, block UDP 443 for it.
- Only connections that start on this machine (the
outputhook) are covered by the generated rules. Redirecting traffic of other devices or containers that route through this machine needs apreroutingrule and Akev bound to the network (Settings → Proxy → Allow other devices); the transparent listener follows the proxy's bind address. - Akev connects upstream to the host name from the
Hostheader / SNI (resolved with your DNS settings, so DNS overrides apply), on the original port. A program that connects to a hard-coded IP while sending a different host name reaches what that name resolves to; pin it with a DNS override. Connections without any name go to the original IP. - Explicit proxy protocols arriving through the redirect (a
CONNECTor SOCKS handshake meant for another proxy) are answered by Akev itself. - HTTPS interception still requires the program to trust Akev's CA; apps that pin certificates fail (add them to TLS passthrough to let them through untouched).
- Per-app capture with nftables needs
socket cgroupv2(Linux ≥ 5.13, nftables ≥ 1.0) and the unified cgroup v2 hierarchy (the default on current distributions); with iptables it uses-m cgroup --path. - The listener uses the next free port when 8001 is busy (shown in Settings and the panel); generate the commands again in that case.
API
GET /api/transparent (status + check), POST /api/transparent/plan (the commands), and the
transparent-linux interceptor (POST /api/interceptors/transparent-linux/activate returns
the same plan, so MCP agents can use it). See API.md.