Backported Foundation Devices fixes#34
Open
sneurlax wants to merge 4 commits into
Open
Conversation
Backport of Foundation-Devices' GrapheneOS crash fix. Replace the assert!(!client.is_null()) panics in tor_client_bootstrap and tor_client_set_dormant with graceful null guards so calling these before start (or after stop) returns instead of aborting the process, which crashed the app on GrapheneOS in particular. Also make stop() idempotent: return early when the proxy is already stopped and reset the client state afterwards. Add preemptive-circuit tuning to tor_start to reduce needless circuit building.
Backport of Foundation-Devices' fix. Bind to port 0 and read back the port the OS assigns instead of guessing a random port and retrying on collision. This is the standard, race-free way to obtain a free port and removes the now-unused dart:math import.
Backport of Foundation-Devices' change. Pass the linker flags -Wl,--hash-style=both and -Wl,-z,max-page-size=16384 when building the Rust library for Android so the shared object loads on devices with 16 KB memory pages (required for Android 15+ on such hardware).
Backport of Foundation-Devices' fix. AGP 8+ rejects the package attribute in the manifest; the namespace is already declared in android/build.gradle (com.cypherstack.tor_ffi_plugin). Leaving the attribute in place fails downstream consumers' processDebugManifest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today I compared Foundation-Devices/tor to our downstream cypherstack/tor. These are the fixes we do not have yet.
Closes #23