Extracted from the officer-suite monorepo into its own public repo. The app is
open source and free; the rest of the suite is not, so it could not stay in a
tree that ships an account layer.
What moved:
- apps/offscale/* -> repo root (App shell, app.json, assets)
- packages/officer-net/ -> modules/officer-net/, a `file:` dependency
- packages/core VPN closure -> src/vpn/ (screen, hook, native bridge, invite)
- packages/core shared primitives -> src/ui/ (theme, cards, tabs, backdrop, splash)
- scripts/build-{ios,android}.sh -> scripts/, cut down to this one app
What deliberately did NOT move: the platform account layer. VpnScreen used to
render core's AppSettingsScreen, which drags in ServersSection -> servers.ts,
useAuth, api.ts, shared-session, install-guard, api-keys. None of that exists
here. src/settings/SettingsScreen.tsx is a fresh replacement rendering exactly
what VpnScreen passed it — the app's own sections plus About — with no Servers
tab, no Appearance control (the app is pinned to dark) and no sign-out.
The one platform reference left in the closure was a dead `import { request }
from './api'` in officer-net.ts, unused since enrollVpn() was removed. Gone. The
app now contacts nothing but the control server you point it at, its peers, and
the enrolment sidecar named inside an invite link you tapped.
Dependencies are pinned to the exact versions the monorepo has installed, not to
ranges: this repo starts from versions already proven to build, and an unpinned
install is a supply-chain decision nobody made. react-query, react-dom,
react-native-screens, expo-secure-store, track-player, expo-audio and
expo-file-system were all declared by the old app and imported by none of this
code, so they are not here.
NOTICE carries Tailscale's BSD-3 text, names the built artifacts that contain
their compiled code, and treats the trademark question separately — including
that src/ui/TailscaleMark.tsx reproduces their logo in the attribution strip.
42 lines
1.9 KiB
Bash
Executable File
42 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build the OffTail Tailscale core into an iOS .xcframework via gomobile, from the Go shim in ../gocore.
|
|
# Output: modules/officer-net/ios/libs/TailCore.xcframework (gitignored; the podspec vendors it when present).
|
|
#
|
|
# Unlike bw-vault (which fetches a prebuilt Bitwarden release asset), Tailscale publishes no third-party
|
|
# gomobile framework — WE produce it once with `gomobile bind`, then vendor it. PROVEN working on
|
|
# Go 1.26 + Xcode 26: binds tailscale.com (tsnet/ipn/wgengine/magicsock/netstack) to arm64 + sim.
|
|
#
|
|
# Requires: Go + gomobile + gobind on PATH:
|
|
# go install golang.org/x/mobile/cmd/gomobile@latest
|
|
# go install golang.org/x/mobile/cmd/gobind@latest
|
|
#
|
|
# Keep TAILSCALE_REF paired with the Headscale version you run — Headscale tracks a specific Tailscale
|
|
# client protocol version, and a core built far ahead of it will fail to register.
|
|
set -euo pipefail
|
|
|
|
TAILSCALE_REF="${TAILSCALE_REF:-v1.102.0}"
|
|
|
|
HERE="$(cd "$(dirname "$0")/.." && pwd)" # modules/officer-net
|
|
GOCORE="$HERE/gocore"
|
|
OUT="$HERE/ios/libs/TailCore.xcframework"
|
|
|
|
export PATH="$(go env GOPATH)/bin:$PATH"
|
|
command -v gomobile >/dev/null 2>&1 || { echo "✗ gomobile not on PATH — go install golang.org/x/mobile/cmd/gomobile@latest"; exit 1; }
|
|
|
|
cd "$GOCORE"
|
|
[ -f go.mod ] || go mod init officer.dev/tailcore
|
|
echo "→ pinning tailscale.com@${TAILSCALE_REF}"
|
|
go get "tailscale.com@${TAILSCALE_REF}"
|
|
# gomobile (Go 1.26) needs x/mobile as a tool dep AND bind imported, or `go mod tidy` prunes it and the
|
|
# bind fails with "missing golang.org/x/mobile dependency".
|
|
go get -tool golang.org/x/mobile/cmd/gobind
|
|
go get golang.org/x/mobile/bind
|
|
|
|
echo "→ gomobile bind -target=ios (compiles the whole Tailscale core; a few minutes)"
|
|
mkdir -p "$HERE/ios/libs"
|
|
rm -rf "$OUT"
|
|
gomobile bind -target=ios -o "$OUT" ./
|
|
|
|
[ -d "$OUT" ] || { echo "✗ bind produced no framework" >&2; exit 1; }
|
|
echo "✔ built $OUT"; du -sh "$OUT"
|