Open vituperative opened 2 years ago
unfortunately, the socks protocol doesn't provide a distinct error code for DNS resolution failure, so i can see why this happens. otoh an empty reply certainly isn't an adequate error for failure to connect to an upstream proxy. iirc we use 502 error code for a similar scenario; do you mind crafting a PR that does the same here ?
Version: git master
Steps to reproduce:
curl via Tor: curl -i -x socks5h://localhost:9050 http://***deadononionsite***.onion/ curl: (97) Can't complete SOCKS5 connection to deadonnionsite.onion. (4)
via tinyproxy: curl -i -x http://localhost:8888 http://***deadonionsite***.onion/ curl: (52) Empty reply from server
The (4) response code via Tor indicates host unreachable. Ideally tinyproxy would convey the same error instead of an empty response and, if required, reframe it for http.