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 3 18
calendar_today agoschedule1 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.

4 Comments

2 votes
1
1
1 vote
🔥 Join developers growing publicly
Share your knowledge, build in public, and grow your developer presence with a global community.

More Posts

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

Faceted Navigation and Pagination for Ecommerce SEO

stepan-nikonov - Aug 31

Optimizing the Clinical Interface: Data Management for Efficient Medical Outcomes

Huifer - Jan 26
chevron_left
251 Points22 Badges
2Posts
6Comments
4Connections
https://github.com/onyks-os

Related Jobs

View all jobs →

Commenters (This Week)

6 comments
2 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!