Files
MeshPort/outputs/validation/macos-local-profile-storage-20261012.md
T

2.6 KiB

macOS local profile storage — 2026-10-12

Behavior

Profiles now live in ~/Library/Application Support/MeshPort/: proxy-profile.json and network-profile.toml. The directory is 0700 and files are 0600. Writes use a private 0600 temporary file, synchronize it, then atomically rename it. Existing symbolic links, files owned by another user, invalid UTF-8 and files over the existing 64 KiB limit are rejected. All native profile operations run on one serial queue.

Normal reads, saves and deletes use files only. On first load with no local file, legacy Keychain migration uses an LAContext with interaction disabled. Success saves locally; a missing legacy entry is marked complete. Failure creates a pending marker so future starts do not repeatedly query Keychain. Settings exposes “迁移旧配置” only while pending; explicit migration can request Keychain authorization and never overwrites local edits. Old Keychain entries remain as backups. Deleting a local profile records a migration tombstone so the old entry cannot automatically reappear. Auto-connect is suppressed while migration remains pending. Android storage is unchanged.

This does not remove macOS administrator authorization for creating the VPN. The preceding helper reuse optimization is included.

Validation

  • Standalone Swift checks passed: local persistence, permissions, replacement, oversized-write rejection, silent migration, one-time pending state, manual migration, restart, deletion, symlinks and corruption handling. Fixtures use temporary directories and an injected legacy reader; no real profile credentials are touched.
  • Flutter suite passed (50 passed, 6 skipped), analyzer reports no issues.
  • Xcode project parses; Release compilation includes the new storage implementation and native channel handlers.
  • Bundle deep/strict signature check, ZIP integrity and public default configuration checks passed.
  • No installed app/profile was overwritten during packaging. User migration occurs when the new version runs.

Package

outputs/macos/MeshPort-0.1.0-1791873037-arm64-release.zip

Original ZIP SHA-256: e19108990fe411f7af3af61655f4f284a008e9c1effc0599286ee368d48ebaf9.

Repacked from the same build during 2026-10-13 workspace cleanup; current ZIP SHA-256: f4a27039dd1d81ca99aae17b6a49b8cf791eb089ef7db199b0d9777f4799fc66. Version, signature and public bundled configuration were checked before deleting build caches.

Apple Silicon, macOS 12+, Release build, Apple Development signed, not Apple notarized. ZIP contains MeshPort.app so it can replace /Applications/MeshPort.app without leaving a duplicate version. Source changes are uncommitted; no push performed.