nopara73 / DotNetTor

Library implementation of essential Tor features in .NET Core.
https://www.nuget.org/packages/DotNetTor
MIT License
77 stars 21 forks source link

multithreading? #21

Open amervelic opened 6 years ago

amervelic commented 6 years ago

Is it possible to use DotNetTor in the multithreading application.

nopara73 commented 6 years ago

What you can download with the NuGet is different from the source code here, that's an older version and that doesn't multithread. In the meantime I completely rewritten DotNetTor from the bottom up to make it multithreaded and much more performant, but didn't quite got it right. There were a lot of problems, but most painfully I had to turn off multithreading altogether for Linux and OSX:

https://github.com/nopara73/DotNetTor/blob/fc438daa573145b12d4ae1d93364797858bc244f/src/DotNetTor/TorSocks5Handler.cs#L72

However I had other problems, too and I didn't have the time to fix them all, so I ended up elevating out the relevant code in the application I am using it: https://github.com/zkSNACKs/WalletWasabi/blob/master/WalletWasabi.Tests/TorTests.cs

So for now, the old version, that's up on the NuGet and documented everywhere is the stable one, while this GitHub repo is in an advanced, but unstable state.