diff --git a/fetch-tor-macos.sh b/fetch-tor-macos.sh index 0d3e2ac7..a1071966 100755 --- a/fetch-tor-macos.sh +++ b/fetch-tor-macos.sh @@ -1,7 +1,7 @@ #!/bin/sh cd macos -curl https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-macos-0.4.6.7.tar.gz --output tor.tar.gz +curl https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-macos-0.4.7.8.tar.gz --output tor.tar.gz tar -xzf tor.tar.gz chmod a+x Tor/tor.real cd .. diff --git a/fetch-tor-win.ps1 b/fetch-tor-win.ps1 index 1827f3b5..7e7c4a01 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-win64-0.4.6.9.zip -OutFile tor.zip +Invoke-WebRequest -Uri https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-win64-0.4.7.8.zip -OutFile tor.zip -if ((Get-FileHash tor.zip -Algorithm sha512).Hash -ne 'bd99de56ef5ef9516410783ce48d52311093b26e718bf3d0a94efbd754d1cf2d12543f096139d9c289985349d26ee89b2308be5927fa1b410ff4f7f3129d6830' ) { Write-Error 'tor.zip sha512sum mismatch' } +if ((Get-FileHash tor.zip -Algorithm sha512).Hash -ne '5b8f900a37f6e90d7a945b3903d769383c7478042cb43b2105d2374186e1a536f1a4758a2823d1d5be71d53a81dcfd8243293e04f82812d355983df322823cf4' ) { Write-Error 'tor.zip sha512sum mismatch' } Expand-Archive -Path tor.zip -DestinationPath Tor diff --git a/fetch-tor.sh b/fetch-tor.sh index 925dd60c..ca71ca7b 100755 --- a/fetch-tor.sh +++ b/fetch-tor.sh @@ -1,12 +1,14 @@ #!/bin/sh -wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.5.9-linux-x86_64 -O linux/tor -chmod a+x linux/tor +cd linux +wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.7.8-linux-x86_64.tar.gz -O tor.tar.gz +tar -xzf tor.tar.gz +cd .. mkdir -p android/app/src/main/jniLibs/arm64-v8a -wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.6.9-arm64 -O android/app/src/main/jniLibs/arm64-v8a/libtor.so +wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.7.10-arm64 -O android/app/src/main/jniLibs/arm64-v8a/libtor.so chmod a+x android/app/src/main/jniLibs/arm64-v8a/libtor.so mkdir -p android/app/src/main/jniLibs/armeabi-v7a -wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.6.9-arm7 -O android/app/src/main/jniLibs/armeabi-v7a/libtor.so +wget https://git.openprivacy.ca/openprivacy/buildfiles/raw/branch/master/tor/tor-0.4.7.10-arm7 -O android/app/src/main/jniLibs/armeabi-v7a/libtor.so chmod a+x android/app/src/main/jniLibs/armeabi-v7a/libtor.so diff --git a/lib/cwtch/ffi.dart b/lib/cwtch/ffi.dart index 408a1c86..b1b63bc9 100644 --- a/lib/cwtch/ffi.dart +++ b/lib/cwtch/ffi.dart @@ -153,14 +153,14 @@ class CwtchFfi implements Cwtch { String cwtchDir = ""; if (Platform.isLinux) { cwtchDir = envVars['CWTCH_HOME'] ?? path.join(envVars['HOME']!, ".cwtch"); - if (await File("linux/tor").exists()) { - bundledTor = "linux/tor"; - } else if (await File("lib/tor").exists()) { - bundledTor = "lib/tor"; - } else if (await File(path.join(home, ".local/lib/cwtch/tor")).exists()) { - bundledTor = path.join(home, ".local/lib/cwtch/tor"); - } else if (await File("/usr/lib/cwtch/tor").exists()) { - bundledTor = "/usr/lib/cwtch/tor"; + if (await File("linux/Tor/tor").exists()) { + bundledTor = "linux/Tor/tor"; + } else if (await File("lib/Tor/tor").exists()) { + bundledTor = "lib/Tor/tor"; + } else if (await File(path.join(home, ".local/lib/cwtch/Tor/tor")).exists()) { + bundledTor = path.join(home, ".local/lib/cwtch/Tor/tor"); + } else if (await File("/usr/lib/cwtch/Tor/tor").exists()) { + bundledTor = "/usr/lib/cwtch/Tor/tor"; } else { bundledTor = "tor"; } diff --git a/linux/package-release.sh b/linux/package-release.sh index 33e20157..448adab2 100755 --- a/linux/package-release.sh +++ b/linux/package-release.sh @@ -8,4 +8,4 @@ cp linux/cwtch build/linux/x64/release/bundle/ cp README.md build/linux/x64/release/bundle/ cp linux/cwtch.png build/linux/x64/release/bundle/ cp linux/libCwtch.so build/linux/x64/release/bundle/lib/ -cp linux/tor build/linux/x64/release/bundle/lib +cp -r linux/Tor build/linux/x64/release/bundle/lib