TTP 0.4.8 - transparent Tor proxy for Linux, and the leak tests that were passing for the wrong reas

TTP 0.4.8 - transparent Tor proxy for Linux, and the leak tests that were passing for the wrong reas

●1 ●5 ●18
calendar_today • schedule1 min read

I maintain TTP, a Linux CLI that routes system TCP and DNS through Tor using nftables. That part isn't novel - kalitorify, nipe and others do it.

What I want feedback on is the verification, because I found my own test suite was lying to me.

assert len(leaks) == 0 is also true when the sniffer never started, when the interface name was wrong, or when the traffic never left the process. It passes whether or not the firewall works. So every containment test now runs its stimulus twice: once with the ruleset flushed, where the packet MUST be captured, and then with the ruleset loaded, where it must not. A harness that cannot see a leak now fails instead of passing.

Ten tests, each in an ephemeral network namespace: DNS over UDP and TCP, plain TCP, DoT on 853, QUIC DoH on UDP/443 (the path NAT redirection can't touch), ICMP, arbitrary UDP, IPv6 - plus the reverse assertion that a bypassed UID still reaches the LAN, so a firewall that blocked everything couldn't pass either.

Doing this broke things, which is the point. Tightening the probes turned three passes into failures: nftables reject returns EPERM to the local socket, so a refused send was the firewall working correctly and I had been reading it as a broken test.

Caveat up front: this is not Whonix and not Tails. Transparent proxying routes connections; it does nothing about browser fingerprints, TLS client hellos, or any application-layer identifier. If your threat model is a state adversary, use Tails.

Code: https://github.com/onyks-os/TransparentTorProxy
Docs: https://onyks-os.github.io/ttp/

Tell me what else in there could pass without being true.

Want more #python & #linux deep dives?

Join 6,093+ developers sharing real benchmarks, code breakdowns, and projects. Free forever.

4 Comments

2 votes
1
1
1 vote

More Posts

A Textile Mill's Dyehouse Ramp Curve: Get One Step Wrong and the Sheet Belongs to the Master

aiomniu - Oct 18

Stop invoking the whole graph to test one node: unit tests and checkpoints for my LangGraph agent

VEACESLAV - Nov 10

Europe Just Dropped the Hammer on AI: A Wake-Up Call?

PrabashanaDev - Jul 15

Your AI Doesn't Just Write Tests. It Runs Them Too.

Kevin Martinez - May 12

Dashboard Operasional Armada Rental Mobil dengan Python + FastAPI

Masbadar - Mar 12
chevron_left
252 Points • 24 Badges
2Posts
6Comments
5Connections
https://github.com/onyks-os

Related Jobs

View all jobs →

Commenters (This Week)

2 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!