File size: 4,547 Bytes
b855ced | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | # Platforms
**Supported:** GNU/Linux, with the [desktop app](../desktop/README.md), and
the web client hosted by a server (in Tor Browser at the Standard security
level, or any modern browser).
**Planned, not supported:** everything below. There are no test machines for
these platforms yet, so nothing here has been built or tested. This page
records the intended approach, so that work started later fits the rest of
Taper.
## The common design
Every app follows the same pattern as the Linux desktop app:
- **A thin native shell around the same bundled web client.** The
cryptography lives only in that client (vodozemac with the Matrix Rust
SDK's crypto state machine, and opaque-ke, as WebAssembly). Shells never
reimplement it, and never load client code from a server.
- **Tor built in.** The shell runs Tor, or uses the system's Tor, and routes
every connection through it, with host names resolved by Tor.
- **A locked-down web view:** no navigation away from the bundled client,
no new windows, no developer tools, no WebRTC, every permission refused.
- **Signed releases**, once they exist (see the
[proposal](design/signed-releases.md)).
The web view must support WebAssembly, WebCrypto in a secure context, and
IndexedDB, and must send `.onion` names to the proxy rather than to DNS. Each
platform's shell needs a test like `desktop/test_desktop.py` that checks
these points.
## Tor on mobile: Arti
**Decided:** the Android and iOS apps embed **Arti**, the Tor Project's
Rust implementation of Tor. Reasons:
- It's built to be embedded as a library, which the C `tor` isn't.
- Rust removes the memory-safety bugs that come with C.
- The Tor Project is moving its own work to it.
The app runs Arti in-process and points its web view at Arti's local SOCKS
port, exactly as the desktop app does with its private `tor`.
Bridges work the same way as on the desktop (WebTunnel, obfs4, Snowflake),
with one difference: iOS doesn't let apps start other programs. The
transports must therefore run inside the app, for example through IPtProxy,
the library that packages lyrebird and Snowflake for Orbot and Onion
Browser.
Before building, check that the Arti release in use supports what Taper
needs as a client: connecting to onion services, bridges with pluggable
transports, and stream isolation.
**Not changing:** servers and the Linux desktop app stay on C `tor` for now.
C `tor` hosts onion services with mature defences, including proof-of-work
against introduction floods, and it comes from the distribution with its
security updates. Revisit once Arti matches it for hosting onion services.
## Windows (planned)
WebKitGTK doesn't support Windows, so the GTK shell can't simply be
reused. The likely shell is a small native app around Microsoft's WebView2
(Chromium-based), with Tor's Windows expert bundle. Open questions: shipping
and updating Tor, and signing builds so that Windows' SmartScreen accepts
them.
## macOS (planned)
A Swift shell around WKWebView, the macOS equivalent of the iOS app below,
is more natural than GTK on macOS. Tor would be bundled. Distributing outside
the App Store still needs Apple's notarization, or users must override
Gatekeeper.
## Android (planned)
A Kotlin shell around Android's WebView, which supports WebAssembly, with
Arti embedded (see above). Distributed through F-Droid and as a signed APK, not
Google Play first. Android may stop background connections, so offline
devices rely on push notifications, which carry only event IDs (see the Push
Gateway API).
## iOS (planned, unofficial)
There will be no App Store app. The plan is a Swift shell around WKWebView,
with Arti embedded (see above). Things to know:
- **Building needs a Mac** with Xcode.
- **Installing without the App Store:** AltStore or SideStore (an app signed
with a free Apple ID has to be re-signed every 7 days), or, in the EU, an
alternative app marketplace (Apple still has to notarize the app).
- **Lockdown Mode probably breaks it.** Apple's Lockdown Mode is believed to
turn off WebAssembly in web views, as Tor Browser's Safer level does. The
people most likely to use Lockdown Mode are the ones Taper is for. This
needs checking on a device before any work starts. If it's true, iOS needs
a client whose cryptography is native code (the Matrix Rust SDK's Swift
bindings, and opaque-ke compiled for iOS), which is a much larger project.
- iOS suspends apps in the background, so delivery to closed apps depends on
push notifications, which carry only event IDs.
|