diff --git a/src/services/webrtc.ts b/src/services/webrtc.ts index d3b326f..06d569f 100644 --- a/src/services/webrtc.ts +++ b/src/services/webrtc.ts @@ -8,9 +8,9 @@ interface StunDomainRoutingConfig { } const STUN_DOMAINS = { - "us-east-1": "stun:44.197.212.58:3478", - "eu-central-1": "stun:44.197.212.58:3478", - "ap-southeast-1": "stun:44.197.212.58:3478", + "us-east-1": "stun:stun-us-east-1.home-assistant.io:3478", + "eu-central-1": "stun:stun-eu-central-1.home-assistant.io:3478", + "ap-southeast-1": "stun:stun-ap-southeast-1.home-assistant.io:3478", }; const STUN_DOMAIN_ROUTING_CONFIG: StunDomainRoutingConfig = { diff --git a/tests/webrtc.handler.spec.ts b/tests/webrtc.handler.spec.ts index 8a80379..6fb7c50 100644 --- a/tests/webrtc.handler.spec.ts +++ b/tests/webrtc.handler.spec.ts @@ -27,12 +27,24 @@ describe("WebRTC Handler", () => { }); for (const [country, continent, expected] of [ - ["NO_CUSTOM_CONFIG", "NO_CUSTOM_CONFIG", "stun:44.197.212.58:3478"], - ["IL", "NOT_USED", "stun:44.197.212.58:3478"], - ["LB", "NOT_USED", "stun:44.197.212.58:3478"], - ["NO_CUSTOM_CONFIG", "EU", "stun:44.197.212.58:3478"], - ["NO_CUSTOM_CONFIG", "AS", "stun:44.197.212.58:3478"], - ["NO_CUSTOM_CONFIG", "OC", "stun:44.197.212.58:3478"], + [ + "NO_CUSTOM_CONFIG", + "NO_CUSTOM_CONFIG", + "stun:stun-us-east-1.home-assistant.io:3478", + ], + ["IL", "NOT_USED", "stun:stun-eu-central-1.home-assistant.io:3478"], + ["LB", "NOT_USED", "stun:stun-eu-central-1.home-assistant.io:3478"], + ["NO_CUSTOM_CONFIG", "EU", "stun:stun-eu-central-1.home-assistant.io:3478"], + [ + "NO_CUSTOM_CONFIG", + "AS", + "stun:stun-ap-southeast-1.home-assistant.io:3478", + ], + [ + "NO_CUSTOM_CONFIG", + "OC", + "stun:stun-ap-southeast-1.home-assistant.io:3478", + ], ]) { it(`returns correct domains for country ${country} and continent ${continent}`, async () => { MockEvent.request.cf.country = country;