
RWR: Onlooker Alert
RWR watches through the front camera for people looking at your screen from behind (shoulder surfers).
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
RWR watches through the front camera for people looking at your screen from behind (shoulder surfers). When it sees one, it:
It runs in the background and can be toggled from the Quick Settings panel ("Onlooker alert" tile).
Faces are found with YuNet (the same open-source detector the server uses), which also spots small faces.
Detection runs on the phone by default (offline, bundled models). Or pair the app with your own RWR server and the phone just streams frames to it.
The server does the heavy work: every frame, full resolution, a stronger face detector (YuNet) that also finds small, distant faces, and iris tracking on every face. Your phone spends no CPU on detection. It also uploads snapshots and clips to Immich.
git clone https://github.com/revocx35/RWR && cd RWR/server cp .env.example .env # set RWR_TLS_HOSTNAMES to the server's LAN IP / hostname docker compose pull && docker compose up -d # prebuilt image (or: docker compose up -d --build) docker compose logs rwr | grep -A4 "first start" # one-time admin password
Open https://<server>:8443. The certificate is self-signed: compare the SHA-256 fingerprint in the log with the browser's before continuing. Sign in and change the password. Turning on two-factor authentication (Account page) is recommended.
Devices → Create pairing code, then in the app: Server → Pair with server and scan the QR code.
In the app, choose Detection runs: On server. Optionally set up Immich in Settings (web UI, or Server settings in the app) and choose Save to: Immich or Both.
Security:
Behind a reverse proxy (Nginx Proxy Manager etc.): set RWR_TLS=off, RWR_PUBLIC_URL=https://<your domain>, RWR_TRUSTED_PROXIES=<proxy IP> and RWR_PAIRING_PIN=none in .env. Point the proxy at http://<server>:8443 with WebSocket support and a valid (e.g. Let's Encrypt) certificate, and make sure only the proxy can reach port 8443.
Live view (web UI → Live): watch what the server's detector sees on a streaming phone, with every face labelled (you / looking / not looking / not a face) and its angles. It shows a live camera picture, so it's off until you switch it on in Settings; phones can't switch it on, every viewing is logged, and the phone shows when it's being watched.
Locked out? docker compose exec rwr python -m rwr_server.admin reset-password
Grab the APK from Releases (F-Droid: coming soon). arm64-v8a fits almost every current phone; universal works everywhere. Install it and open RWR.
Grant Camera, Notifications, and Display over other apps (needed for the pop-up).
Tap Start watching, or add the Quick Settings toggle.
Settings:
App: JDK 17+ and the Android SDK (compileSdk 37). The first build downloads the eye-tracking model (checksum-verified).
echo "sdk.dir=/path/to/android-sdk" > local.properties ./gradlew testDebugUnitTest assembleDebug ./gradlew assembleRelease # per-ABI + universal APKs, signed if keystore.properties exists
Server tests: cd server && docker build -t rwr-server:dev . && docker run --rm -u 0 -v $PWD:/src -w /src rwr-server:dev sh -c "pip install pytest==9.1.1 && python -m pytest tests"
See ARCHITECTURE.md for how it works and AGENTS.md for contributor and agent notes.
RWR is free software, licensed under the GNU General Public License v3.0. Bundled models: YuNet face detector (OpenCV Zoo, MIT) and MediaPipe Face Landmarker (Apache-2.0); libraries: MediaPipe Tasks and LiteRT (Apache-2.0), OkHttp, ZXing, AndroidX (Apache-2.0).
If your RWR server is behind authentik forward auth, the app signs in with authentik (once, in the browser) when pairing or when authentik asks again. Setup: docs/authentik.md.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。