From e3f0f6644502e327ab528c1f13d2bb350774cddd Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Wed, 29 Nov 2023 12:01:58 -0800 Subject: [PATCH 1/2] fix update scripts to tor 0.4.8.9 --- fetch-tor-win.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch-tor-win.ps1 b/fetch-tor-win.ps1 index 5e9338f0..4fd539f5 100644 --- a/fetch-tor-win.ps1 +++ b/fetch-tor-win.ps1 @@ -1,6 +1,6 @@ Invoke-WebRequest -Uri https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.8.9-win64.zip -OutFile tor.zip -if ((Get-FileHash tor.zip -Algorithm sha512).Hash -ne 'fa8792fb64d133cd17fa0405e1e67c3135785baf05f0402e32cfbd3154ef7698b73a93969114a00cb32a27e2a17afd37987539542030aac1c828359be792843f' ) { Write-Error 'tor.zip sha512sum mismatch' } +if ((Get-FileHash tor.zip -Algorithm sha512).Hash -ne 'a1c90d9a2f82df5f3d973e260bbfec76e413417cfa276fb70d1668214e2e607cf65be86a25e30c6f7814261dc154a02568459945f31389ae6a22e03d6d0d3c4c' ) { Write-Error 'tor.zip sha512sum mismatch' } Expand-Archive -Path tor.zip -DestinationPath Tor -- 2.25.1 From c09f10b6508ca96b724f32eba7951d7f7f829428 Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Wed, 29 Nov 2023 12:08:06 -0800 Subject: [PATCH 2/2] fix update scripts to tor 0.4.8.9 mac --- lib/cwtch/ffi.dart | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/cwtch/ffi.dart b/lib/cwtch/ffi.dart index ec0f9197..aeb81df9 100644 --- a/lib/cwtch/ffi.dart +++ b/lib/cwtch/ffi.dart @@ -199,22 +199,22 @@ class CwtchFfi implements Cwtch { } } else if (Platform.isMacOS) { cwtchDir = envVars['CWTCH_HOME'] ?? path.join(envVars['HOME']!, "Library/Application Support/Cwtch"); - if (await File("Cwtch.app/Contents/MacOS/Tor/tor.real").exists()) { - bundledTor = "Cwtch.app/Contents/MacOS/Tor/tor.real"; - } else if (await File("/Applications/Cwtch.app/Contents/MacOS/Tor/tor.real").exists()) { - bundledTor = "/Applications/Cwtch.app/Contents/MacOS/Tor/tor.real"; - } else if (await File("/Volumes/Cwtch/Cwtch.app/Contents/MacOS/Tor/tor.real").exists()) { - bundledTor = "/Volumes/Cwtch/Cwtch.app/Contents/MacOS/Tor/tor.real"; - } else if (await File("/Applications/Tor Browser.app/Contents/MacOS/Tor/tor.real").exists()) { - bundledTor = "/Applications/Tor Browser.app/Contents/MacOS/Tor/tor.real"; + if (await File("Cwtch.app/Contents/MacOS/Tor/tor").exists()) { + bundledTor = "Cwtch.app/Contents/MacOS/Tor/tor"; + } else if (await File("/Applications/Cwtch.app/Contents/MacOS/Tor/tor").exists()) { + bundledTor = "/Applications/Cwtch.app/Contents/MacOS/Tor/tor"; + } else if (await File("/Volumes/Cwtch/Cwtch.app/Contents/MacOS/Tor/tor").exists()) { + bundledTor = "/Volumes/Cwtch/Cwtch.app/Contents/MacOS/Tor/tor"; + } else if (await File("/Applications/Tor Browser.app/Contents/MacOS/Tor/tor").exists()) { + bundledTor = "/Applications/Tor Browser.app/Contents/MacOS/Tor/tor"; print("We couldn't find Tor in the Cwtch app directory, however we can fall back to the Tor Browser binary"); } else { var splitPath = path.split(dirname(Platform.script.path)); if (splitPath[0] == "/" && splitPath[1] == "Applications") { var appName = splitPath[2]; print("We're running in /Applications in a non standard app name: $appName"); - if (await File("/Applications/$appName/Contents/MacOS/Tor/tor.real").exists()) { - bundledTor = "/Applications/$appName/Contents/MacOS/Tor/tor.real"; + if (await File("/Applications/$appName/Contents/MacOS/Tor/tor").exists()) { + bundledTor = "/Applications/$appName/Contents/MacOS/Tor/tor"; } } } -- 2.25.1