
Kotlin Multiplatform ArtiTor(Rust) wrapper for bitchat
Kotlin Multiplatform wrapper over Arti (Tor, implemented in Rust). One dependency gives you an embedded Tor client with a local SOCKS proxy and first-class bootstrap status — no native build, no hand-written JNI, no log scraping.
.so are 16 KB-page aligned (Google Play, Nov 2025).PoC proven end-to-end on Android (arm64, on-device) and the iOS simulator: bootstrap to 100% over the real Tor network, then an HTTP request through the SOCKS proxy exits via a Tor relay.
// settings.gradle.kts -> dependencyResolutionManagement { repositories { mavenCentral() } }
commonMain.dependencies {
implementation("com.yet.tor:tor:0.1.2")
}The Android .so for all four ABIs are bundled inside the AAR (jniLibs); AGP merges them into your
APK automatically. The iOS static library ships transitively via the KMP artifact. No native or
Gradle configuration is required in the consumer app.
val tor = ArtiTorClient()
scope.launch {
tor.status.collect { s -> println("Tor ${s.state} ${s.bootstrapPercent}% socks=${s.socksPort}") }
}
// dataDir is provided by you (Android: filesDir-relative; iOS: Application Support / Caches).
tor.start(ArtiConfig(dataDir = dir, socksPort = 9050)).getOrThrow()
// "Proxy ready" == state == RUNNING && bootstrapPercent == 100 && socksPort != null.
// Route traffic through 127.0.0.1:<socksPort> (e.g. java.net.Proxy(SOCKS) on Android).
tor.stop()INTERNET and any foreground-service declaration belong in
the app manifest..so delivery: if you don't want the .so in the base APK, use Play Feature
Delivery / a dynamic feature module — declared by the app, not this library.Required: Android arm64-v8a / armeabi-v7a / x86 / x86_64, iosArm64, iosSimulatorArm64.
Scaffolded (easy to enable): macOS, Linux, Windows desktop. wasm is unsupported — browsers have
no raw TCP, so Tor cannot work there.
Apache-2.0. Bundles Arti (© The Tor Project, Apache-2.0/MIT). See NOTICE.
Kotlin Multiplatform wrapper over Arti (Tor, implemented in Rust). One dependency gives you an embedded Tor client with a local SOCKS proxy and first-class bootstrap status — no native build, no hand-written JNI, no log scraping.
.so are 16 KB-page aligned (Google Play, Nov 2025).PoC proven end-to-end on Android (arm64, on-device) and the iOS simulator: bootstrap to 100% over the real Tor network, then an HTTP request through the SOCKS proxy exits via a Tor relay.
// settings.gradle.kts -> dependencyResolutionManagement { repositories { mavenCentral() } }
commonMain.dependencies {
implementation("com.yet.tor:tor:0.1.2")
}The Android .so for all four ABIs are bundled inside the AAR (jniLibs); AGP merges them into your
APK automatically. The iOS static library ships transitively via the KMP artifact. No native or
Gradle configuration is required in the consumer app.
val tor = ArtiTorClient()
scope.launch {
tor.status.collect { s -> println("Tor ${s.state} ${s.bootstrapPercent}% socks=${s.socksPort}") }
}
// dataDir is provided by you (Android: filesDir-relative; iOS: Application Support / Caches).
tor.start(ArtiConfig(dataDir = dir, socksPort = 9050)).getOrThrow()
// "Proxy ready" == state == RUNNING && bootstrapPercent == 100 && socksPort != null.
// Route traffic through 127.0.0.1:<socksPort> (e.g. java.net.Proxy(SOCKS) on Android).
tor.stop()INTERNET and any foreground-service declaration belong in
the app manifest..so delivery: if you don't want the .so in the base APK, use Play Feature
Delivery / a dynamic feature module — declared by the app, not this library.Required: Android arm64-v8a / armeabi-v7a / x86 / x86_64, iosArm64, iosSimulatorArm64.
Scaffolded (easy to enable): macOS, Linux, Windows desktop. wasm is unsupported — browsers have
no raw TCP, so Tor cannot work there.
Apache-2.0. Bundles Arti (© The Tor Project, Apache-2.0/MIT). See NOTICE.