Compare commits

..

2 Commits

Author SHA1 Message Date
Ginger 8cfdbec237 chore(deps): Update actions/checkout to v6 2025-11-25 12:38:05 -05:00
Ginger 584284968a fix(ci): Remove explicit references to code.forgejo.org in action steps 2025-11-25 12:36:19 -05:00
16 changed files with 1007 additions and 215 deletions
+1 -1
View File
@@ -126,7 +126,7 @@ jobs:
[ -f /etc/conduwuit/conduwuit.toml ] && echo "✅ Config file installed" [ -f /etc/conduwuit/conduwuit.toml ] && echo "✅ Config file installed"
- name: Upload deb artifact - name: Upload deb artifact
uses: actions/upload-artifact@v5 uses: actions/upload-artifact@v3
with: with:
name: continuwuity-${{ steps.debian-version.outputs.distribution }} name: continuwuity-${{ steps.debian-version.outputs.distribution }}
path: ${{ steps.cargo-deb.outputs.path }} path: ${{ steps.cargo-deb.outputs.path }}
+2 -2
View File
@@ -238,13 +238,13 @@ jobs:
cp $BIN_RPM upload-bin/ cp $BIN_RPM upload-bin/
- name: Upload binary RPM - name: Upload binary RPM
uses: actions/upload-artifact@v5 uses: actions/upload-artifact@v3
with: with:
name: continuwuity name: continuwuity
path: upload-bin/ path: upload-bin/
- name: Upload debug RPM artifact - name: Upload debug RPM artifact
uses: actions/upload-artifact@v5 uses: actions/upload-artifact@v3
with: with:
name: continuwuity-debug name: continuwuity-debug
path: artifacts/*debuginfo*.rpm path: artifacts/*debuginfo*.rpm
+2 -2
View File
@@ -23,7 +23,7 @@ repos:
- id: check-added-large-files - id: check-added-large-files
- repo: https://github.com/crate-ci/typos - repo: https://github.com/crate-ci/typos
rev: v1.40.0 rev: v1.39.2
hooks: hooks:
- id: typos - id: typos
- id: typos - id: typos
@@ -31,7 +31,7 @@ repos:
stages: [commit-msg] stages: [commit-msg]
- repo: https://github.com/crate-ci/committed - repo: https://github.com/crate-ci/committed
rev: v1.1.8 rev: v1.1.7
hooks: hooks:
- id: committed - id: committed
Generated
+48 -34
View File
@@ -831,9 +831,9 @@ dependencies = [
[[package]] [[package]]
name = "clap" name = "clap"
version = "4.5.53" version = "4.5.52"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9e340e012a1bf4935f5282ed1436d1489548e8f72308207ea5df0e23d2d03f8" checksum = "aa8120877db0e5c011242f96806ce3c94e0737ab8108532a76a3300a01db2ab8"
dependencies = [ dependencies = [
"clap_builder", "clap_builder",
"clap_derive", "clap_derive",
@@ -850,9 +850,9 @@ dependencies = [
[[package]] [[package]]
name = "clap_builder" name = "clap_builder"
version = "4.5.53" version = "4.5.52"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d76b5d13eaa18c901fd2f7fca939fefe3a0727a953561fefdf3b2922b8569d00" checksum = "02576b399397b659c26064fbc92a75fede9d18ffd5f80ca1cd74ddab167016e1"
dependencies = [ dependencies = [
"anstream", "anstream",
"anstyle", "anstyle",
@@ -1750,7 +1750,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [ dependencies = [
"libc", "libc",
"windows-sys 0.52.0", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
@@ -2405,7 +2405,7 @@ dependencies = [
"libc", "libc",
"percent-encoding", "percent-encoding",
"pin-project-lite", "pin-project-lite",
"socket2 0.5.10", "socket2 0.6.1",
"tokio", "tokio",
"tower-service", "tower-service",
"tracing", "tracing",
@@ -2990,9 +2990,23 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]] [[package]]
name = "minicbor" name = "minicbor"
version = "2.1.3" version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9a1119e42fbacc2bb65d860de6eb7c930562bc71d42dca026d06b0228231f77" checksum = "4f182275033b808ede9427884caa8e05fa7db930801759524ca7925bd8aa7a82"
dependencies = [
"minicbor-derive",
]
[[package]]
name = "minicbor-derive"
version = "0.18.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b17290c95158a760027059fe3f511970d6857e47ff5008f9e09bffe3d3e1c6af"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "minicbor-serde" name = "minicbor-serde"
@@ -3006,9 +3020,9 @@ dependencies = [
[[package]] [[package]]
name = "minimad" name = "minimad"
version = "0.14.0" version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df8b688969b16915f3ecadc7829d5b7779dee4977e503f767f34136803d5c06f" checksum = "a9c5d708226d186590a7b6d4a9780e2bdda5f689e0d58cd17012a298efd745d2"
dependencies = [ dependencies = [
"once_cell", "once_cell",
] ]
@@ -3121,7 +3135,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [ dependencies = [
"windows-sys 0.60.2", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
@@ -3747,7 +3761,7 @@ dependencies = [
"quinn-udp", "quinn-udp",
"rustc-hash", "rustc-hash",
"rustls", "rustls",
"socket2 0.5.10", "socket2 0.6.1",
"thiserror 2.0.17", "thiserror 2.0.17",
"tokio", "tokio",
"tracing", "tracing",
@@ -3784,7 +3798,7 @@ dependencies = [
"cfg_aliases", "cfg_aliases",
"libc", "libc",
"once_cell", "once_cell",
"socket2 0.5.10", "socket2 0.6.1",
"tracing", "tracing",
"windows-sys 0.52.0", "windows-sys 0.52.0",
] ]
@@ -4030,9 +4044,9 @@ dependencies = [
[[package]] [[package]]
name = "resolv-conf" name = "resolv-conf"
version = "0.7.6" version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e061d1b48cb8d38042de4ae0a7a6401009d6143dc80d2e2d6f31f0bdd6470c7" checksum = "6b3789b30bd25ba102de4beabd95d21ac45b69b1be7d14522bab988c526d6799"
[[package]] [[package]]
name = "rgb" name = "rgb"
@@ -4323,7 +4337,7 @@ dependencies = [
"errno", "errno",
"libc", "libc",
"linux-raw-sys", "linux-raw-sys",
"windows-sys 0.52.0", "windows-sys 0.61.2",
] ]
[[package]] [[package]]
@@ -4629,9 +4643,9 @@ dependencies = [
[[package]] [[package]]
name = "serde-saphyr" name = "serde-saphyr"
version = "0.0.10" version = "0.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b9e06cddad47cc6214c0c456cf209b99a58b54223e7af2f6d4b88a5a9968499" checksum = "c0916ccf524f1ccec1b3c02193c9e3d2e167aee9b6b294829dce6f4411332155"
dependencies = [ dependencies = [
"ahash", "ahash",
"base64 0.22.1", "base64 0.22.1",
@@ -4960,9 +4974,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.111" version = "2.0.110"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -5008,9 +5022,9 @@ dependencies = [
[[package]] [[package]]
name = "termimad" name = "termimad"
version = "0.34.1" version = "0.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "889a9370996b74cf46016ce35b96c248a9ac36d69aab1d112b3e09bc33affa49" checksum = "68ff5ca043d65d4ea43b65cdb4e3aba119657d0d12caf44f93212ec3168a8e20"
dependencies = [ dependencies = [
"coolor", "coolor",
"crokey", "crokey",
@@ -5406,9 +5420,9 @@ dependencies = [
[[package]] [[package]]
name = "tower-http" name = "tower-http"
version = "0.6.7" version = "0.6.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9cf146f99d442e8e68e585f5d798ccd3cad9a7835b917e09728880a862706456" checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2"
dependencies = [ dependencies = [
"async-compression", "async-compression",
"bitflags", "bitflags",
@@ -5442,9 +5456,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]] [[package]]
name = "tracing" name = "tracing"
version = "0.1.43" version = "0.1.41"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
dependencies = [ dependencies = [
"pin-project-lite", "pin-project-lite",
"tracing-attributes", "tracing-attributes",
@@ -5453,9 +5467,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-attributes" name = "tracing-attributes"
version = "0.1.31" version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@@ -5464,9 +5478,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-core" name = "tracing-core"
version = "0.1.35" version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"valuable", "valuable",
@@ -5485,9 +5499,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-journald" name = "tracing-journald"
version = "0.3.2" version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d3a81ed245bfb62592b1e2bc153e77656d94ee6a0497683a65a12ccaf2438d0" checksum = "fc0b4143302cf1022dac868d521e36e8b27691f72c84b3311750d5188ebba657"
dependencies = [ dependencies = [
"libc", "libc",
"tracing-core", "tracing-core",
@@ -5526,9 +5540,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-subscriber" name = "tracing-subscriber"
version = "0.3.22" version = "0.3.20"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5"
dependencies = [ dependencies = [
"matchers", "matchers",
"nu-ansi-term", "nu-ansi-term",
+1 -1
View File
@@ -167,7 +167,7 @@ features = ["raw_value"]
# Used for appservice registration files # Used for appservice registration files
[workspace.dependencies.serde-saphyr] [workspace.dependencies.serde-saphyr]
version = "0.0.10" version = "0.0.8"
# Used to load forbidden room/user regex from config # Used to load forbidden room/user regex from config
[workspace.dependencies.serde_regex] [workspace.dependencies.serde_regex]
+1 -1
View File
@@ -10,7 +10,7 @@ community channels that reference them. We've written these guidelines to help u
environment where everyone feels safe and respected. environment where everyone feels safe and respected.
For code and contribution guidelines, please refer to the For code and contribution guidelines, please refer to the
[Contributor's Covenant](https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CODE_OF_CONDUCT.md). [Contributor's Covenant](https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CODE_OF_CONDUCT.mdx).
Below are additional guidelines specific to the Continuwuity community. Below are additional guidelines specific to the Continuwuity community.
## Our Values and Expected Behaviors ## Our Values and Expected Behaviors
@@ -2,7 +2,7 @@
services: services:
homeserver: homeserver:
### If you already built the continuwuity image with 'docker build' or want to use the Docker Hub image, ### If you already built the conduduwit image with 'docker build' or want to use the Docker Hub image,
### then you are ready to go. ### then you are ready to go.
image: forgejo.ellis.link/continuwuation/continuwuity:latest image: forgejo.ellis.link/continuwuation/continuwuity:latest
restart: unless-stopped restart: unless-stopped
+1 -1
View File
@@ -1 +1 @@
{"m.homeserver":{"base_url": "https://matrix.continuwuity.org"},"org.matrix.msc3575.proxy":{"url": "https://matrix.continuwuity.org"},"org.matrix.msc4143.rtc_foci":[{"type":"livekit","livekit_service_url":"https://livekit.ellis.link"}]} {"m.homeserver":{"base_url": "https://matrix.continuwuity.org"},"org.matrix.msc3575.proxy":{"url": "https://matrix.continuwuity.org"}}
+923 -132
View File
File diff suppressed because it is too large Load Diff
+2 -5
View File
@@ -30,11 +30,8 @@ pub(super) async fn show_config(&self) -> Result {
#[admin_command] #[admin_command]
pub(super) async fn reload_config(&self, path: Option<PathBuf>) -> Result { pub(super) async fn reload_config(&self, path: Option<PathBuf>) -> Result {
let mut paths = Vec::new(); let path = path.as_deref().into_iter();
if let Some(p) = path { self.services.config.reload(path)?;
paths.push(p);
}
self.services.config.reload(&paths)?;
self.write_str("Successfully reconfigured.").await self.write_str("Successfully reconfigured.").await
} }
+9 -11
View File
@@ -6,7 +6,7 @@ pub mod proxy;
use std::{ use std::{
collections::{BTreeMap, BTreeSet}, collections::{BTreeMap, BTreeSet},
net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}, net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr},
path::PathBuf, path::{Path, PathBuf},
}; };
use conduwuit_macros::config_example_generator; use conduwuit_macros::config_example_generator;
@@ -53,13 +53,9 @@ use crate::{Result, err, error::Error, utils::sys};
### For more information, see: ### For more information, see:
### https://continuwuity.org/configuration.html ### https://continuwuity.org/configuration.html
"#, "#,
ignore = "config_paths catchall well_known tls blurhashing allow_invalid_tls_certificates_yes_i_know_what_the_fuck_i_am_doing_with_this_and_i_know_this_is_insecure" ignore = "catchall well_known tls blurhashing allow_invalid_tls_certificates_yes_i_know_what_the_fuck_i_am_doing_with_this_and_i_know_this_is_insecure"
)] )]
pub struct Config { pub struct Config {
// Paths to config file(s). Not supposed to be set manually in the config file,
// only updated dynamically from the --config option given at runtime.
pub config_paths: Option<Vec<PathBuf>>,
/// The server_name is the pretty name of this server. It is used as a /// The server_name is the pretty name of this server. It is used as a
/// suffix for user and room IDs/aliases. /// suffix for user and room IDs/aliases.
/// ///
@@ -2227,24 +2223,26 @@ const DEPRECATED_KEYS: &[&str; 9] = &[
impl Config { impl Config {
/// Pre-initialize config /// Pre-initialize config
pub fn load(paths: &[PathBuf]) -> Result<Figment> { pub fn load<'a, I>(paths: I) -> Result<Figment>
where
I: Iterator<Item = &'a Path>,
{
let envs = [ let envs = [
Env::var("CONDUIT_CONFIG"), Env::var("CONDUIT_CONFIG"),
Env::var("CONDUWUIT_CONFIG"), Env::var("CONDUWUIT_CONFIG"),
Env::var("CONTINUWUITY_CONFIG"), Env::var("CONTINUWUITY_CONFIG"),
]; ];
let mut config = envs
let config = envs
.into_iter() .into_iter()
.flatten() .flatten()
.map(Toml::file) .map(Toml::file)
.chain(paths.iter().cloned().map(Toml::file)) .chain(paths.map(Toml::file))
.fold(Figment::new(), |config, file| config.merge(file.nested())) .fold(Figment::new(), |config, file| config.merge(file.nested()))
.merge(Env::prefixed("CONDUIT_").global().split("__")) .merge(Env::prefixed("CONDUIT_").global().split("__"))
.merge(Env::prefixed("CONDUWUIT_").global().split("__")) .merge(Env::prefixed("CONDUWUIT_").global().split("__"))
.merge(Env::prefixed("CONTINUWUITY_").global().split("__")); .merge(Env::prefixed("CONTINUWUITY_").global().split("__"));
config = config.join(("config_paths", paths));
Ok(config) Ok(config)
} }
+1 -7
View File
@@ -19,13 +19,7 @@ use conduwuit_core::{
version = conduwuit_core::version(), version = conduwuit_core::version(),
)] )]
pub struct Args { pub struct Args {
#[arg( #[arg(short, long)]
short,
long,
env = "CONDUIT_CONFIG",
env = "CONDUWUIT_CONFIG",
env = "CONTINUWUITY_CONFIG"
)]
/// Path to the config TOML file (optional) /// Path to the config TOML file (optional)
pub config: Option<Vec<PathBuf>>, pub config: Option<Vec<PathBuf>>,
+8 -3
View File
@@ -1,4 +1,4 @@
use std::sync::Arc; use std::{path::PathBuf, sync::Arc};
use conduwuit_core::{ use conduwuit_core::{
Error, Result, Error, Result,
@@ -38,9 +38,14 @@ impl Server {
) -> Result<Arc<Self>, Error> { ) -> Result<Arc<Self>, Error> {
let _runtime_guard = runtime.map(runtime::Handle::enter); let _runtime_guard = runtime.map(runtime::Handle::enter);
let config_paths = args.config.clone().unwrap_or_default(); let config_paths = args
.config
.as_deref()
.into_iter()
.flat_map(<[_]>::iter)
.map(PathBuf::as_path);
let config = Config::load(&config_paths) let config = Config::load(config_paths)
.and_then(|raw| update(raw, args)) .and_then(|raw| update(raw, args))
.and_then(|raw| Config::new(&raw))?; .and_then(|raw| Config::new(&raw))?;
+1 -1
View File
@@ -66,7 +66,7 @@ pub(crate) fn build(services: &Arc<Services>) -> Result<(Router, Guard)> {
.layer(RequestBodyTimeoutLayer::new(Duration::from_secs( .layer(RequestBodyTimeoutLayer::new(Duration::from_secs(
server.config.client_receive_timeout, server.config.client_receive_timeout,
))) )))
.layer(TimeoutLayer::with_status_code(StatusCode::REQUEST_TIMEOUT, Duration::from_secs(server.config.client_request_timeout))) .layer(TimeoutLayer::new(Duration::from_secs(server.config.client_request_timeout)))
.layer(SetResponseHeaderLayer::if_not_present( .layer(SetResponseHeaderLayer::if_not_present(
HeaderName::from_static("origin-agent-cluster"), // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin-Agent-Cluster HeaderName::from_static("origin-agent-cluster"), // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin-Agent-Cluster
HeaderValue::from_static("?1"), HeaderValue::from_static("?1"),
+6 -4
View File
@@ -1,4 +1,4 @@
use std::{ops::Deref, path::PathBuf, sync::Arc}; use std::{iter, ops::Deref, path::Path, sync::Arc};
use async_trait::async_trait; use async_trait::async_trait;
use conduwuit::{ use conduwuit::{
@@ -51,8 +51,7 @@ fn handle_reload(&self) -> Result {
]) ])
.expect("failed to notify systemd of reloading state"); .expect("failed to notify systemd of reloading state");
let config_paths = self.server.config.config_paths.clone().unwrap_or_default(); self.reload(iter::empty())?;
self.reload(&config_paths)?;
#[cfg(all(feature = "systemd", target_os = "linux"))] #[cfg(all(feature = "systemd", target_os = "linux"))]
sd_notify::notify(false, &[sd_notify::NotifyState::Ready]) sd_notify::notify(false, &[sd_notify::NotifyState::Ready])
@@ -63,7 +62,10 @@ fn handle_reload(&self) -> Result {
} }
#[implement(Service)] #[implement(Service)]
pub fn reload(&self, paths: &[PathBuf]) -> Result<Arc<Config>> { pub fn reload<'a, I>(&self, paths: I) -> Result<Arc<Config>>
where
I: Iterator<Item = &'a Path>,
{
let old = self.server.config.clone(); let old = self.server.config.clone();
let new = Config::load(paths).and_then(|raw| Config::new(&raw))?; let new = Config::load(paths).and_then(|raw| Config::new(&raw))?;
-9
View File
@@ -96,12 +96,3 @@ img {
max-height: 35vh; max-height: 35vh;
max-width: none; /* Having this set causes slight aspect ratio breakage */ max-width: none; /* Having this set causes slight aspect ratio breakage */
} }
/* fix navigation bar resizing when scrolling */
body:not(.notTopArrived) header.rp-nav {
border-bottom: 1px solid transparent !important;
}
/* fix the small logo on the top left looking blurry */
.rspress-logo {
height: 32px;
}