Skip to content

Commit

Permalink
fix: Crash when setting relative path for the privoxy bundle path
Browse files Browse the repository at this point in the history
  • Loading branch information
NaolShow committed May 21, 2021
1 parent 1f90925 commit 56c3566
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Trou/Services/PrivoxyProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ private void RefreshArguments() {
#region Paths

// Privoxy executable path
PrivoxyExe = Settings.PrivoxyFile ?? Path.Combine(Settings.PrivoxyBundlePath, "privoxy.exe");
// => Get the full path to the privoxy executable path, else it will crash
PrivoxyExe = Settings.PrivoxyFile ?? Path.Combine(Path.GetFullPath(Settings.PrivoxyBundlePath), "privoxy.exe");

#endregion

Expand Down
10 changes: 8 additions & 2 deletions TrouExample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ private static void Main() {
// - Instantiate Trou proxy

TrouProxy proxy = new TrouProxy(new TorProxySettings() {
TorBundlePath = @"C:\Users\Loan\Dropbox\Developpement\CSharp\--Network\Trou\TrouExample\bin\Debug\netcoreapp3.0\Proxies\TorProxy"

// Relative or full path to the tor bundle
TorBundlePath = @"TorProxy"

}, new TorControllerSettings() {

}, new PrivoxyProxySettings() {
PrivoxyBundlePath = @"C:\Users\Loan\Dropbox\Developpement\CSharp\--Network\Trou\TrouExample\bin\Debug\netcoreapp3.0\Proxies\PrivoxyProxy"

// Relative or full path to the privoxy bundle
PrivoxyBundlePath = @"PrivoxyProxy"

});

// - Start
Expand Down

0 comments on commit 56c3566

Please sign in to comment.