Fix macOS exit sharing and bring exit selection onto the phone home screen
A Mac could install PF rules and advertise itself while IPv4 forwarding was still off. Check and enable forwarding when applying the offer and refresh the physical route when the uplink changes. Try the agent's existing privileges first. When an existing utun needs additional permission, the foreground tray or CLI can obtain an administrator grant scoped to the local UID and overlay subnet. Reconcile the current offer after the dialog so a withdrawal during authorization stays effective. A user agent denied a host utun can serve peers over bounded TCP, UDP and ICMP echo sockets bound to the physical interface. Keep host routes and ordinary local application traffic on the system-utun path. Preserve the saved choice for intentionally off-host setups and report readiness separately. Report exit selection directly to the selected peer over its authenticated session. Older peers appear for one minute following forwarded traffic. The optional announcement trailer remains compatible with control v8. Local IPC v29 carries the new status and authorization results. Keep the exit user count, left-aligned names and one-row scroll controls in a single fixed-height block alongside the network details. Show health and a small traffic trace on folded cards. Open desktop Devices at a usable width and keep the exit action clickable in its compact layout. Replace Android's per-card exit buttons with a fixed thumb-sized control. The chooser and Quick Settings share one list with a single local option, network groups, measured latency and an accessible confirmation sheet. Release the applications and packages as 1.0.9. On macOS, checked formatting, strict workspace Clippy and the workspace all-target test suite, including real encrypted agents and loopback TCP, UDP and ICMP. Ran the opt-in user-mode exit UDP round trip on a physical IPv4 interface. Verified the authorization scripts and syntax of their PF, sudoers and AppleScript components. The privileged two-utun kernel test is reserved for an isolated macOS runner. Rendered phone and desktop layouts in both themes, built the arm64 Android debug APK and cross- checked all workspace targets for Windows GNU.
This commit is contained in:
1 parent
d8b7787430
commit
43894612ee
65 files changed
+3110
-654
No files matched your search
Vendored
+11
-3
@@ -1,8 +1,10 @@
|
||||
# Running tsunagi on macOS
|
||||
|
||||
The agent needs **root** on macOS: creating a `utun` interface and writing
|
||||
`/etc/resolver` are both root-only, and macOS has no per-capability grant like
|
||||
Linux. There are two ways to run it.
|
||||
The tray and CLI run as your normal account. The packaged service creates the
|
||||
system `utun` and publishes `/etc/resolver` entries. A separate user agent
|
||||
with its own writable state and cache can also offer an exit through physical
|
||||
TCP, UDP and ICMP echo sockets when macOS denies creation of its utun.
|
||||
The system service provides the host's overlay addresses and routes.
|
||||
|
||||
## Quick start — `sudo`
|
||||
|
||||
@@ -41,6 +43,12 @@ The cask starts the service for you. The agent runs as root, and its control
|
||||
socket is open to the `admin` group, so the CLI and the tray work without
|
||||
`sudo` for an administrator.
|
||||
|
||||
Enabling exit sharing configures IPv4 forwarding and the network's PF rules.
|
||||
The system agent already has the required permissions. For a user agent with
|
||||
an existing utun, the tray and CLI can request the missing permission in a
|
||||
macOS administrator dialog. [Exit sharing on macOS](../../docs/exit-node.md#macos)
|
||||
describes the per-user subnet grant and its removal.
|
||||
|
||||
After upgrading the CLI, run `sudo brew services restart tsunagi` to load the
|
||||
new binary into the system daemon. Running `brew services start tsunagi` in
|
||||
a user shell creates a separate launch agent. If that happened, remove the
|
||||
|
||||
Reference in new issue
Block a user