diff --git a/.gitignore b/.gitignore index aa8cd24..2e799f0 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ android/build/ CLAUDE.md android/*.keystore __pycache__/ +scripts/relay.env diff --git a/README.md b/README.md index dcc4b15..dc545c7 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ A Signal-style desktop SMS/MMS client for [voip.ms](https://voip.ms) and Google - Keeps your whole message history locally (SQLite), with full-text search - Group chats, MMS, reactions, emoji shortcodes, GNOME contacts -- Optional end-to-end-sealed relay to sync with the Rabbit R1 (`server/`) +- Optional relay server to sync with the Rabbit R1: it only ever holds sealed messages (`server/`, deployed with `scripts/deploy-relay.sh`) ## Run diff --git a/android/README.md b/android/README.md index 8d56bf5..cbc3775 100644 --- a/android/README.md +++ b/android/README.md @@ -87,7 +87,7 @@ Install/Sync buttons then target the dev app with the sandbox's made-up data. side, through `MmsFiles`. Long texts go as multipart SMS; photos, voice notes and group chats as MMS (needs mobile data on). The dev app's sandbox never uses the SIM. -- Relay (`Relay`, `RelayJob`): the desktop's link through jai (its +- Relay (`Relay`, `RelayJob`): the desktop's link through the relay server (its `src/main/relay.ts`, server `server/bubble_relay.py`). config.json's `relay` (address, token, AES-256-GCM key) comes from Sync to Rabbit. The SIM's messages go to the desktop, sends typed there go out here (each one at most @@ -96,7 +96,7 @@ Install/Sync buttons then target the dev app with the sandbox's made-up data. of its own: it rides along with `PollJob`'s checks, plus one network job a few seconds after something happens here (a text in, a send done, a swipe or rename), and a catch-up when the app is opened (at most once a minute). Plain - http is allowed only to jai's tailscale address and localhost - (`res/xml/network_security_config.xml`). + http is allowed only to a tailscale (100.64/10) address and localhost + (`Config`; `res/xml/network_security_config.xml` lets cleartext through). - The scroll wheel is left alone: it stays the volume control (and volume down + the side button still takes a screenshot). diff --git a/android/app/src/main/java/me/teafry/voipmessages/Config.java b/android/app/src/main/java/me/teafry/voipmessages/Config.java index a4c65d1..1cbccd4 100644 --- a/android/app/src/main/java/me/teafry/voipmessages/Config.java +++ b/android/app/src/main/java/me/teafry/voipmessages/Config.java @@ -53,7 +53,7 @@ final class Config { final List dids = new CopyOnWriteArrayList<>(); private boolean hasSim; String defaultDid; - /** The relay through jai (Relay.java): address, bearer token, and the 32-byte key that seals everything. */ + /** The relay server (Relay.java): address, bearer token, and the 32-byte key that seals everything. */ String relayUrl, relayToken; byte[] relayKey; /** Made-up data for testing (android/tools/push_sandbox.py): never goes online. */ @@ -127,8 +127,8 @@ final class Config { if (r != null) { String url = r.optString("url", ""), token = r.optString("token", ""); byte[] key = android.util.Base64.decode(r.optString("key", ""), android.util.Base64.DEFAULT); - // Only the addresses network_security_config lets through, and a real key. - if (url.matches("http://(100\\.\\d+\\.\\d+\\.\\d+|127\\.0\\.0\\.1)(:\\d+)?|https://[^/]+") && !token.isEmpty() && key.length == 32) { + // Plain http only to a tailscale (100.64/10) address or localhost, as the desktop allows, and a real key. + if (url.matches("http://(100\\.(6[4-9]|[7-9]\\d|1[01]\\d|12[0-7])\\.\\d+\\.\\d+|127\\.0\\.0\\.1)(:\\d+)?|https://[^/]+") && !token.isEmpty() && key.length == 32) { cfg.relayUrl = url; cfg.relayToken = token; cfg.relayKey = key; diff --git a/android/app/src/main/java/me/teafry/voipmessages/Relay.java b/android/app/src/main/java/me/teafry/voipmessages/Relay.java index c6c0ac1..9fcd5d0 100644 --- a/android/app/src/main/java/me/teafry/voipmessages/Relay.java +++ b/android/app/src/main/java/me/teafry/voipmessages/Relay.java @@ -28,13 +28,13 @@ import javax.crypto.spec.GCMParameterSpec; import javax.crypto.spec.SecretKeySpec; /** - * The relay through jai (the desktop's src/main/relay.ts; server in + * The relay server (the desktop's src/main/relay.ts; server in * server/bubble_relay.py): the SIM's texts go to the desktop, texts typed * there go out over the SIM here, and chat names and read/unread/archived * stay in step without a cable. * * Everything is AES-256-GCM sealed with the key the desktop handed over USB - * (config.json "relay"); jai only passes blobs on. It runs with the checks + * (config.json "relay"); the relay server only passes blobs on. It runs with the checks * the Rabbit already makes (PollJob) plus one network job after something * happens here (a text, a send, a swipe), never on a timer of its own: the * battery pays for nothing new while nothing's going on. @@ -141,7 +141,7 @@ final class Relay { // ---- one sync ---- - /** One round with jai (more while there's more). Off the main thread; quiet when jai's unreachable. */ + /** One round with the relay server (more while there's more). Off the main thread; quiet when it's unreachable. */ static void sync(Context c) { Config cfg = Config.get(c); if (!configured(cfg)) return; @@ -241,11 +241,11 @@ final class Relay { h.put("Authorization", "Bearer " + cfg.relayToken); h.put("Content-Type", "application/json"); Http.Response r = Http.request("POST", cfg.relayUrl + "/sync", h, body, 120_000); - if (r.status == 401) throw new Exception("jai turned down the token (Sync to Rabbit from the desktop again)"); - if (r.status != 200) throw new Exception("jai answered " + r.status); + if (r.status == 401) throw new Exception("The relay server turned down the token (Sync to Rabbit from the desktop again)"); + if (r.status != 200) throw new Exception("The relay server answered " + r.status); JSONObject res = new JSONObject(new String(r.body, StandardCharsets.UTF_8)); - // jai has them now. + // The relay server has them now. if (resultsPushed > 0) takeList(c, "results", resultsPushed); if (wantsDone > 0) takeList(c, "wants", wantsDone); SharedPreferences.Editor ed = p.edit().putLong("smsLast", newSms[0]).putLong("mmsLast", newMms[0]); diff --git a/android/app/src/main/java/me/teafry/voipmessages/SettingsActivity.java b/android/app/src/main/java/me/teafry/voipmessages/SettingsActivity.java index 9121972..6f29975 100644 --- a/android/app/src/main/java/me/teafry/voipmessages/SettingsActivity.java +++ b/android/app/src/main/java/me/teafry/voipmessages/SettingsActivity.java @@ -144,7 +144,7 @@ public final class SettingsActivity extends BaseActivity { } if (Relay.configured(cfg)) { - section("Relay (jai)"); + section("Relay server"); kv("Desktop link", Relay.status(c)); note("Texts typed on the desktop for \"via SIM\" go out at this Rabbit's background check, and chat names and read status" + " go both ways. Sealed with a key only the desktop and this Rabbit have."); diff --git a/android/app/src/main/res/xml/network_security_config.xml b/android/app/src/main/res/xml/network_security_config.xml index a684915..f09587d 100644 --- a/android/app/src/main/res/xml/network_security_config.xml +++ b/android/app/src/main/res/xml/network_security_config.xml @@ -1,11 +1,9 @@ - + localhost for testing it with adb reverse. Its address is a setting, so + cleartext can't be pinned to it here: Config only accepts http:// for a + tailscale (100.64/10) address or 127.0.0.1, and nothing else uses http. --> - - - 100.69.139.40 - 127.0.0.1 - + diff --git a/android/build.py b/android/build.py index bd5450f..f9007b7 100644 --- a/android/build.py +++ b/android/build.py @@ -26,8 +26,8 @@ import sys import zipfile from pathlib import Path -VERSION_NAME = "0.7.7" -VERSION_CODE = 15 +VERSION_NAME = "0.7.8" +VERSION_CODE = 16 PACKAGE = "me.teafry.voipmessages" DEV_PACKAGE = PACKAGE + ".dev" diff --git a/package-lock.json b/package-lock.json index 6c36618..d032beb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "voipms-desktop", - "version": "0.7.1", + "version": "0.9.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "voipms-desktop", - "version": "0.7.1", + "version": "0.9.5", "hasInstallScript": true, "dependencies": { "better-sqlite3": "^13.0.3" diff --git a/package.json b/package.json index 35ac4cf..7fdf4a0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "voipms-desktop", "productName": "bubble", - "version": "0.9.4", + "version": "0.9.5", "description": "Signal-style desktop SMS client for voip.ms", "author": "trav ", "private": true, diff --git a/resources/android/VoipMessages.apk b/resources/android/VoipMessages.apk index fc59aef..09165f4 100644 Binary files a/resources/android/VoipMessages.apk and b/resources/android/VoipMessages.apk differ diff --git a/resources/android/VoipMessages.json b/resources/android/VoipMessages.json index 598e3c5..982d971 100644 --- a/resources/android/VoipMessages.json +++ b/resources/android/VoipMessages.json @@ -1 +1 @@ -{"version_name": "0.7.7", "version_code": 15, "package": "me.teafry.voipmessages"} +{"version_name": "0.7.8", "version_code": 16, "package": "me.teafry.voipmessages"} diff --git a/scripts/deploy-jai.sh b/scripts/deploy-jai.sh deleted file mode 100755 index 93c25ca..0000000 --- a/scripts/deploy-jai.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# Deploy bubble-relay to jai (see ~/Documents/shared-resources/jai.html#run). -# jai is production: this only ever touches ~/Documents/bubble-server and its -# own screen session, and installs nothing. -# -# scripts/deploy-jai.sh copy the code and (re)start the service -# scripts/deploy-jai.sh --stop stop it -# scripts/deploy-jai.sh --token print the bearer token, for Settings → Rabbit relay on the desktop -# -# What runs is server/run.sh, also started by jai's ~/startup.sh (re-run by its -# watchdog every 5 minutes), so it comes back after a crash or a reboot. -set -euo pipefail -HOST=${JAI_HOST:-jai-ext} -DIR=/home/jai/Documents/bubble-server -NAME=bubble-relay -cd "$(dirname "$0")/.." - -case "${1:-}" in - --token) ssh "$HOST" "cat $DIR/data/token"; echo; exit 0 ;; - --stop) ssh "$HOST" "screen -S $NAME -X quit || true"; echo "stopped"; exit 0 ;; -esac - -ssh "$HOST" "mkdir -p $DIR/app $DIR/data ~/service-logs && chmod 700 $DIR $DIR/data" -rsync -a server/bubble_relay.py server/run.sh "$HOST:$DIR/app/" -ssh "$HOST" bash -s </dev/null || true -sleep 1 -screen -dmS $NAME bash -c 'bash $DIR/app/run.sh 2>&1 | tee ~/service-logs/$NAME.log' -sleep 2 -for pid in \$(pgrep -f bubble_relay.py); do echo 1000 > /proc/\$pid/oom_score_adj; done -curl -s -m 5 http://100.69.139.40:8080/health; echo -REMOTE diff --git a/scripts/deploy-relay.sh b/scripts/deploy-relay.sh new file mode 100755 index 0000000..33ecaaf --- /dev/null +++ b/scripts/deploy-relay.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# Deploy the relay server (server/bubble_relay.py) over ssh. Where it goes +# comes from scripts/relay.env (not in git; see scripts/relay.env.example). +# This only touches $RELAY_DIR and its own screen session, and installs nothing. +# +# scripts/deploy-relay.sh copy the code and (re)start it +# scripts/deploy-relay.sh --stop stop it +# scripts/deploy-relay.sh --token print the bearer token, for Settings → Relay server on the desktop +# +# What runs is server/run.sh; have the server start that at boot too, e.g. +# screen -dmS bubble-relay bash -c 'bash $RELAY_DIR/app/run.sh' +set -euo pipefail +cd "$(dirname "$0")/.." +[ -f scripts/relay.env ] || { echo "No scripts/relay.env: copy scripts/relay.env.example and fill it in." >&2; exit 1; } +. scripts/relay.env +: "${RELAY_SSH:?}" "${RELAY_DIR:?}" "${RELAY_BIND:?}" +PORT=${RELAY_PORT:-8080} +NAME=bubble-relay + +case "${1:-}" in + --token) ssh "$RELAY_SSH" "cat $RELAY_DIR/data/token"; echo; exit 0 ;; + --stop) ssh "$RELAY_SSH" "screen -S $NAME -X quit || true"; echo "stopped"; exit 0 ;; +esac + +ssh "$RELAY_SSH" "mkdir -p $RELAY_DIR/app $RELAY_DIR/data ~/service-logs && chmod 700 $RELAY_DIR $RELAY_DIR/data" +rsync -a server/bubble_relay.py server/run.sh "$RELAY_SSH:$RELAY_DIR/app/" +printf 'RELAY_BIND=%q\nRELAY_PORT=%q\n' "$RELAY_BIND" "$PORT" | ssh "$RELAY_SSH" "cat > $RELAY_DIR/app/relay.env" +ssh "$RELAY_SSH" bash -s </dev/null || true +sleep 1 +screen -dmS $NAME bash -c 'bash $RELAY_DIR/app/run.sh 2>&1 | tee ~/service-logs/$NAME.log' +sleep 2 +for pid in \$(pgrep -f bubble_relay.py); do echo 1000 > /proc/\$pid/oom_score_adj; done +curl -s -m 5 http://$RELAY_BIND:$PORT/health; echo +REMOTE diff --git a/scripts/relay.env.example b/scripts/relay.env.example new file mode 100644 index 0000000..6185f63 --- /dev/null +++ b/scripts/relay.env.example @@ -0,0 +1,5 @@ +# Copy to scripts/relay.env (git ignores it) for scripts/deploy-relay.sh. +RELAY_SSH=myserver # ssh host (an alias from ~/.ssh/config is fine) +RELAY_DIR=/home/me/bubble-server # on the server: app/ and data/ (token, mailbox) go here +RELAY_BIND=100.101.102.103 # the server's tailscale address; the desktop's Settings → Relay server uses http://: +RELAY_PORT=8080 diff --git a/server/bubble_relay.py b/server/bubble_relay.py index 4b293fa..17c52bf 100644 --- a/server/bubble_relay.py +++ b/server/bubble_relay.py @@ -1,8 +1,9 @@ #!/usr/bin/env python3 -"""bubble-relay: a mailbox between the desktop app and the Rabbit R1. Runs on jai. +"""bubble-relay: a mailbox between the desktop app and the Rabbit R1. Runs on a +server of yours that both can reach (a tailscale address is the easy way). It never sees a message: every blob is AES-256-GCM sealed by the apps with a -key jai doesn't have (the desktop makes it and hands it to the Rabbit over +key the server doesn't have (the desktop makes it and hands it to the Rabbit over USB). This only stores opaque base64 strings, hands each device what the other one posted, and forgets them once picked up (or after KEEP_DAYS). @@ -19,7 +20,7 @@ to it, which the other side posted, so those are deleted. `more` = there's more than fits in one answer: call again with the new cursor. A cursor past anything this server ever issued (a wiped server) means "from the start". - python3 bubble_relay.py --host 100.69.139.40 --port 8080 --data DIR + python3 bubble_relay.py --host --port 8080 --data DIR """ import argparse diff --git a/server/run.sh b/server/run.sh index db40975..6ce9ce9 100755 --- a/server/run.sh +++ b/server/run.sh @@ -1,4 +1,7 @@ #!/bin/bash -# The one real command line for bubble-relay on jai (~/startup.sh and scripts/deploy-jai.sh both run this). -cd /home/jai/Documents/bubble-server/app || exit 1 -exec python3 bubble_relay.py --host 100.69.139.40 --port 8080 --data /home/jai/Documents/bubble-server/data +# The one real command line for the relay server (scripts/deploy-relay.sh runs +# it; run it at boot too). relay.env next to it, written by the deploy, says +# which address and port to listen on. +cd "$(dirname "$(readlink -f "$0")")" || exit 1 +. ./relay.env +exec python3 bubble_relay.py --host "$RELAY_BIND" --port "${RELAY_PORT:-8080}" --data ../data diff --git a/src/main/index.ts b/src/main/index.ts index f8e016b..a38b669 100644 --- a/src/main/index.ts +++ b/src/main/index.ts @@ -49,7 +49,7 @@ let dids: Did[] = [] let gv: GVoice | undefined let gvSync: GvSyncEngine | undefined let waa: WaaSigner | undefined -// The relay through jai: the Rabbit's SIM, names and read state (relay.ts). +// The relay server: the Rabbit's SIM, names and read state (relay.ts). let relay: RelayEngine | undefined const send = (channel: string, ...args: unknown[]): void => { @@ -112,7 +112,7 @@ function openFromNotification(key: { did: string; contact: string }): void { const gvNumber = (): string | undefined => db.get('gv_number') || undefined // Every number we can text from: voip.ms's DIDs, then Google Voice's, then -// the Rabbit's SIM (through jai). +// the Rabbit's SIM (through the relay server). function allDids(): Did[] { const n = gvNumber() const out: Did[] = n ? [...dids, { did: n, description: 'Google Voice', smsEnabled: true, provider: 'gvoice' }] : [...dids] @@ -137,7 +137,7 @@ function startRelay(): void { // A text over the Rabbit's SIM: pending here until the Rabbit's next check // sends it and says how it went (relay.ts). function relaySend(contact: string, text: string, refs: MediaRef[]): void { - if (!relay) throw new Error('The Rabbit relay is off: connect it in Settings → jai.') + if (!relay) throw new Error('The Rabbit relay is off: connect it in Settings → Relay server.') const kind = refs.length || isGroup(contact) ? 'mms' : 'sms' const tempId = db.insertPending({ did: SIM_DID, contact, direction: 'out', body: text, ts: Date.now(), kind, ...(refs.length ? { media: refs } : {}) }) relay.send(tempId, contact, text, refs) @@ -682,8 +682,8 @@ function registerIpc(): void { signal: AbortSignal.timeout(15_000) }).catch(() => undefined) if (!res) throw new Error(`Couldn't reach ${origin}. Is tailscale up?`) - if (res.status === 401) throw new Error('jai turned down that token.') - if (!res.ok) throw new Error(`jai answered ${res.status}.`) + if (res.status === 401) throw new Error('The relay server turned down that token.') + if (!res.ok) throw new Error(`The relay server answered ${res.status}.`) // Keep the key across reconnects so the Rabbit's copy stays good. saveRelayConfig({ url: origin, token: tok, key: loadRelayConfig()?.key ?? newKey() }) startRelay() diff --git a/src/main/rabbit.ts b/src/main/rabbit.ts index 2366a0d..4526424 100644 --- a/src/main/rabbit.ts +++ b/src/main/rabbit.ts @@ -22,7 +22,7 @@ export interface RabbitConfig { gvoice: { number: string; cookies: Record } | null dids: Array<{ did: string; description: string }> defaultDid?: string - // The relay through jai (relay.ts): address, token, and the key that seals everything. + // The relay server (relay.ts): address, token, and the key that seals everything. relay?: { url: string; token: string; key: string } | null } diff --git a/src/main/relay.ts b/src/main/relay.ts index 2fec5b8..964c234 100644 --- a/src/main/relay.ts +++ b/src/main/relay.ts @@ -1,11 +1,11 @@ -// The relay through jai: the Rabbit's SIM texts reach this computer, texts +// The relay server: the Rabbit's SIM texts reach this computer, texts // typed here go out over the Rabbit's SIM, and chat names and read/unread/ // archived stay in step between the two, all without a USB cable. // -// jai only ever holds sealed blobs: AES-256-GCM with a key made here and handed +// The relay server only ever holds sealed blobs: AES-256-GCM with a key made here and handed // to the Rabbit over USB (Install/Sync to Rabbit puts it in the app's private // config.json). The bearer token only lets a device talk to the mailbox; the -// key is what keeps jai (and anyone else on it) from reading or forging +// key is what keeps the relay server (and anyone else on it) from reading or forging // anything. Server: server/bubble_relay.py. Android side: Relay.java. // // What travels (inside the seal; `t` is the kind): @@ -27,7 +27,6 @@ import type { MessageDb, NameChange, NewMessage, ReadState } from './db' import type { MediaStore } from './media' export { SIM_DID } from '@shared/phone' -export const DEFAULT_URL = 'http://100.69.139.40:8080' export interface RelayConfig { url: string @@ -228,10 +227,10 @@ export class RelayEngine extends EventEmitter { body: JSON.stringify({ device: 'desktop', since, push: push.map((r) => r.blob) }), signal: AbortSignal.timeout(120_000) }) - if (res.status === 401) throw new Error('jai turned down the token. Check it in Settings → jai.') - if (!res.ok) throw new Error(`jai answered ${res.status}`) + if (res.status === 401) throw new Error('The relay server turned down the token. Check it in Settings → Relay server.') + if (!res.ok) throw new Error(`The relay server answered ${res.status}`) const body = (await res.json()) as { cursor: number; events: string[]; more: boolean } - // Only now that jai has them: out of the outbox. + // Only now that the relay server has them: out of the outbox. if (push.length) this.db.db.prepare('DELETE FROM relay_outbox WHERE seq <= ?').run(push.at(-1)!.seq) for (const blob of body.events) this.handle(unseal(this.key, 'rabbit', blob) as Incoming | undefined) this.db.set('relay_cursor', String(body.cursor)) @@ -240,8 +239,8 @@ export class RelayEngine extends EventEmitter { this.lastSync = Date.now() this.error = undefined } catch (e) { - // Can't reach jai: an ordinary, quiet outcome; try again next round. - this.error = (e as Error).name === 'TimeoutError' ? "jai didn't answer" : (e as Error).message + // Can't reach the relay server: an ordinary, quiet outcome; try again next round. + this.error = (e as Error).name === 'TimeoutError' ? "The relay server didn't answer" : (e as Error).message } this.emit('status', this.status()) } diff --git a/src/renderer/src/components/SettingsDialog.tsx b/src/renderer/src/components/SettingsDialog.tsx index 4f5d54f..11198b8 100644 --- a/src/renderer/src/components/SettingsDialog.tsx +++ b/src/renderer/src/components/SettingsDialog.tsx @@ -225,7 +225,7 @@ export function SettingsDialog({ state, sync, onClose, onChanged }: Props) { ), Contacts: change({ ...s, contactBook })} />, Rabbit: , - jai: , + 'Relay server': , Storage: (

Storage & backups

@@ -499,10 +499,10 @@ function RabbitSection({ onChanged }: { onChanged: () => void }) { ) } -// The Rabbit's SIM (and names + read status) through jai, no cable needed. +// The Rabbit's SIM (and names + read status) through the relay server, no cable needed. function RelaySection({ onChanged }: { onChanged: () => void }) { const [st, setSt] = useState() - const [url, setUrl] = useState('http://100.69.139.40:8080') + const [url, setUrl] = useState('') const [token, setToken] = useState('') const [busy, setBusy] = useState(false) const [error, setError] = useState() @@ -550,10 +550,10 @@ function RelaySection({ onChanged }: { onChanged: () => void }) { : undefined return (
-

Rabbit relay

+

Relay server

Texts the Rabbit's SIM card sends and gets show up here, you can text from it here (as "Rabbit SIM"), and chat names and - read/unread/archived stay in step with the Rabbit without plugging it in. It goes through jai, which only passes on sealed messages + read/unread/archived stay in step with the Rabbit without plugging it in. It goes through your relay server (server/bubble_relay.py), which only passes on sealed messages it can't read: the key stays on this computer and the Rabbit. A text sent from here goes out at the Rabbit's next background check (Settings there: how often), so it can take a while.

@@ -583,7 +583,7 @@ function RelaySection({ onChanged }: { onChanged: () => void }) { <>
-
diff --git a/src/shared/phone.ts b/src/shared/phone.ts index fb047df..7d6ad78 100644 --- a/src/shared/phone.ts +++ b/src/shared/phone.ts @@ -8,7 +8,7 @@ export function normalizeNumber(raw: string): string { return digits } -// The Rabbit's SIM, reached through jai (main/relay.ts): a number we text +// The Rabbit's SIM, reached through the relay server (main/relay.ts): a number we text // from that isn't a phone number here. export const SIM_DID = 'sim' diff --git a/test/relay.device.test.ts b/test/relay.device.test.ts index 00d0557..bcd90ae 100644 --- a/test/relay.device.test.ts +++ b/test/relay.device.test.ts @@ -1,7 +1,7 @@ // The relay against the dev app on a plugged-in Rabbit (DEVICE=1 npm test -- // test/relay.device.test.ts). A throwaway local relay, reached from the Rabbit // through adb reverse; the dev app's made-up data (tools/push_sandbox.py). -// Never the real app, never jai. +// Never the real app, never the real relay server. import { execFileSync, spawn, type ChildProcess } from 'node:child_process' import fs from 'node:fs' import net from 'node:net' diff --git a/test/relay.test.ts b/test/relay.test.ts index bf98764..5cad787 100644 --- a/test/relay.test.ts +++ b/test/relay.test.ts @@ -73,7 +73,7 @@ describe('relay', () => { }) it('only sends the token to tailscale or https', () => { - expect(checkUrl('http://100.69.139.40:8080/')).toBe('http://100.69.139.40:8080') + expect(checkUrl('http://100.101.102.103:8080/')).toBe('http://100.101.102.103:8080') expect(() => checkUrl('http://example.com')).toThrow() expect(checkUrl('https://example.com')).toBe('https://example.com') }) @@ -143,7 +143,7 @@ describe('relay', () => { const ref = await media.resolve(oldMms, 0) expect(fs.readFileSync(media.filePath(ref!.file!)).toString()).toBe('fake png') - // Picked up = gone from jai. + // Picked up = gone from the relay server. expect(await rabbit(key)).toEqual([]) engine.stop() db.close()