Add an iPhone client sharing the macOS app's SwiftUI code

This commit is contained in:
Ian Gulliver
2026-10-21 22:00:54 -07:00
parent 57d660c57f
commit 9e81e9107d
46 changed files with 1625 additions and 287 deletions
+6 -2
View File
@@ -101,7 +101,11 @@ func errorText(_ error: any Error) -> String {
}
private let clientID = newID("cli")
let macName = Host.current().localizedName ?? ProcessInfo.processInfo.hostName
#if os(macOS)
let deviceName = Host.current().localizedName ?? ProcessInfo.processInfo.hostName
#else
let deviceName = deviceKind
#endif
final class API: Sendable {
let origin: URL
@@ -114,7 +118,7 @@ final class API: Sendable {
config.httpAdditionalHeaders = [
"Byre-Client": clientID,
"Byre-Commit": Bundle.main.object(forInfoDictionaryKey: "ByreCommit") as! String,
"Byre-Host": macName,
"Byre-Host": deviceName,
]
config.proxyConfigurations = [tailnetNode.proxy()]
session = URLSession(configuration: config, delegate: RequestTiming(), delegateQueue: nil)