0

I have a site with which I need to interact. I do this under the tor-network. But it seems to have Tor's lock on it. But when I use the tor browser everything works and the site responds. And when I submit requests to the site via tor.exe, using my own application in c# (windows 10), I get 403 forbidden error. The tor browser may go online through ipv6. Configure use ipv6 in torrc doesn’t work for me. Does anyone know what the problem is and how to solve it? Thanks!

I copy all the headers from the browser request. They are the same. And use tor.exe as a SOCKS 5 proxy. Without using tor-proxy from my application the site responds and error 403 does not occur

code:

 HttpWebRequest proxy_request = (HttpWebRequest)WebRequest.Create(/*some uri*/);
                proxy_request.Method = "GET";
                proxy_request.Headers.Add(HttpRequestHeader.AcceptLanguage, "en-US,en;q=0.5");
                proxy_request.Headers.Add(HttpRequestHeader.CacheControl, "no-cache");
                proxy_request.ContentType = "application / x - www - form - urlencoded";
                proxy_request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Firefox/68.0 ";
                proxy_request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
                proxy_request.KeepAlive = true;
                var prx = new HttpToSocks5Proxy("127.0.0.1", 9050);
                proxy_request.Proxy = prx;
                HttpWebResponse resp = proxy_request.GetResponse() as HttpWebResponse;
3
  • An http request made through a custom application will probably look quite different from a request made from a browser (user agent string, http compression, cookies, etc). Have you tried copying and replaying the exact same http request from the browser in your custom application?
    – Steve
    Mar 26 '20 at 21:07
  • Could you copy relevant parts of your code? How do you talk to tor.exe (SOCKS vs. HTTP proxy)? Please clarify the question and provide more details.
    – Jens Kubieziel
    Mar 26 '20 at 22:54
  • added details
    – Dr. Fix
    Mar 27 '20 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.