macsync/@packages/shared/Sources/MacSyncShared/Transport/Shared.swift
Natalie cae15ae9f1 fix(@applications/@mac-sync): 🐛 update lan instead of local in all configs
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
2026-06-10 03:12:06 -07:00

14 lines
740 B
Swift

import Foundation
import LilithAgentCore
/// Single shared keychain where the device auth token is stored.
/// All three sync modules (iMessage, iPhoto, iMail) look here for the Bearer token.
/// The device token belongs to one hardware device it is not per-module.
public let macSyncSharedKeychain = KeychainHelper(service: "com.lilith.mac-sync")
/// Read `serverURL` from UserDefaults, falling back to the default server on the VPN.
/// `ConfigFile.load()` merges `~/.config/com.lilith.mac-sync/config.json` into UserDefaults
/// at every launch, so this reflects the most recent config file value.
public func macSyncResolveServerURL() -> String {
UserDefaults.standard.string(forKey: "serverURL") ?? "http://black.lan:3201"
}