mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +00:00
Add Stun server with port 3478 (#129501)
This commit is contained in:
parent
568bdef61f
commit
bf40e77d65
@ -420,7 +420,10 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
|
||||
def get_ice_servers() -> list[RTCIceServer]:
|
||||
if hass.config.webrtc.ice_servers:
|
||||
return hass.config.webrtc.ice_servers
|
||||
return [RTCIceServer(urls="stun:stun.home-assistant.io:80")]
|
||||
return [
|
||||
RTCIceServer(urls="stun:stun.home-assistant.io:80"),
|
||||
RTCIceServer(urls="stun:stun.home-assistant.io:3478"),
|
||||
]
|
||||
|
||||
async_register_ice_servers(hass, get_ice_servers)
|
||||
return True
|
||||
|
@ -347,7 +347,10 @@ async def test_ws_get_client_config(
|
||||
assert msg["success"]
|
||||
assert msg["result"] == {
|
||||
"configuration": {
|
||||
"iceServers": [{"urls": "stun:stun.home-assistant.io:80"}],
|
||||
"iceServers": [
|
||||
{"urls": "stun:stun.home-assistant.io:80"},
|
||||
{"urls": "stun:stun.home-assistant.io:3478"},
|
||||
],
|
||||
},
|
||||
"getCandidatesUpfront": False,
|
||||
}
|
||||
@ -376,6 +379,7 @@ async def test_ws_get_client_config(
|
||||
"configuration": {
|
||||
"iceServers": [
|
||||
{"urls": "stun:stun.home-assistant.io:80"},
|
||||
{"urls": "stun:stun.home-assistant.io:3478"},
|
||||
{
|
||||
"urls": ["stun:example2.com", "turn:example2.com"],
|
||||
"username": "user",
|
||||
|
Loading…
x
Reference in New Issue
Block a user