catchpoint / WebPageTest.tsproxy

Traffic-shaping SOCKS5 proxy
Apache License 2.0
73 stars 26 forks source link

tsproxy hits live traffic even when specified with --desthost=127.0.0.1 #11

Closed nedn closed 7 years ago

nedn commented 7 years ago

Full context: https://github.com/catapult-project/catapult/issues/2953

This has been causing flaky failure on telemetry tests in production as twitter page is cannot be accessed due to the current DDOS attack

pmeenan commented 7 years ago

Looking into it now. Should have a fix shortly.

pmeenan commented 7 years ago

tsproxy isn't doing the lookups (at least with the current ToT). I just verified with the code and with tcpdump.

In the curl case, curl will do local resolves and pass the address to the proxy unless you pass --socks5-hostname instead of --socks5:

curl --socks5-hostname 127.0.0.1:1080 http://bbbbbbbbbbbbbbbb.com

In this case I saw the hostname come in to tsproxy and there was no resolution. Using --socks5 tsproxy got the address (not the hostname) and there was a resolution in the tcpdump (presumably from curl).

I'm looking to see if the tsproxy used by catapult is maybe an older build that also did local resolutions but the current ToT does not.