fix: macOS auto bind loopback-first

This commit is contained in:
Peter Steinberger
2026-01-22 06:34:41 +00:00
parent 98ab2b4eae
commit 30ca87094d
4 changed files with 6 additions and 8 deletions

View File

@@ -140,14 +140,14 @@ import Testing
#expect(resolved.mode == .remote)
}
@Test func resolveLocalGatewayHostPrefersTailnetForAuto() {
@Test func resolveLocalGatewayHostUsesLoopbackForAutoEvenWithTailnet() {
let host = GatewayEndpointStore._testResolveLocalGatewayHost(
bindMode: "auto",
tailscaleIP: "100.64.1.2")
#expect(host == "100.64.1.2")
#expect(host == "127.0.0.1")
}
@Test func resolveLocalGatewayHostFallsBackToLoopbackForAuto() {
@Test func resolveLocalGatewayHostUsesLoopbackForAutoWithoutTailnet() {
let host = GatewayEndpointStore._testResolveLocalGatewayHost(
bindMode: "auto",
tailscaleIP: nil)