joelverhagen / TorSharp

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

Windows 7 does not support virtual desktop #58

Closed JanPokorny closed 3 years ago

JanPokorny commented 3 years ago

Attempting to use virtual desktop (which is the default option on Windows) throws an exception on Windows 7. This is easily resolved by checking System.Environment.OSVersion.Version to be less than 6.2 (details) and reverting to standard mode. You may consider implementing this check in the library itself.

JanPokorny commented 3 years ago

The current workaround for supporting Windows 7 is having this in TorSharpSettings:

ToolRunnerType =
    Environment.OSVersion.Version < new Version(6, 2)
    ? ToolRunnerType.Simple
    : ToolRunnerType.VirtualDesktop
joelverhagen commented 3 years ago

I'd like to get this built into TorSharp, I'm just a bit slammed with other commitments right now.

joelverhagen commented 3 years ago

This has been fixed in 2.5.0. Thanks for the suggestion! https://www.nuget.org/packages/Knapcode.TorSharp/2.5.0