Skip to content

Latest commit

 

History

History
41 lines (25 loc) · 1.34 KB

README.md

File metadata and controls

41 lines (25 loc) · 1.34 KB

tor

foundation-Devices/tor is a multi-platform Flutter plugin for managing a Tor proxy. Based on arti.

Getting started

Use rustup, not homebrew. Install toolchain 1.74.

Install cargo ndk

cargo install cargo-ndk

Cargokit

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

Development

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.

Example app

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.