f512d94c74
git-subtree-dir: clients/ds-app git-subtree-mainline:a24e3e6f22git-subtree-split:5206cf3b0c
19 lines
643 B
Swift
19 lines
643 B
Swift
import Foundation
|
|
|
|
/// Injectable base URL. Public TLS by default; Tailscale alternative uses a MagicDNS hostname
|
|
/// (NOT a hardcoded 100.x IP, which changes on node re-registration). Scaffold never makes a live
|
|
/// call, so the Tailscale host is a placeholder until FU-A.
|
|
public enum DSBaseURL: Sendable {
|
|
case publicTLS
|
|
case tailscale
|
|
case custom(URL)
|
|
|
|
public var url: URL {
|
|
switch self {
|
|
case .publicTLS: return URL(string: "https://document.hyungi.net/api")!
|
|
case .tailscale: return URL(string: "http://ds-gpu.tailnet-name.ts.net:8000/api")!
|
|
case .custom(let u): return u
|
|
}
|
|
}
|
|
}
|