-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Tor HTTPTunnelPort #75
Comments
OMG how did I not know of this? If I understand correctly, does this completely eliminate the need for Privoxy? |
From https://gitweb.torproject.org/tor.git/plain/ChangeLog, it looks like this feature was added in this release:
That's 2 years after I started the project. I guess I should have been staying on top of new features 😄. Thanks for the heads up! |
Okay, I've investigated the current state:
Privoxy supports both HTTP proxy and HTTP CONNECT on the same port. This is why .NET works so well with it because Privoxy can handle both modes that .NET sends. If you know all of the URLs you're hitting with using (var proxy = new TorSharpProxy(settings))
{
var handler = new HttpClientHandler
{
Proxy = new WebProxy(new Uri("http://localhost:" + settings.TorSettings.HttpTunnelPort))
};
using (handler)
using (var httpClient = new HttpClient(handler))
{
await proxy.ConfigureAndStartAsync();
Console.WriteLine(await httpClient.GetStringAsync("https://api.ipify.org"));
}
proxy.Stop();
} In short, for the purposes of this library, this is a great addition for extensibility purposes but Privoxy is still necessary for the non-HTTPS URL case. |
Yep, was down that rabbit whole yesterday, hehe. Interesting distinction with HTTP vs HTTPS! That was tripping me up too! |
Release in TorSharp 2.8.0. Thanks again, @kzu! |
See https://2019.www.torproject.org/docs/tor-manual.html.en#HTTPTunnelPort
The text was updated successfully, but these errors were encountered: