foundation-Devices/tor is a multi-platform Flutter plugin for managing a Tor proxy. Based on arti.
Use rustup
, not homebrew
. Install toolchain 1.74.
cargo install cargo-ndk
Cargokit handles building, just flutter run
it or run it in Android Studio or VS Code (untested).
To update Cargokit in the future, use:
git subtree pull --prefix cargokit https://github.com/irondash/cargokit.git main --squash
To generate tor_ffi_plugin.h
C bindings for Rust, cbindgen --config cbindgen.toml --crate tor-ffi --output target/tor_ffi_plugin.h
or cargo build
in native/tor-ffi
to produce headers according to build.rs
.
To generate tor_bindings_generated.dart
Dart bindings for C, flutter pub run ffigen --config ffigen.yaml
. You will probably need to manually edit the Tor
class to be final
.
flutter run
in example
to run the example app
See example/lib/main.dart
for usage. Must run the build script for your platform first.