joelverhagen / TorSharp

Use Tor for your C# HTTP clients. Use Privoxy or .NET 6+ SOCKS support to proxy HTTP traffic.
MIT License
328 stars 62 forks source link

I get a 403 (Forbidden) error when I make a request with TorSharp. #51

Closed themiralay closed 4 years ago

themiralay commented 4 years ago

Hello to everyone, While I normally do not get an error when I make a request, I get a Forbidden (403) error when I create TorSharp and use it as a proxy. The exception example I received is as follows.

tor

joelverhagen commented 4 years ago

Can you check the torrc under the %temp%\TorExtracted to see if it has a hashed password set? This should be set up by TorSharp but maybe it's not happening.

Also, try setting the ReloadTools config property to true and see if that helps.

themiralay commented 4 years ago

@joelverhagen I changed the %temp%\TorExtracted\tor-win32-0.4.2.7\Data\Tor\torrcfile to password 1234. I added ReloadTools, true parameter in TorSharp Settings. But I'm still getting the same error. I can access the site via Tor Browser. But I get 403 with TorSharp. Can you check the site on TorSharp?

joelverhagen commented 4 years ago

Take a look at the response body coming back from HttpClient, e.g. httpClient.GetAsync(...) then look at Content.ReadAsStringAsync(). This site has CloudFlare protection. You can read more about it here: https://support.cloudflare.com/hc/en-us/articles/200170136-Understanding-Cloudflare-Challenge-Passage-Captcha-

To resolve the challenge you will need to interact with the challenge, e.g. with a full browser.

joelverhagen commented 4 years ago

This question is specific to the website you are interacting with and outside of the scope of TorSharp. Please let me know if you have any questions about TorSharp's behavior or functionality.