Skip to content

Fix Tor DNS leak - #1460

Merged
julian-CStack merged 2 commits into
stagingfrom
fix/tor-dns-leak
Oct 2, 2026
Merged

julian-CStack merged 2 commits into
stagingfrom
fix/tor-dns-leak

Conversation

@sneurlax

@sneurlax sneurlax commented Oct 2, 2026

Copy link
Copy Markdown
Member

No description provided.

socks5_proxy 1.0.3+dev.3 resolves the target host with the system DNS
before issuing the SOCKS5 CONNECT, so every request made through the
Tor proxy leaked its hostname to the local resolver and handed Tor an
IP address instead of a domain. It also meant .onion hosts could not be
reached through HttpClient at all.

Upstream removed the local lookup in 1.0.5+dev.1 and fixed domain
serialization in 2.1.1, so the CONNECT now carries the hostname
(address type 3) and Tor does the resolution. The 2.x API is unchanged
for everything Stack uses (assignToHttpClient and ProxySettings).
Run the HTTP wrapper against a local fake SOCKS5 server and assert the
CONNECT carries the domain name, including for .onion hosts, rather
than a locally resolved address.
@codecov

codecov Bot commented Oct 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 6.79%. Comparing base (03ad880) to head (1dd116f).
⚠️ Report is 24 commits behind head on staging.

Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1460      +/-   ##
===========================================
+ Coverage     6.72%    6.79%   +0.06%     
===========================================
  Files         1118     1122       +4     
  Lines       111939   112368     +429     
===========================================
+ Hits          7533     7634     +101     
- Misses      104406   104734     +328     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@julian-CStack
julian-CStack merged commit b154ff0 into staging Oct 2, 2026
3 checks passed
@julian-CStack
julian-CStack deleted the fix/tor-dns-leak branch October 2, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants