Make Tor run from appdata
MODIFY
WalletWasabi.Gui/Global.cs
WalletWasabi.Gui/Global.cs
@@ -134,7 +134,7 @@ namespace WalletWasabi.Gui
TorManager = null;
TorManager = new TorProcessManager(Config.GetTorSocks5EndPoint(), TorLogsFile);
- TorManager.Start(false);
+ TorManager.Start(false, DataDir);
Logger.LogInfo<TorProcessManager>($"{nameof(TorProcessManager)} is initialized.");

MODIFY
WalletWasabi.Tests/LiveServerTests.cs
WalletWasabi.Tests/LiveServerTests.cs
+using System;
+using System.IO;
using System.Linq;
using System.Threading.Tasks;
using NBitcoin;
@@ -24,7 +26,7 @@ namespace WalletWasabi.Tests
LiveServerTestsFixture = liveServerTestsFixture;
var torManager = new TorProcessManager(SharedFixture.TorSocks5Endpoint, SharedFixture.TorLogsFile);
- torManager.Start(ensureRunning: true);
+ torManager.Start(ensureRunning: true, dataDir: Path.GetFullPath(AppContext.BaseDirectory));
Task.Delay(3000).GetAwaiter().GetResult();
}

MODIFY
WalletWasabi/TorSocks5/TorProcessManager.cs
WalletWasabi/TorSocks5/TorProcessManager.cs
@@ -24,7 +24,7 @@ namespace WalletWasabi.TorSocks5
LogFile = logFile;
}
- public void Start(bool ensureRunning)
+ public void Start(bool ensureRunning, string dataDir)
{
new Thread(delegate () // Don't ask. This is the only way it worked on Win10/Ubuntu18.04/Manjuro(1 processor VM)/Fedora(1 processor VM)
{
@@ -52,7 +52,7 @@ namespace WalletWasabi.TorSocks5
}
}
- var torDir = Path.Combine(fullBaseDirectory, "tor");
+ var torDir = Path.Combine(dataDir, "tor");
var torPath = "";
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))

Make Tor run from appdata