feat: Add config option for livekit
This adds a new config option under `global.well_known` for livekit server URLs. It also updates the well_known client API endpoint to return this list. Closes #1355
This commit is contained in:
parent
abc0683d59
commit
5506997ca0
3 changed files with 31 additions and 1 deletions
|
|
@ -1820,6 +1820,19 @@
|
||||||
#
|
#
|
||||||
#support_mxid =
|
#support_mxid =
|
||||||
|
|
||||||
|
# A list of MatrixRTC foci URLs which will be served as part of the
|
||||||
|
# MSC4143 client endpoint at /.well-known/matrix/client. If you're
|
||||||
|
# setting up livekit, you'd want something like:
|
||||||
|
# rtc_focus_server_urls = [
|
||||||
|
# { type = "livekit", server_url = "https://livekit.example.com" },
|
||||||
|
# ]
|
||||||
|
#
|
||||||
|
# To disable, set this to be an empty vector (`[]`).
|
||||||
|
#
|
||||||
|
# Defaults to: []
|
||||||
|
#
|
||||||
|
#rtc_focus_server_urls =
|
||||||
|
|
||||||
[global.blurhashing]
|
[global.blurhashing]
|
||||||
|
|
||||||
# blurhashing x component, 4 is recommended by https://blurha.sh/
|
# blurhashing x component, 4 is recommended by https://blurha.sh/
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ pub(crate) async fn well_known_client(
|
||||||
identity_server: None,
|
identity_server: None,
|
||||||
sliding_sync_proxy: Some(SlidingSyncProxyInfo { url: client_url }),
|
sliding_sync_proxy: Some(SlidingSyncProxyInfo { url: client_url }),
|
||||||
tile_server: None,
|
tile_server: None,
|
||||||
|
rtc_foci: services.config.well_known.rtc_focus_server_urls.clone(),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ pub use figment::{Figment, value::Value as FigmentValue};
|
||||||
use regex::RegexSet;
|
use regex::RegexSet;
|
||||||
use ruma::{
|
use ruma::{
|
||||||
OwnedRoomId, OwnedRoomOrAliasId, OwnedServerName, OwnedUserId, RoomVersionId,
|
OwnedRoomId, OwnedRoomOrAliasId, OwnedServerName, OwnedUserId, RoomVersionId,
|
||||||
api::client::discovery::discover_support::ContactRole,
|
api::client::discovery::{discover_homeserver::RtcFocusInfo, discover_support::ContactRole},
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, de::IgnoredAny};
|
use serde::{Deserialize, de::IgnoredAny};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
@ -2111,6 +2111,19 @@ pub struct WellKnownConfig {
|
||||||
/// If no email or mxid is specified, all of the server's admins will be
|
/// If no email or mxid is specified, all of the server's admins will be
|
||||||
/// listed.
|
/// listed.
|
||||||
pub support_mxid: Option<OwnedUserId>,
|
pub support_mxid: Option<OwnedUserId>,
|
||||||
|
|
||||||
|
/// A list of MatrixRTC foci URLs which will be served as part of the
|
||||||
|
/// MSC4143 client endpoint at /.well-known/matrix/client. If you're
|
||||||
|
/// setting up livekit, you'd want something like:
|
||||||
|
/// rtc_focus_server_urls = [
|
||||||
|
/// { type = "livekit", server_url = "https://livekit.example.com" },
|
||||||
|
/// ]
|
||||||
|
///
|
||||||
|
/// To disable, set this to be an empty vector (`[]`).
|
||||||
|
///
|
||||||
|
/// Defaults to: []
|
||||||
|
#[serde(default = "default_rtc_focus_urls")]
|
||||||
|
pub rtc_focus_server_urls: Vec<RtcFocusInfo>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, Deserialize, Default)]
|
#[derive(Clone, Copy, Debug, Deserialize, Default)]
|
||||||
|
|
@ -2608,6 +2621,9 @@ fn default_rocksdb_stats_level() -> u8 { 1 }
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn default_default_room_version() -> RoomVersionId { RoomVersionId::V11 }
|
pub fn default_default_room_version() -> RoomVersionId { RoomVersionId::V11 }
|
||||||
|
|
||||||
|
#[must_use]
|
||||||
|
pub fn default_rtc_focus_urls() -> Vec<RtcFocusInfo> { vec![] }
|
||||||
|
|
||||||
fn default_ip_range_denylist() -> Vec<String> {
|
fn default_ip_range_denylist() -> Vec<String> {
|
||||||
vec![
|
vec![
|
||||||
"127.0.0.0/8".to_owned(),
|
"127.0.0.0/8".to_owned(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue