Add an iPhone client sharing the macOS app's SwiftUI code
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user