Building Unbound

Build Unbound's own bundle and load it on your phone.

Build Unbound itself from source and point the loader at your build instead of https://builds.unbound.rip/. To build an addon, see Your First Plugin.

Quick Start

  1. Install Dependencies

    From the repository root:

    bun install
  2. Start the Dev Server

    It rebuilds on every change and serves the bundle over HTTP.

    bun run --filter @unbound-app/client dev

    It prints the address for your phone: Devices on the LAN should connect to: ....

  3. Point the Loader

    Set loader.update.url in the phone's settings.json to that address. See Settings Reference. Bundles from your local network skip the signature check.

To build once without watching:

bun run --filter @unbound-app/client build
bun run --filter @unbound-app/client serve

Jailbroken iPhone over SSH

The scripts in skills/ubd-vphone/scripts/ run the test loop on a jailbroken iPhone or iOS VM. With VPHONE_SSH set, they reach it over SSH.

  1. Set Up SSH

    The device needs an SSH server plus sudo, base64, ps and uiopen from a rootless jailbreak's bootstrap. Use key login; the scripts never answer a password prompt.

    ssh-copy-id [email protected]
    ssh -o BatchMode=yes [email protected] true

    Install the loader tweak's debug build. In Settings, Display & Brightness, set Auto-Lock to Never: the debugger connects only while Discord is open, and SSH cannot unlock the screen.

  2. Configure .env

    At the repository root:

    .env
    VPHONE_SSH=[email protected]
    DEV_HOST=192.168.1.20

    Check: skills/ubd-vphone/scripts/vphone pid prints Discord's process id, or not running.

  3. Start the Servers

    up.sh starts the dev server and the debugger bridge in tmux sessions.

    skills/ubd-vphone/scripts/up.sh
  4. Provision Discord

    Copies the loader's resources into Discord, points the loader and debugger at your computer, and relaunches. Rerun after every Discord reinstall.

    skills/ubd-vphone/scripts/provision
  5. Run Your Build

    claim.sh serves the current checkout and relaunches Discord until it runs that build. release.sh hands the device back.

    skills/ubd-vphone/scripts/claim.sh

Variables

VariableDefaultMeaning
VPHONE_SSHUnsetSSH host: a ~/.ssh/config alias, or user@address
VPHONE_SSH_PORTSSH's ownSSH port, when not in ~/.ssh/config
VPHONE_SUDO_PASSWORDalpineThe sudo password. Root reads Discord's containers and crash reports
DEV_HOSTYour LAN addressThe address the device reaches your computer at

Scripts

ScriptWhat it does
relaunchRestarts Discord and waits for Unbound. If Discord dies on start, prints the crash and retries
crashesExplains the newest crash: what killed it, suspect libraries, and Unbound's log for that run
unbound-logPrints errors and warnings from Unbound's log for the current run
doctor.sh --fixChecks the servers, bridge and loader bundle address, and repairs failures