nfltr on Android
The nfltr Android app runs the released nfltr command on an arm64 phone with Android 8.0 or newer. The phone joins an organisation as a machine of its own; apps on the phone then reach the organisation's services through local ports, and files go to and from other machines. It is a preview.
The download
Each release that includes the app publishes nfltr-android-<version>.apk beside the command line downloads, listed with its SHA-256 in that release's signed SHA256SUMS and manifest.json. The homepage links the newest one with its SHA-256 and the SHA-256 fingerprint of the certificate it is signed with.
The APK is signed with nfltr's Android release key. Android installs an update only when it is signed with the same key as the installed app, so every later release installs over this one.
Installing
- The APK is downloaded on the phone from the homepage's link, or on a computer and copied over.
- On a computer,
shasum -a 256 nfltr-android-<version>.apkprints the SHA-256 to compare with the one the homepage lists.apksigner verify --print-certs nfltr-android-<version>.apk(Android SDK build tools) prints the signing certificate's SHA-256 digest, the fingerprint the homepage lists. - Opening the APK on the phone installs it. Android first asks to allow installs from the app that opened it (the browser or the file manager), once.
Joining an organisation
The phone joins as a machine of the organisation. On the organisation root's machine:
nfltr machines add phone --group mobile
prints a single-use code. Pasted into the app's Join screen, the code enrols the phone: the app runs nfltr join with the code on its input, never on a command line or in a log, and screenshots of the screen are blocked while the field holds it. The organisation's access rules decide which services the phone may use.
Forwards
The Forwards screen lists the services the relay lists for the phone. Each row has a port on the phone (2222 suggested for a service named ssh, else the first free port from 8000) and a switch. A forward that is on is one nfltr forward <name> --listen 127.0.0.1:<port>: an SSH client or a browser on the phone connects to that port, end to end encrypted to the serving machine. A listed service can still refuse the phone until an access rule admits it, and the row then shows the refusal. Forwards run in a foreground service with a persistent notification, and the ones that were on come back after a reboot or an app update.
Sending and receiving files
- Send: in Android's share sheet, "nfltr: send" sends one or several files, of any type, to a service the relay lists or to a typed
<machine>/<service>, withnfltr cp. A refusal (no rule, a name already there) is shown as such. - Inbox: a switch serves
<phone>/inbox, where machines a rule admits may send files. A rule on the root's machine admits a sender, for examplenfltr access allow desk phone/inbox. Received files stay in the app's private storage, with Open, Share, Save and Delete.
Without the app: Termux
The same client runs in Termux (installed from F-Droid) on an arm64 phone. The installer sees Termux and puts nfltr into $PREFIX/bin:
pkg install curl
curl -fsSL https://nfltr.xyz/install.sh | sh
nfltr join --code-file -
termux-wake-lock
nfltr forward desk/ssh --listen 127.0.0.1:2222
nfltr join --code-file - reads the code from nfltr machines add phone on its input (paste, Enter, Ctrl+D). termux-wake-lock keeps Android from suspending Termux while the phone sleeps. The machine key and certificate are files under Termux's home (~/.config/nfltr).
What it is not
- A preview. Screens and behaviour can change from one release to the next.
- Connect-only, apart from its inbox. The phone reaches services of the organisation; the only service it offers is its own inbox, and only while that switch is on.
- Its key is a file in the app's private storage, not in Android's hardware-backed Keystore, until a later build moves it there. A rooted phone can read it. Revoking the phone,
nfltr machines revoke phoneon the root's machine, ends its access; Leave organisation in the app deletes the key and certificate on the phone only. - Not kept alive by Android. Android may stop the foreground service to save battery; exempting nfltr from battery optimisation keeps forwards running.
- arm64 only. No build for other processor types.