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

  1. The APK is downloaded on the phone from the homepage's link, or on a computer and copied over.
  2. On a computer, shasum -a 256 nfltr-android-<version>.apk prints 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.
  3. 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

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