mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 03:07:50 +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]:
|
def get_ice_servers() -> list[RTCIceServer]:
|
||||||
if hass.config.webrtc.ice_servers:
|
if hass.config.webrtc.ice_servers:
|
||||||
return 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)
|
async_register_ice_servers(hass, get_ice_servers)
|
||||||
return True
|
return True
|
||||||
|
@ -347,7 +347,10 @@ async def test_ws_get_client_config(
|
|||||||
assert msg["success"]
|
assert msg["success"]
|
||||||
assert msg["result"] == {
|
assert msg["result"] == {
|
||||||
"configuration": {
|
"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,
|
"getCandidatesUpfront": False,
|
||||||
}
|
}
|
||||||
@ -376,6 +379,7 @@ async def test_ws_get_client_config(
|
|||||||
"configuration": {
|
"configuration": {
|
||||||
"iceServers": [
|
"iceServers": [
|
||||||
{"urls": "stun:stun.home-assistant.io:80"},
|
{"urls": "stun:stun.home-assistant.io:80"},
|
||||||
|
{"urls": "stun:stun.home-assistant.io:3478"},
|
||||||
{
|
{
|
||||||
"urls": ["stun:example2.com", "turn:example2.com"],
|
"urls": ["stun:example2.com", "turn:example2.com"],
|
||||||
"username": "user",
|
"username": "user",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user