# macOS local network access

CH-J Server Manager requests local network access when you connect to a local
SSH server. Allow the macOS prompt. If access was denied, enable CH-J Server
Manager in **System Settings → Privacy & Security → Local Network**, then
connect again. The app cannot override this choice.

## Packaging

Electron ships prebuilt launchers with shared Mach-O UUIDs. macOS uses these
UUIDs when identifying applications for local network access. `afterPack.js`
therefore assigns application-specific UUIDs to the main launcher and Electron
helper launchers **before signing**. The UUIDs include the bundle identity,
launcher path, architecture and packaged `app.asar` digest. Repeating packaging
of the same payload preserves its UUIDs; a different payload gets different
UUIDs without changing the application version or bundle identifier.

`packageMacInstaller.js` also prepares this identity when invoked directly,
prefers an installed Developer ID Application identity over an ad-hoc signature,
and checks the UUIDs, bundle ID, unchanged application version, local network
usage description and code signature in the final mounted DMG. Without a
Developer ID Application certificate it produces an ad-hoc test build. An Apple
Development certificate is not a Developer ID distribution certificate.

Only the small main/helper launchers are patched. Their original Electron dSYMs
will no longer match; Electron Framework and its UUID/debugging symbols remain
unchanged. Installed apps and older build copies are never modified by this
packaging step.

Run `npm run build:mac` to produce the corrected installer. Install that build
and launch it from Finder to test local network access. A packaging smoke test
or `npm start` inherits Terminal's network access and cannot verify the Finder
permission prompt. Multiple installed copies can still confuse macOS permission
settings; do not use a global privacy reset or disable system protections.

References: [Apple TN3179](https://developer.apple.com/documentation/technotes/tn3179-understanding-local-network-privacy),
[Apple TN3178](https://developer.apple.com/documentation/technotes/tn3178-checking-for-and-resolving-build-uuid-problems),
[electron-builder issue #9158](https://github.com/electron-userland/electron-builder/issues/9158).
