Compare commits

..
Author SHA1 Message Date
Ginger d20707533a fix: Panic on PL content deserialization failures 2026-04-22 10:44:40 -04:00
Ginger 44814b25ff fix: Add stable routes for admin suspension endpoints 2026-04-22 10:43:00 -04:00
Ginger 036f26c2e3 fix: Re-add support for custom room IDs 2026-04-22 10:41:01 -04:00
Ginger 7e3aae1ae5 refactor: Remove mystery initial state hack 2026-04-22 10:34:04 -04:00
Ginger ce86d0735f fix: Increase max length for report reasons 2026-04-22 10:33:16 -04:00
Ginger 4b91a46a99 fix: Add bounds checking for profile data 2026-04-22 10:30:31 -04:00
Ginger f890c34fff fix: Add bounds checking for profile data 2026-04-22 10:30:18 -04:00
Ginger 538e0750d0 refactor: Clean up api/client/membership/kick.rs 2026-04-22 10:11:55 -04:00
Ginger b11dafb85a refactor: Remove old project name in api/client/membership/ 2026-04-22 10:09:18 -04:00
Ginger c537a61284 refactor: Clean up api/client/membership.ban.rs 2026-04-22 10:08:40 -04:00
Ginger 4de028158f fix: Check existing key equality when uploading new E2EE keys 2026-04-22 10:05:08 -04:00
Ginger a62580d1fb refactor: Switch back to upstream Ruma 2026-04-22 09:40:15 -04:00
Ginger 06e8977cdd fix: Enable compatibility feature to fix federation with old conduit-family homeservers 2026-04-22 09:36:42 -04:00
Ginger 3f28cda014 refactor: Improve summary service logging 2026-04-22 09:36:42 -04:00
Ginger 34701dffd1 fix: Fix failing test 2026-04-22 09:36:42 -04:00
Ginger 5eb2dd6807 chore: Changelog 2026-04-22 09:36:42 -04:00
Ginger c26cac922b chore: Clippy fixes 2026-04-22 09:36:42 -04:00
Ginger 5d2ed70408 fix: FIx code that was causing rustc to panic somehow 2026-04-22 09:36:40 -04:00
Ginger f2ff83ae6b refactor: Remove pointless assert 2026-04-22 09:36:40 -04:00
Ginger 7d3ac813b3 chore: Clippy fixes 2026-04-22 09:36:40 -04:00
Ginger ccde414978 refactor: Fix errors in api/client/directory.rs, again 2026-04-22 09:36:40 -04:00
Ginger 94c70b5fb4 chore: Clippy fixes 2026-04-22 09:36:40 -04:00
Ginger d5c37ced13 refactor: Fix errors in admin/processor.rs 2026-04-22 09:36:40 -04:00
Ginger 347e361ca9 refactor: Fix errors in admin/user/ 2026-04-22 09:36:40 -04:00
Ginger 77a3665557 refactor: Fix errors in admin/room/ 2026-04-22 09:36:40 -04:00
Ginger abbd7c3afe refactor: Fix errors in admin/query/ 2026-04-22 09:36:40 -04:00
Ginger 7500d4a510 refactor: Fix errors in admin/media/commands.rs 2026-04-22 09:36:40 -04:00
Ginger b2c0158364 refactor: Resolve errors in admin/federation/commands.rs 2026-04-22 09:36:40 -04:00
Ginger efd9a1c321 refactor: Fix errors in admin/debug/commands.rs 2026-04-22 09:36:40 -04:00
Ginger 07af407792 refactor: Fix errors in admin/check/commands.rs 2026-04-22 09:36:40 -04:00
Ginger 2d744338e2 refactor: Fix remaining errors in api/ (and temporarily switch to a fork of ruma) 2026-04-22 09:36:40 -04:00
Ginger e6c98dff50 refactor: Fix errors in web/ 2026-04-22 09:36:40 -04:00
Ginger ae864879f4 refactor: Fix errors in api/router/ 2026-04-22 09:36:40 -04:00
Ginger 92e16d034c refactor: Fix errors in api/server/well_known.rs 2026-04-22 09:36:38 -04:00
Ginger 20ebc9b666 refactor: Fix errors in api/server/version.rs 2026-04-22 09:36:38 -04:00
Ginger f6e0e1704c refactor: Fix errors in api/server/user.rs 2026-04-22 09:36:38 -04:00
Ginger fa3210de9a refactor: Fix errors in api/server/state.rs 2026-04-22 09:36:38 -04:00
Ginger 68f115e6ac refactor: Fix errors in api/server/state_ids.rs 2026-04-22 09:36:38 -04:00
Ginger a3c08a491a refactor: Fix errors in api/server/send.rs 2026-04-22 09:36:38 -04:00
Ginger 30cb7b15a9 refactor: Fix errors in api/server/send_leave.rs 2026-04-22 09:36:38 -04:00
Ginger 5fc0b17167 refactor: Fix errors in api/server/send_knock.rs 2026-04-22 09:36:38 -04:00
Ginger fc5ceda091 refactor: Fix errors in api/server/send_join.rs 2026-04-22 09:36:38 -04:00
Ginger 4e92d58ce9 refactor: Fix errors in api/server/query.rs 2026-04-22 09:36:38 -04:00
Ginger 8a244da3ce refactor: Fix errors in api/server/publicrooms.rs 2026-04-22 09:36:38 -04:00
Ginger ea52348177 refactor: Fix errors in api/server/media.rs 2026-04-22 09:36:38 -04:00
Ginger 9741bb1c15 refactor: Fix errors in api/server/make_leave.rs 2026-04-22 09:36:38 -04:00
Ginger fd3a502f05 refactor: Fix errors in api/server/make_knock.rs 2026-04-22 09:36:38 -04:00
Ginger e578245cfe refactor: Fix most errors in api/server/make_join.rs 2026-04-22 09:36:38 -04:00
Ginger b0910e6248 refactor: Fix errors in api/server/key.rs 2026-04-22 09:36:38 -04:00
Ginger 2fa2829660 refactor: Fix errors in api/server/invite.rs 2026-04-22 09:36:38 -04:00
Ginger 756e8d478d refactor: Fix errors in api/server/get_missing_events.rs 2026-04-22 09:36:38 -04:00
Ginger 31d384921d refactor: Fix errors in api/server/event.rs 2026-04-22 09:36:38 -04:00
Ginger c49823a136 refactor: Fix errors in api/server/event_auth.rs 2026-04-22 09:36:38 -04:00
Ginger a84119e5d3 refactor: Fix errors in api/server/backfill.rs 2026-04-22 09:36:38 -04:00
Ginger 53123acff8 refactor: Fix remaining errors in api/cient/message.rs 2026-04-22 09:36:38 -04:00
Ginger 89591db677 refactor: Fix mystery weirdness in api/client/sync/v3/mod.rs 2026-04-22 09:36:38 -04:00
Ginger b7316b9e51 refactor: Fix errors in api/client/well_known.rs 2026-04-22 09:36:38 -04:00
Ginger 02ba1780b5 refactor: Fix errors in api/client/voip.rs 2026-04-22 09:36:37 -04:00
Ginger be4a94dc69 refactor: Fix errors in api/client/user_directory.rs 2026-04-22 09:36:37 -04:00
Ginger c0b3661ac5 refactor: Fix errors in api/client/unversioned.rs 2026-04-22 09:36:37 -04:00
Ginger b74ac6414b refactor: Fix errors in api/client/typing.rs 2026-04-22 09:36:37 -04:00
Ginger 3470de9086 refactor: Fix errors in api/client/to_device.rs 2026-04-22 09:36:37 -04:00
Ginger a69b957f50 refactor: Fix errors in api/client/threads.rs 2026-04-22 09:36:37 -04:00
Ginger 4401f0c482 refactor: Fix errors in api/client/thirdparty.rs 2026-04-22 09:36:37 -04:00
Ginger 4886aa8f77 refactor: Fix errors in api/client/tag.rs 2026-04-22 09:36:37 -04:00
Ginger a474ecfede refactor: Fix errors in api/client/state.rs 2026-04-22 09:36:37 -04:00
Ginger f13c855f34 refactor: Fix errors in api/client/session.rs 2026-04-22 09:36:37 -04:00
Ginger 3ded6c7364 refactor: Fix errors in api/client/send.rs 2026-04-22 09:36:37 -04:00
Ginger f06cc8de70 refactor: Fix errors in api/client/search.rs 2026-04-22 09:36:37 -04:00
Ginger d855af52ed refactor: Fix errors in api/client/report.rs 2026-04-22 09:36:37 -04:00
Ginger 0db5536f80 refactor: Fix errors in api/client/relations.rs 2026-04-22 09:36:37 -04:00
Ginger 61894853b4 refactor: Fix errors in api/client/redact.rs 2026-04-22 09:36:37 -04:00
Ginger 1847f3daff refactor: Fix errors in api/client/read_marker.rs 2026-04-22 09:36:37 -04:00
Ginger 7c737d4092 refactor: Fix errors in api/client/push.rs 2026-04-22 09:36:37 -04:00
Ginger 551922fab6 refactor: Fix errors in api/client/profile.rs and api/client/unstable.rs 2026-04-22 09:36:37 -04:00
Ginger f17eea4af4 refactor: Fix errors in api/client/presence.rs 2026-04-22 09:36:37 -04:00
Ginger 25da9e937c refactor: Fix errors in api/client/openid.rs 2026-04-22 09:36:37 -04:00
Ginger 412346f842 refactor: Fix most errors in api/client/messages.rs 2026-04-22 09:36:37 -04:00
Ginger a0a303ac01 refactor: Fix errors in api/client/media.rs 2026-04-22 09:36:37 -04:00
Ginger 85ad4816ac refactor: Fix errors in api/client/media_legacy.rs
Sent from my Steam Deck
2026-04-22 09:36:37 -04:00
Ginger 70d5b4bc55 refactor: Fix errors in api/client/keys.rs 2026-04-22 09:36:37 -04:00
Ginger 45290829d9 refactor: Fix errors in api/client/directory.rs 2026-04-22 09:36:37 -04:00
Ginger 57c574e9dd refactor: Fix errors in api/client/device.rs 2026-04-22 09:36:37 -04:00
Ginger 25565cadfc refactor: Fix errors in api/client/dehydrated_device.rs 2026-04-22 09:36:37 -04:00
Ginger 4e6c83facd refactor: Fix errors in api/client/context.rs 2026-04-22 09:36:37 -04:00
Ginger 34d5966ef9 refactor: Fix errors in api/client/capabilities.rs 2026-04-22 09:36:37 -04:00
Ginger 044970fdcd refactor: Fix errors in api/client/backup.rs 2026-04-22 09:36:37 -04:00
Ginger e3ef6504fb refactor: Fix errors in api/client/appservice.rs 2026-04-22 09:36:37 -04:00
Ginger e4c0067951 refactor: Fix errors in api/client/account_data.rs 2026-04-22 09:36:37 -04:00
Ginger 9502a2428b refactor: Fix errors in api/client/sync 2026-04-22 09:36:37 -04:00
Ginger 4345a64715 refactor: Resolve remaining errors in threepid.rs 2026-04-22 09:36:37 -04:00
Ginger a28b6cbe1d refactor: Fix errors in api/client/room/ 2026-04-22 09:36:37 -04:00
Ginger 5a4006d4a8 refactor: Rename PduBuilder to PartialPdu 2026-04-22 09:36:37 -04:00
Ginger a68ef84004 refactor: Add function to state_accessor to get create event 2026-04-22 09:36:35 -04:00
Ginger b750117375 refactor: Consolidate hierarchy and summary logic in a new service 2026-04-22 09:36:35 -04:00
Ginger ac77be3883 refactor: Fix errors in api/client/membership/ 2026-04-22 09:36:35 -04:00
Ginger d2f28c4d97 refactor: Fix (most) errors in api/client/account/ 2026-04-22 09:36:34 -04:00
Ginger e9c798f19f chore: Clippy fixes 2026-04-22 09:36:34 -04:00
Ginger 15b832ff01 refactor: Replace more uses of RoomVersionId with RoomVersionRules 2026-04-22 09:36:34 -04:00
Ginger ed62e0898c fix: Resolve errors in recently added services 2026-04-22 09:36:34 -04:00
Jade Ellis a56b87c088 refactor: Ruma upstraming, bake a little more 2026-04-22 09:36:34 -04:00
GingerandJade Ellis dde8c226e3 refactor: Ruma upstreaming, half-baked edition
Co-authored-by: Jade Ellis <jade@ellis.link>
2026-04-22 09:36:32 -04:00
227 changed files with 5226 additions and 5706 deletions

No files matched your search

@@ -44,7 +44,7 @@ runs:
- name: Login to builtin registry - name: Login to builtin registry
if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }} if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }}
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4 uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
with: with:
registry: ${{ env.BUILTIN_REGISTRY }} registry: ${{ env.BUILTIN_REGISTRY }}
username: ${{ inputs.registry_user }} username: ${{ inputs.registry_user }}
@@ -52,7 +52,7 @@ runs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }} if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }}
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4 uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
with: with:
# Use persistent BuildKit if BUILDKIT_ENDPOINT is set (e.g. tcp://buildkit:8125) # Use persistent BuildKit if BUILDKIT_ENDPOINT is set (e.g. tcp://buildkit:8125)
driver: ${{ env.BUILDKIT_ENDPOINT != '' && 'remote' || 'docker-container' }} driver: ${{ env.BUILDKIT_ENDPOINT != '' && 'remote' || 'docker-container' }}
@@ -61,7 +61,7 @@ runs:
- name: Extract metadata (tags) for Docker - name: Extract metadata (tags) for Docker
if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }} if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }}
id: meta id: meta
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6 uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6
with: with:
flavor: | flavor: |
latest=auto latest=auto
@@ -67,7 +67,7 @@ runs:
uses: ./.forgejo/actions/rust-toolchain uses: ./.forgejo/actions/rust-toolchain
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4 uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4
with: with:
# Use persistent BuildKit if BUILDKIT_ENDPOINT is set (e.g. tcp://buildkit:8125) # Use persistent BuildKit if BUILDKIT_ENDPOINT is set (e.g. tcp://buildkit:8125)
driver: ${{ env.BUILDKIT_ENDPOINT != '' && 'remote' || 'docker-container' }} driver: ${{ env.BUILDKIT_ENDPOINT != '' && 'remote' || 'docker-container' }}
@@ -79,7 +79,7 @@ runs:
- name: Login to builtin registry - name: Login to builtin registry
if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }} if: ${{ env.BUILTIN_REGISTRY_ENABLED == 'true' }}
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4 uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4
with: with:
registry: ${{ env.BUILTIN_REGISTRY }} registry: ${{ env.BUILTIN_REGISTRY }}
username: ${{ inputs.registry_user }} username: ${{ inputs.registry_user }}
@@ -87,7 +87,7 @@ runs:
- name: Extract metadata (labels, annotations) for Docker - name: Extract metadata (labels, annotations) for Docker
id: meta id: meta
uses: docker/metadata-action@80c7e94dd9b9319bd5eb7a0e0fe9291e23a2a2e9 # v6 uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6
with: with:
images: ${{ inputs.images }} images: ${{ inputs.images }}
# default labels & annotations: https://github.com/docker/metadata-action/blob/master/src/meta.ts#L509 # default labels & annotations: https://github.com/docker/metadata-action/blob/master/src/meta.ts#L509
@@ -17,7 +17,7 @@ inputs:
llvm-version: llvm-version:
description: 'LLVM version to install' description: 'LLVM version to install'
required: false required: false
default: '21' default: '20'
outputs: outputs:
llvm-version: llvm-version:
+1 -1
View File
@@ -71,7 +71,7 @@ runs:
- name: Install timelord-cli and git-warp-time - name: Install timelord-cli and git-warp-time
if: steps.check-binaries.outputs.need-install == 'true' if: steps.check-binaries.outputs.need-install == 'true'
uses: https://github.com/taiki-e/install-action@920ab1831fbf4fb3ef75c8ead83556c918bb7290 # v2 uses: https://github.com/taiki-e/install-action@a2352fc6ce487f030a3aa709482d57823eadfb37 # v2
with: with:
tool: git-warp-time,timelord-cli@3.0.1 tool: git-warp-time,timelord-cli@3.0.1
+2
View File
@@ -45,6 +45,7 @@ If you aren't sure about some, feel free to ask for clarification in #dev:contin
- [ ] I have [tested my contribution][c1t] (or proof-read it for documentation-only changes) - [ ] I have [tested my contribution][c1t] (or proof-read it for documentation-only changes)
myself, if applicable. This includes ensuring code compiles. myself, if applicable. This includes ensuring code compiles.
- [ ] My commit messages follow the [commit message format][c1cm] and are descriptive. - [ ] My commit messages follow the [commit message format][c1cm] and are descriptive.
- [ ] I have written a [news fragment][n1] for this PR, if applicable<!--(can be done after hitting open!)-->.
<!-- <!--
Notes on these requirements: Notes on these requirements:
@@ -78,3 +79,4 @@ Notes on these requirements:
[c1pc]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#pre-commit-checks [c1pc]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#pre-commit-checks
[c1t]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#running-tests-locally [c1t]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#running-tests-locally
[c1cm]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#commit-messages [c1cm]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#commit-messages
[n1]: https://towncrier.readthedocs.io/en/stable/tutorial.html#creating-news-fragments
+1 -4
View File
@@ -28,7 +28,7 @@ jobs:
const labelsToAdd = new Set(); const labelsToAdd = new Set();
for (const file of fileNames) { for (const file of fileNames) {
if (file.startsWith('docs/') || file.startsWith('theme/') || (file.endsWith('.md') && !file.startsWith('changelog.d/')) || file == 'rspress.config.ts') { if (file.startsWith('docs/') || file.startsWith('theme/') || file.endsWith('.md') || file == 'rspress.config.ts') {
labelsToAdd.add('Documentation'); labelsToAdd.add('Documentation');
} }
if (file.startsWith('.forgejo/')) { if (file.startsWith('.forgejo/')) {
@@ -37,9 +37,6 @@ jobs:
if (file.startsWith('pkg/') || file.startsWith('nix/') || file === 'flake.nix' || file === 'flake.lock' || file.startsWith('docker/')) { if (file.startsWith('pkg/') || file.startsWith('nix/') || file === 'flake.nix' || file === 'flake.lock' || file.startsWith('docker/')) {
labelsToAdd.add('Meta/Packaging'); labelsToAdd.add('Meta/Packaging');
} }
if (file === 'Cargo.lock') {
labelsToAdd.add('Dependencies');
}
} }
if (labelsToAdd.size > 0) { if (labelsToAdd.size > 0) {
+1 -1
View File
@@ -96,7 +96,7 @@ jobs:
if [[ ${{ forge.ref_name }} =~ ^v+[0-9]\.+[0-9]\.+[0-9]$ ]]; then if [[ ${{ forge.ref_name }} =~ ^v+[0-9]\.+[0-9]\.+[0-9]$ ]]; then
# Use the "stable" component for tagged semver releases # Use the "stable" component for tagged semver releases
COMPONENT="stable" COMPONENT="stable"
elif [[ ${{ forge.ref_name }} =~ ^v+[0-9]\.+[0-9]\.+[0-9] ]]; then elif [[ ${{ forge.ref }} =~ ^refs/tags/^v+[0-9]\.+[0-9]\.+[0-9] ]]; then
# Use the "unstable" component for tagged semver pre-releases # Use the "unstable" component for tagged semver pre-releases
COMPONENT="unstable" COMPONENT="unstable"
else else
+2 -6
View File
@@ -105,7 +105,7 @@ jobs:
RELEASE_SUFFIX="" RELEASE_SUFFIX=""
TAG_NAME="${{ github.ref_name }}" TAG_NAME="${{ github.ref_name }}"
# Extract version from tag (remove v prefix if present) # Extract version from tag (remove v prefix if present)
TAG_VERSION=$(echo "$TAG_NAME" | sed 's/^v//' | tr '-' '~') TAG_VERSION=$(echo "$TAG_NAME" | sed 's/^v//')
# Create spec file with tag version # Create spec file with tag version
sed -e "s/^Version:.*$/Version: $TAG_VERSION/" \ sed -e "s/^Version:.*$/Version: $TAG_VERSION/" \
@@ -270,13 +270,9 @@ jobs:
# Determine the group based on ref type and branch # Determine the group based on ref type and branch
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
GROUP="stable"
# For tags, extract the tag name for version info # For tags, extract the tag name for version info
TAG_NAME="${{ github.ref_name }}" TAG_NAME="${{ github.ref_name }}"
if [[ "$TAG_NAME" == *"-"* ]]; then
GROUP="unstable"
else
GROUP="stable"
fi
elif [ "${{ github.ref_name }}" = "main" ]; then elif [ "${{ github.ref_name }}" = "main" ]; then
GROUP="dev" GROUP="dev"
else else
+3 -3
View File
@@ -32,7 +32,7 @@ jobs:
- name: Setup Node.js - name: Setup Node.js
if: steps.runner-env.outputs.node_major == '' || steps.runner-env.outputs.node_major < '20' if: steps.runner-env.outputs.node_major == '' || steps.runner-env.outputs.node_major < '20'
uses: https://github.com/actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 uses: https://github.com/actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with: with:
node-version: 22 node-version: 22
@@ -56,7 +56,7 @@ jobs:
- name: Deploy to Cloudflare Pages (Production) - name: Deploy to Cloudflare Pages (Production)
if: github.ref == 'refs/heads/main' && vars.CLOUDFLARE_PROJECT_NAME != '' if: github.ref == 'refs/heads/main' && vars.CLOUDFLARE_PROJECT_NAME != ''
uses: https://github.com/cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4 uses: https://github.com/cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3
with: with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
@@ -64,7 +64,7 @@ jobs:
- name: Deploy to Cloudflare Pages (Preview) - name: Deploy to Cloudflare Pages (Preview)
if: github.ref != 'refs/heads/main' && vars.CLOUDFLARE_PROJECT_NAME != '' if: github.ref != 'refs/heads/main' && vars.CLOUDFLARE_PROJECT_NAME != ''
uses: https://github.com/cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4 uses: https://github.com/cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3
with: with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+2 -2
View File
@@ -24,7 +24,7 @@ jobs:
steps: steps:
- name: 📦 Setup Node.js - name: 📦 Setup Node.js
uses: https://github.com/actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 uses: https://github.com/actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with: with:
node-version: "22" node-version: "22"
@@ -121,7 +121,7 @@ jobs:
- name: 🚀 Deploy to Cloudflare Pages - name: 🚀 Deploy to Cloudflare Pages
if: vars.CLOUDFLARE_PROJECT_NAME != '' if: vars.CLOUDFLARE_PROJECT_NAME != ''
id: deploy id: deploy
uses: https://github.com/cloudflare/wrangler-action@ebbaa1584979971c8614a24965b4405ff95890e0 # v4 uses: https://github.com/cloudflare/wrangler-action@9acf94ace14e7dc412b076f2c5c20b8ce93c79cd # v3
with: with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
+1 -1
View File
@@ -55,7 +55,7 @@ jobs:
# repositories: continuwuity # repositories: continuwuity
- name: Install regsync - name: Install regsync
uses: https://github.com/regclient/actions/regsync-installer@c70ad64367908075211b10dcd2ab9fad4bfa1816 # main uses: https://github.com/regclient/actions/regsync-installer@f3c6d87835906c175eb6ccfc18b348b69bb447e7 # main
- name: Check what images need mirroring - name: Check what images need mirroring
run: | run: |
-23
View File
@@ -9,7 +9,6 @@ on:
permissions: permissions:
contents: read contents: read
pull-requests: read
jobs: jobs:
fast-checks: fast-checks:
@@ -41,32 +40,10 @@ jobs:
cargo +nightly fmt --all -- --check && \ cargo +nightly fmt --all -- --check && \
echo "✅ Formatting check passed" || \ echo "✅ Formatting check passed" || \
exit 1 exit 1
check-changes:
name: Check changed files
runs-on: ubuntu-latest
outputs:
rust: ${{ steps.filter.outputs.rust }}
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Check for file changes
uses: https://github.com/dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4
id: filter
with:
filters: |
rust:
- '**/*.rs'
- '**/Cargo.toml'
- '**/Cargo.lock'
clippy-and-tests: clippy-and-tests:
name: Clippy and Cargo Tests name: Clippy and Cargo Tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: check-changes
if: needs.check-changes.outputs.rust == 'true'
steps: steps:
- name: Checkout repository - name: Checkout repository
+2 -24
View File
@@ -62,7 +62,7 @@ jobs:
registry_password: ${{ secrets.BUILTIN_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }} registry_password: ${{ secrets.BUILTIN_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
- name: Build and push Docker image by digest - name: Build and push Docker image by digest
id: build id: build
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7 uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7
with: with:
context: . context: .
file: "docker/Dockerfile" file: "docker/Dockerfile"
@@ -149,7 +149,7 @@ jobs:
registry_password: ${{ secrets.BUILTIN_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }} registry_password: ${{ secrets.BUILTIN_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
- name: Build and push max-perf Docker image by digest - name: Build and push max-perf Docker image by digest
id: build id: build
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7 uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7
with: with:
context: . context: .
file: "docker/Dockerfile" file: "docker/Dockerfile"
@@ -199,28 +199,6 @@ jobs:
registry_user: ${{ vars.BUILTIN_REGISTRY_USER || github.actor }} registry_user: ${{ vars.BUILTIN_REGISTRY_USER || github.actor }}
registry_password: ${{ secrets.BUILTIN_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }} registry_password: ${{ secrets.BUILTIN_REGISTRY_PASSWORD || secrets.GITHUB_TOKEN }}
release-binaries:
name: "Release Binaries"
runs-on: ubuntu-latest
needs:
- build-release
- build-maxperf
permissions:
contents: write
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Download binary artifacts
uses: forgejo/download-artifact@v4
with:
pattern: conduwuit*
path: binaries
merge-multiple: true
- name: Create Release and Upload
uses: https://github.com/softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3
with:
draft: true
files: binaries/*
mirror_images: mirror_images:
name: "Mirror Images" name: "Mirror Images"
runs-on: ubuntu-latest runs-on: ubuntu-latest
+3 -3
View File
@@ -43,7 +43,7 @@ jobs:
name: Renovate name: Renovate
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: ghcr.io/renovatebot/renovate:43.195.3@sha256:868dffc3d6a46f42dfefe48b6978cc063d8df9c1d58a93a694c8989afa503e34 image: ghcr.io/renovatebot/renovate:43.111.0@sha256:da5fcac20c48d9792aac9c61fd234531bfa8df61263a39387cd8920263ca4768
options: --tmpfs /tmp:exec options: --tmpfs /tmp:exec
steps: steps:
- name: Checkout - name: Checkout
@@ -90,12 +90,12 @@ jobs:
RENOVATE_PLATFORM: forgejo RENOVATE_PLATFORM: forgejo
RENOVATE_ENDPOINT: ${{ github.server_url }} RENOVATE_ENDPOINT: ${{ github.server_url }}
RENOVATE_AUTODISCOVER: 'false' RENOVATE_AUTODISCOVER: 'false'
RENOVATE_REPOSITORIES: '["${{ github.repository }}", "continuwuation/resolvematrix"]' RENOVATE_REPOSITORIES: '["${{ github.repository }}"]'
RENOVATE_GIT_TIMEOUT: 60000 RENOVATE_GIT_TIMEOUT: 60000
RENOVATE_REQUIRE_CONFIG: 'required' RENOVATE_REQUIRE_CONFIG: 'required'
# RENOVATE_ONBOARDING: 'false' RENOVATE_ONBOARDING: 'false'
RENOVATE_INHERIT_CONFIG: 'true' RENOVATE_INHERIT_CONFIG: 'true'
RENOVATE_GITHUB_TOKEN_WARN: 'false' RENOVATE_GITHUB_TOKEN_WARN: 'false'
+1 -1
View File
@@ -24,7 +24,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.46.2 rev: v1.45.1
hooks: hooks:
- id: typos - id: typos
- id: typos - id: typos
-17
View File
@@ -1,20 +1,3 @@
# Continuwuity 0.5.8 (2026-04-24)
## Features
- LDAP can now optionally be connected to using StartTLS, and you may unsafely skip verification. Contributed by @getz (#1389)
- Users will now be prevented from removing their email if the server is configured to require an email when registering an account.
## Bugfixes
- Fixed a situation where multiple email addresses could be associated with one user when that user changes their email address.
## Improved Documentation
- Updated config docs to state we support room version 12, and set it as default. Contributed by @ezera. (#1622)
- Improve instructions for generic deployments, removing unnecessary parts and documenting the new initial registration token flow. Contributed by @stratself (#1677)
# Continuwuity v0.5.7 (2026-04-17) # Continuwuity v0.5.7 (2026-04-17)
## Features ## Features
+1 -1
View File
@@ -1 +1 @@
Contributors are expected to follow the [Continuwuity Community Guidelines](https://continuwuity.org/community/guidelines). Contributors are expected to follow the [Continuwuity Community Guidelines](continuwuity.org/community/guidelines).
+3 -3
View File
@@ -137,9 +137,9 @@ The allowed types for commits are:
Examples: Examples:
``` ```
feat: Add user authentication feat: add user authentication
fix(database): Resolve connection pooling issue fix(database): resolve connection pooling issue
docs: Update installation instructions docs: update installation instructions
``` ```
The project uses the `committed` hook to validate commit messages in pre-commit. This ensures all commits follow the conventional format. The project uses the `committed` hook to validate commit messages in pre-commit. This ensures all commits follow the conventional format.
Generated
+970 -481
View File
File diff suppressed because it is too large. Load diff
+40 -31
View File
@@ -12,7 +12,7 @@ license = "Apache-2.0"
# See also `rust-toolchain.toml` # See also `rust-toolchain.toml`
readme = "README.md" readme = "README.md"
repository = "https://forgejo.ellis.link/continuwuation/continuwuity" repository = "https://forgejo.ellis.link/continuwuation/continuwuity"
version = "0.5.9" version = "0.5.7"
[workspace.metadata.crane] [workspace.metadata.crane]
name = "conduwuit" name = "conduwuit"
@@ -36,13 +36,10 @@ version = "0.3"
features = ["ffi", "std", "union"] features = ["ffi", "std", "union"]
[workspace.dependencies.const-str] [workspace.dependencies.const-str]
version = "1.1.0" version = "0.7.0"
[workspace.dependencies.ctor] [workspace.dependencies.ctor]
version = "1.0.6" version = "0.10.0"
[workspace.dependencies.dtor]
version = "1.0.0"
[workspace.dependencies.cargo_toml] [workspace.dependencies.cargo_toml]
version = "0.22" version = "0.22"
@@ -50,7 +47,7 @@ default-features = false
features = ["features"] features = ["features"]
[workspace.dependencies.toml] [workspace.dependencies.toml]
version = "1.1.2" version = "1.0.0"
default-features = false default-features = false
features = ["parse", "serde"] features = ["parse", "serde"]
@@ -105,18 +102,15 @@ default-features = false
features = ["typed-header", "tracing", "cookie"] features = ["typed-header", "tracing", "cookie"]
[workspace.dependencies.axum-server] [workspace.dependencies.axum-server]
version = "0.8.0" version = "0.7.2"
default-features = false default-features = false
# to listen on both HTTP and HTTPS if listening on TLS dierctly from conduwuit for complement or sytest # to listen on both HTTP and HTTPS if listening on TLS dierctly from conduwuit for complement or sytest
[workspace.dependencies.axum-server-dual-protocol] [workspace.dependencies.axum-server-dual-protocol]
# version = "0.7" version = "0.7"
git = "https://github.com/vinchona/axum-server-dual-protocol.git"
rev = "ca6db055254255b74238673ce4135698e347d71c" # feat!: bump axum_server to 0.8.0
default-features = false
[workspace.dependencies.axum-client-ip] [workspace.dependencies.axum-client-ip]
version = "1.3" version = "0.7"
[workspace.dependencies.tower] [workspace.dependencies.tower]
version = "0.5.2" version = "0.5.2"
@@ -140,12 +134,13 @@ features = [
[workspace.dependencies.rustls] [workspace.dependencies.rustls]
version = "0.23.25" version = "0.23.25"
default-features = false default-features = false
features = ["aws_lc_rs"]
[workspace.dependencies.reqwest] [workspace.dependencies.reqwest]
version = "0.13.2" version = "0.12.15"
default-features = false default-features = false
features = [ features = [
"rustls-no-provider", "rustls-tls-native-roots",
"socks", "socks",
"hickory-dns", "hickory-dns",
"http2", "http2",
@@ -164,7 +159,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.26" version = "0.0.23"
# 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]
@@ -180,7 +175,7 @@ version = "0.5.3"
features = ["alloc", "rand"] features = ["alloc", "rand"]
default-features = false default-features = false
# Used to generate thumbnails for images # Used to generate thumbnails for images & blurhashes
[workspace.dependencies.image] [workspace.dependencies.image]
version = "0.25.5" version = "0.25.5"
default-features = false default-features = false
@@ -191,6 +186,14 @@ features = [
"webp", "webp",
] ]
[workspace.dependencies.blurhash]
version = "0.2.3"
default-features = false
features = [
"fast-linear-to-srgb",
"image",
]
# logging # logging
[workspace.dependencies.log] [workspace.dependencies.log]
version = "0.4.27" version = "0.4.27"
@@ -248,7 +251,7 @@ features = [
] ]
[workspace.dependencies.tokio-metrics] [workspace.dependencies.tokio-metrics]
version = "0.5.0" version = "0.4.0"
[workspace.dependencies.libloading] [workspace.dependencies.libloading]
version = "0.9.0" version = "0.9.0"
@@ -344,7 +347,7 @@ version = "1.1.1"
[workspace.dependencies.ruma] [workspace.dependencies.ruma]
# version = "0.14.1" # version = "0.14.1"
git = "https://github.com/ruma/ruma.git" git = "https://github.com/ruma/ruma.git"
rev = "9c9dccc93f054bbd28f23f630223fffa6289ecbc" rev = "985dec87f235f169b3adddf3a7d37f590403e6e9"
features = [ features = [
"appservice-api-c", "appservice-api-c",
"client-api", "client-api",
@@ -356,6 +359,7 @@ features = [
"ring-compat", "ring-compat",
"compat-upload-signatures", "compat-upload-signatures",
"compat-optional-txn-pdus", "compat-optional-txn-pdus",
"unstable-msc2448",
"unstable-msc2666", "unstable-msc2666",
"unstable-msc2867", "unstable-msc2867",
"unstable-msc2870", "unstable-msc2870",
@@ -376,7 +380,6 @@ features = [
"unstable-msc4373", "unstable-msc4373",
"unstable-msc4380", "unstable-msc4380",
"unstable-msc4143", "unstable-msc4143",
"unstable-msc4293",
"unstable-msc4406", "unstable-msc4406",
"unstable-msc4439", "unstable-msc4439",
"unstable-extensible-events", "unstable-extensible-events",
@@ -384,7 +387,7 @@ features = [
[workspace.dependencies.rust-rocksdb] [workspace.dependencies.rust-rocksdb]
git = "https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1" git = "https://forgejo.ellis.link/continuwuation/rust-rocksdb-zaidoon1"
rev = "0a25ff92f7c09b55eec496b9c192c7d5136ab2b8" rev = "31fb8f772c7afcdc0061ab6a40cfa3a1be2fccd9"
default-features = false default-features = false
features = [ features = [
"multi-threaded-cf", "multi-threaded-cf",
@@ -404,33 +407,34 @@ default-features = false
# optional opentelemetry, performance measurements, flamegraphs, etc for performance measurements and monitoring # optional opentelemetry, performance measurements, flamegraphs, etc for performance measurements and monitoring
[workspace.dependencies.opentelemetry] [workspace.dependencies.opentelemetry]
version = "0.32.0" version = "0.31.0"
[workspace.dependencies.tracing-flame] [workspace.dependencies.tracing-flame]
version = "0.2.0" version = "0.2.0"
[workspace.dependencies.tracing-opentelemetry] [workspace.dependencies.tracing-opentelemetry]
version = "0.33.0" version = "0.32.0"
[workspace.dependencies.opentelemetry_sdk] [workspace.dependencies.opentelemetry_sdk]
version = "0.32.0" version = "0.31.0"
features = ["rt-tokio"] features = ["rt-tokio"]
[workspace.dependencies.opentelemetry-otlp] [workspace.dependencies.opentelemetry-otlp]
version = "0.32.0" version = "0.31.0"
features = ["http", "grpc-tonic", "trace", "logs", "metrics"] features = ["http", "grpc-tonic", "trace", "logs", "metrics"]
# optional sentry metrics for crash/panic reporting # optional sentry metrics for crash/panic reporting
[workspace.dependencies.sentry] [workspace.dependencies.sentry]
version = "0.48.0" version = "0.46.0"
default-features = false default-features = false
features = [ features = [
"backtrace", "backtrace",
"contexts", "contexts",
"debug-images", "debug-images",
"panic", "panic",
"rustls",
"tower", "tower",
"tower-http", "tower-http",
"tracing", "tracing",
@@ -439,9 +443,9 @@ features = [
] ]
[workspace.dependencies.sentry-tracing] [workspace.dependencies.sentry-tracing]
version = "0.48.0" version = "0.46.0"
[workspace.dependencies.sentry-tower] [workspace.dependencies.sentry-tower]
version = "0.48.0" version = "0.46.0"
# jemalloc usage # jemalloc usage
[workspace.dependencies.tikv-jemalloc-sys] [workspace.dependencies.tikv-jemalloc-sys]
@@ -534,22 +538,27 @@ version = "2.1.1"
features = ["std"] features = ["std"]
[workspace.dependencies.minicbor-serde] [workspace.dependencies.minicbor-serde]
version = "0.7.0" version = "0.6.0"
features = ["std"] features = ["std"]
[workspace.dependencies.maplit] [workspace.dependencies.maplit]
version = "1.0.2" version = "1.0.2"
[workspace.dependencies.ldap3]
version = "0.12.0"
default-features = false
features = ["sync", "tls-rustls", "rustls-provider"]
[workspace.dependencies.yansi] [workspace.dependencies.yansi]
version = "1.0.1" version = "1.0.1"
[workspace.dependencies.askama] [workspace.dependencies.askama]
version = "0.16.0" version = "0.15.0"
[workspace.dependencies.lettre] [workspace.dependencies.lettre]
version = "0.11.19" version = "0.11.19"
default-features = false default-features = false
features = ["smtp-transport", "pool", "hostname", "builder", "rustls", "rustls-native-certs", "tokio1", "rustls-no-provider", "tokio1-rustls", "tracing", "serde"] features = ["smtp-transport", "pool", "hostname", "builder", "rustls", "rustls-native-certs", "tokio1", "ring", "tokio1-rustls", "tracing", "serde"]
[workspace.dependencies.governor] [workspace.dependencies.governor]
version = "0.10.4" version = "0.10.4"
-1
View File
@@ -1 +0,0 @@
The invite recipient's membership event is now included in invite stripped state, which should fix flaky invite display in some clients. Contributed by @ginger
+1 -1
View File
@@ -1 +1 @@
Switched from Continuwuity's fork of Ruma back to upstream Ruma. Contributed by @ginger. Switched from Continuwuity's fork of Ruma back to upstream Ruma, unblocking exciting new features such as OAuth login. Contributed by @ginger.
-1
View File
@@ -1 +0,0 @@
Removed support for guest user registration, a little-used and deprecated approach to room previews.
-1
View File
@@ -1 +0,0 @@
The deprecated `well_known.rtc_focus_server_urls` config option has been removed. MatrixRTC foci should be configured using the `matrix_rtc.foci` config option.
-1
View File
@@ -1 +0,0 @@
The version of Debian that the Docker-based build process uses has been upgraded from Bookworm to Trixie, meaning that standalone binaries now have a minimum glibc of 2.41, and can no longer be used on distro versions from before 2025-01-30
-1
View File
@@ -1 +0,0 @@
Support for server-side blurhashing (part of MSC2448) has been removed.
-1
View File
@@ -1 +0,0 @@
Updated [MSC4284: Policy Servers](https://github.com/matrix-org/matrix-spec-proposals/pull/4284) implementation to support the newly stabilised proposal. Contributed by @nex.
-1
View File
@@ -1 +0,0 @@
Add performance tuning documentation. Contributed by @stratself.
+1
View File
@@ -0,0 +1 @@
Updated config docs to state we support room version 12, and set it as default. Contributed by @ezera.
-1
View File
@@ -1 +0,0 @@
Explain accessing Continuwuity's server console when deployed via Docker.
-1
View File
@@ -1 +0,0 @@
Added config option for default room ACLs. Contributed by @eve.
-1
View File
@@ -1 +0,0 @@
Removed support for LDAP.
-1
View File
@@ -1 +0,0 @@
Clarified in the config that `max_request_size` affects federated media as well.
-1
View File
@@ -1 +0,0 @@
Added support for fallback encryption keys.
-1
View File
@@ -1 +0,0 @@
Fixed a bug that caused the server to drop events during processing if several events for the same room were sent in a singular transaction. Contributed by @nex.
-1
View File
@@ -1 +0,0 @@
Add `!admin users reject-all-invites` to clean invite spam
-1
View File
@@ -1 +0,0 @@
fix `!admin query account-data account-data-get` not returning the content
-9
View File
@@ -1,9 +0,0 @@
Implemented event rejection, which should resolve and prevent future netsplits of the kinds observed
within some Continuwuity rooms.
Also resolved several bugs related to both soft-failing events, and event backfilling, which should
improve state resolution stability.
The `!admin debug get-pdu` command was updated to disambiguate event acceptance status, and
`!admin debug show-auth-chain` was added to visually display event auth chains, which may assist
developers in debugging strangely complex events.
Contributed by @nex.
-1
View File
@@ -1 +0,0 @@
Fixed an issue where Continuwuity would only advertise support for the unstable endpoint for Mutual Rooms (MSC2666), despite only supporting the stable endpoint. Contributed by @Henry-Hiles (QuadRadical)
-1
View File
@@ -1 +0,0 @@
Fixed several bugs in the `POST /_matrix/client/v3/rooms/{roomId}/upgrade` endpoint. Contributed by @nex.
-1
View File
@@ -1 +0,0 @@
Added full support for [MSC4168: Update `m.space.*` state on room upgrade](https://github.com/matrix-org/matrix-spec-proposals/pull/4168). Contributed by @nex.
+2
View File
@@ -7,6 +7,7 @@
[global] [global]
address = "0.0.0.0" address = "0.0.0.0"
allow_device_name_federation = true allow_device_name_federation = true
allow_guest_registration = true
allow_public_room_directory_over_federation = true allow_public_room_directory_over_federation = true
allow_registration = true allow_registration = true
database_path = "/database" database_path = "/database"
@@ -31,6 +32,7 @@ rocksdb_log_level = "info"
rocksdb_max_log_files = 1 rocksdb_max_log_files = 1
rocksdb_recovery_mode = 0 rocksdb_recovery_mode = 0
rocksdb_paranoid_file_checks = true rocksdb_paranoid_file_checks = true
log_guest_registrations = false
allow_legacy_media = true allow_legacy_media = true
startup_netburst = true startup_netburst = true
startup_netburst_keep = -1 startup_netburst_keep = -1
+155 -44
View File
@@ -291,7 +291,6 @@
#ip_lookup_strategy = 5 #ip_lookup_strategy = 5
# Max request size for file uploads in bytes. Defaults to 20MB. # Max request size for file uploads in bytes. Defaults to 20MB.
# Also limits incoming federated media.
# #
#max_request_size = 20971520 #max_request_size = 20971520
@@ -372,18 +371,21 @@
# #
#federation_timeout = 60 #federation_timeout = 60
# Policy server request timeout (seconds). Generally policy # MSC4284 Policy server request timeout (seconds). Generally policy
# servers should respond near instantly, however may slow down under # servers should respond near instantly, however may slow down under
# load. If a policy server doesn't respond in a short amount of time, the # load. If a policy server doesn't respond in a short amount of time, the
# room it is configured in may become unusable if this limit is set too # room it is configured in may become unusable if this limit is set too
# high. 30 seconds is a good default, however lower values may be # high. 10 seconds is a good default, however dropping this to 3-5 seconds
# acceptable if temporary send failures are an okay trade-off. # can be acceptable.
# #
# Please be aware that policy requests are *NOT* currently re-tried, so if
# a spam check request fails, the event will be assumed to be not spam,
# which in some cases may result in spam being sent to or received from
# the room that would typically be prevented.
# #
# About policy servers: https://matrix.org/blog/2025/04/introducing-policy-servers/ # About policy servers: https://matrix.org/blog/2025/04/introducing-policy-servers/
# (Stabilized in Matrix v1.18)
# #
#policy_server_request_timeout = 30 #policy_server_request_timeout = 10
# Federation client idle connection pool timeout (seconds). # Federation client idle connection pool timeout (seconds).
# #
@@ -621,30 +623,6 @@
# #
#default_room_version = "12" #default_room_version = "12"
# A default allow value for the Access Control List when creating a room.
#
# If a list is provided, new rooms will be created with
# a m.room.server_acl event. Only servers which match one of the patterns
# in the list will be permitted to participate in the room.
#
# ACLs in existing rooms will not be updated automatically. This is not
# a substitute for moderation bots.
#
#default_room_acl_allow =
# A default deny value for the Access Control List when creating a room.
#
# If a list is provided, new rooms will be created with
# a m.room.server_acl event. Servers which match one of the patterns
# in the list will be NOT permitted to participate in the room.
#
# This config cannot be used if the default_room_acl_allow config is used.
#
# ACLs in existing rooms will not be updated automatically. This is not
# a substitute for moderation bots.
#
#default_room_acl_deny =
# Enable OpenTelemetry OTLP tracing export. This replaces the deprecated # Enable OpenTelemetry OTLP tracing export. This replaces the deprecated
# Jaeger exporter. Traces will be sent via OTLP to a collector (such as # Jaeger exporter. Traces will be sent via OTLP to a collector (such as
# Jaeger) that supports the OpenTelemetry Protocol. # Jaeger) that supports the OpenTelemetry Protocol.
@@ -1292,6 +1270,21 @@
# #
#brotli_compression = false #brotli_compression = false
# Set to true to allow user type "guest" registrations. Some clients like
# Element attempt to register guest users automatically.
#
#allow_guest_registration = false
# Set to true to log guest registrations in the admin room. Note that
# these may be noisy or unnecessary if you're a public homeserver.
#
#log_guest_registrations = false
# Set to true to allow guest registrations/users to auto join any rooms
# specified in `auto_join_rooms`.
#
#allow_guests_auto_join_rooms = false
# Enable the legacy unauthenticated Matrix media repository endpoints. # Enable the legacy unauthenticated Matrix media repository endpoints.
# These endpoints consist of: # These endpoints consist of:
# - /_matrix/media/*/config # - /_matrix/media/*/config
@@ -1591,6 +1584,19 @@
# #
#block_non_admin_invites = false #block_non_admin_invites = false
# Enable or disable making requests to MSC4284 Policy Servers.
# It is recommended you keep this enabled unless you experience frequent
# connectivity issues, such as in a restricted networking environment.
#
#enable_msc4284_policy_servers = true
# Enable running locally generated events through configured MSC4284
# policy servers. You may wish to disable this if your server is
# single-user for a slight speed benefit in some rooms, but otherwise
# should leave it enabled.
#
#policy_server_check_own_events = true
# Allow admins to enter commands in rooms other than "#admins" (admin # Allow admins to enter commands in rooms other than "#admins" (admin
# room) by prefixing your message with "\!admin" or "\\!admin" followed up # room) by prefixing your message with "\!admin" or "\\!admin" followed up
# a normal continuwuity admin command. The reply will be publicly visible # a normal continuwuity admin command. The reply will be publicly visible
@@ -1857,11 +1863,6 @@
# #
#support_page = #support_page =
# The ed25519 public key for the policy server available at this server's
# name. Must be unpadded base64.
#
#policy_server_public_key =
# Role string for server support contacts, to be served as part of the # Role string for server support contacts, to be served as part of the
# MSC1929 server support endpoint at /.well-known/matrix/support. # MSC1929 server support endpoint at /.well-known/matrix/support.
# #
@@ -1887,6 +1888,34 @@
# #
#support_pgp_key = #support_pgp_key =
# **DEPRECATED**: Use `[global.matrix_rtc].foci` instead.
#
# A list of MatrixRTC foci URLs which will be served as part of the
# MSC4143 client endpoint at /.well-known/matrix/client.
#
# This option is deprecated and will be removed in a future release.
# Please migrate to the new `[global.matrix_rtc]` config section.
#
#rtc_focus_server_urls = []
[global.blurhashing]
# blurhashing x component, 4 is recommended by https://blurha.sh/
#
#components_x = 4
# blurhashing y component, 3 is recommended by https://blurha.sh/
#
#components_y = 3
# Max raw size that the server will blurhash, this is the size of the
# image after converting it to raw data, it should be higher than the
# upload limit but not too high. The higher it is the higher the
# potential load will be for clients requesting blurhashes. The default
# is 33.55MB. Setting it to 0 disables blurhashing.
#
#blurhash_max_raw_size = 33554432
[global.matrix_rtc] [global.matrix_rtc]
# A list of MatrixRTC foci (transports) which will be served via the # A list of MatrixRTC foci (transports) which will be served via the
@@ -1904,6 +1933,94 @@
# #
#foci = [] #foci = []
[global.ldap]
# Whether to enable LDAP login.
#
# example: "true"
#
#enable = false
# Whether to force LDAP authentication or authorize classical password
# login.
#
# example: "true"
#
#ldap_only = false
# URI of the LDAP server.
#
# example: "ldap://ldap.example.com:389"
#
#uri = ""
# Root of the searches.
#
# example: "ou=users,dc=example,dc=org"
#
#base_dn = ""
# Bind DN if anonymous search is not enabled.
#
# You can use the variable `{username}` that will be replaced by the
# entered username. In such case, the password used to bind will be the
# one provided for the login and not the one given by
# `bind_password_file`. Beware: automatically granting admin rights will
# not work if you use this direct bind instead of a LDAP search.
#
# example: "cn=ldap-reader,dc=example,dc=org" or
# "cn={username},ou=users,dc=example,dc=org"
#
#bind_dn = ""
# Path to a file on the system that contains the password for the
# `bind_dn`.
#
# The server must be able to access the file, and it must not be empty.
#
#bind_password_file = ""
# Search filter to limit user searches.
#
# You can use the variable `{username}` that will be replaced by the
# entered username for more complex filters.
#
# example: "(&(objectClass=person)(memberOf=matrix))"
#
#filter = "(objectClass=*)"
# Attribute to use to uniquely identify the user.
#
# example: "uid" or "cn"
#
#uid_attribute = "uid"
# Attribute containing the display name of the user.
#
# example: "givenName" or "sn"
#
#name_attribute = "givenName"
# Root of the searches for admin users.
#
# Defaults to `base_dn` if empty.
#
# example: "ou=admins,dc=example,dc=org"
#
#admin_base_dn = ""
# The LDAP search filter to find administrative users for continuwuity.
#
# If left blank, administrative state must be configured manually for each
# user.
#
# You can use the variable `{username}` that will be replaced by the
# entered username for more complex filters.
#
# example: "(objectClass=conduwuitAdmin)" or "(uid={username})"
#
#admin_filter = ""
#[global.antispam] #[global.antispam]
#[global.antispam.meowlnir] #[global.antispam.meowlnir]
@@ -1972,18 +2089,12 @@
# #
#sender = #sender =
# Whether to allow public registration with an email address. # Whether to require that users provide an email address when they
# # register.
# Note that, if this option is enabled, anyone will be able to register an
# account with just an email address.
#
# If either this option or `require_email_for_token_registration` are set,
# users will not be allowed to remove their email address.
# #
#require_email_for_registration = false #require_email_for_registration = false
# Whether to require that users who register with a registration token # Whether to require that users who register with a registration token
# provide an email address. This option is independent of # provide an email address.
# `require_email_for_registration`.
# #
#require_email_for_token_registration = false #require_email_for_token_registration = false
+5 -7
View File
@@ -1,5 +1,5 @@
ARG RUST_VERSION=1 ARG RUST_VERSION=1
ARG DEBIAN_VERSION=trixie ARG DEBIAN_VERSION=bookworm
FROM --platform=$BUILDPLATFORM docker.io/tonistiigi/xx AS xx FROM --platform=$BUILDPLATFORM docker.io/tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM rust:${RUST_VERSION}-slim-${DEBIAN_VERSION} AS base FROM --platform=$BUILDPLATFORM rust:${RUST_VERSION}-slim-${DEBIAN_VERSION} AS base
@@ -10,21 +10,19 @@ RUN rm -f /etc/apt/apt.conf.d/docker-clean
# Match Rustc version as close as possible # Match Rustc version as close as possible
# rustc -vV # rustc -vV
ARG LLVM_VERSION=22 ARG LLVM_VERSION=21
# ENV RUSTUP_TOOLCHAIN=${RUST_VERSION} # ENV RUSTUP_TOOLCHAIN=${RUST_VERSION}
# Install repo tools # Install repo tools
# Line one: compiler tools # Line one: compiler tools
# Line two: curl, for downloading binaries and wget because llvm.sh is broken with curl # Line two: curl, for downloading binaries and wget because llvm.sh is broken with curl
# Line three: for xx-verify # Line three: for xx-verify
# golang, cmake: For aws-lc-rs bindgen
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
--mount=type=cache,target=/var/lib/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt,sharing=locked \
apt-get update && apt-get install -y \ apt-get update && apt-get install -y \
pkg-config make jq \ pkg-config make jq \
wget curl git lsb-release gpg \ wget curl git software-properties-common \
file file
# golang cmake
# LLVM packages # LLVM packages
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
@@ -50,7 +48,7 @@ EOF
# Developer tool versions # Developer tool versions
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall # renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
ENV BINSTALL_VERSION=1.19.1 ENV BINSTALL_VERSION=1.18.1
# renovate: datasource=github-releases depName=psastras/sbom-rs # renovate: datasource=github-releases depName=psastras/sbom-rs
ENV CARGO_SBOM_VERSION=0.9.1 ENV CARGO_SBOM_VERSION=0.9.1
# renovate: datasource=crate depName=lddtree # renovate: datasource=crate depName=lddtree
@@ -164,7 +162,7 @@ ENV CONDUWUIT_VERSION_EXTRA=$CONDUWUIT_VERSION_EXTRA
ENV CONTINUWUITY_VERSION_EXTRA=$CONTINUWUITY_VERSION_EXTRA ENV CONTINUWUITY_VERSION_EXTRA=$CONTINUWUITY_VERSION_EXTRA
ARG RUST_PROFILE=release ARG RUST_PROFILE=release
ARG CARGO_FEATURES="default" ARG CARGO_FEATURES="default,http3"
# Build the binary # Build the binary
RUN --mount=type=cache,target=/usr/local/cargo/registry \ RUN --mount=type=cache,target=/usr/local/cargo/registry \
+1 -1
View File
@@ -18,7 +18,7 @@ RUN --mount=type=cache,target=/etc/apk/cache apk add \
# Developer tool versions # Developer tool versions
# renovate: datasource=github-releases depName=cargo-bins/cargo-binstall # renovate: datasource=github-releases depName=cargo-bins/cargo-binstall
ENV BINSTALL_VERSION=1.19.1 ENV BINSTALL_VERSION=1.18.1
# renovate: datasource=github-releases depName=psastras/sbom-rs # renovate: datasource=github-releases depName=psastras/sbom-rs
ENV CARGO_SBOM_VERSION=0.9.1 ENV CARGO_SBOM_VERSION=0.9.1
# renovate: datasource=crate depName=lddtree # renovate: datasource=crate depName=lddtree
-5
View File
@@ -8,11 +8,6 @@
"type": "file", "type": "file",
"name": "dns", "name": "dns",
"label": "DNS tuning (recommended)" "label": "DNS tuning (recommended)"
},
{
"type": "file",
"name": "performance",
"label": "Performance tuning"
} }
] ]
+7 -54
View File
@@ -50,6 +50,8 @@ services:
# CONTINUWUITY_WELL_KNOWN__SERVER: matrix.example.com:443 # CONTINUWUITY_WELL_KNOWN__SERVER: matrix.example.com:443
``` ```
## Reverse proxying well-known files to Continuwuity
After doing the steps above, Continuwuity will serve these 3 JSON files: After doing the steps above, Continuwuity will serve these 3 JSON files:
- `/.well-known/matrix/client`: for Client-Server discovery - `/.well-known/matrix/client`: for Client-Server discovery
@@ -58,11 +60,9 @@ After doing the steps above, Continuwuity will serve these 3 JSON files:
To enable full discovery, you will need to reverse proxy these paths from the base domain back to Continuwuity. To enable full discovery, you will need to reverse proxy these paths from the base domain back to Continuwuity.
## Reverse proxying well-known files to Continuwuity
<details> <details>
<summary>For **Caddy**</summary> <summary>For Caddy</summary>
``` ```
matrix.example.com:443 { matrix.example.com:443 {
@@ -78,7 +78,7 @@ example.com:443 {
<details> <details>
<summary>For **Traefik** (via Docker labels)</summary> <summary>For Traefik (via Docker labels)</summary>
``` ```
services: services:
@@ -93,10 +93,7 @@ services:
</details> </details>
Restart Continuwuity and your reverse proxy. Once that's done, visit these routes and check that the responses match the examples below:
For **Docker** users, consult the compose files in the [Appendix section](#docker-compose-examples).
After applying these changes, restart Continuwuity and your reverse proxy.Visit these routes and check that the responses match the examples below:
<details open> <details open>
@@ -156,11 +153,9 @@ Remember to set the `Access-Control-Allow-Origin: *` header in your `/.well-know
## Troubleshooting ## Troubleshooting
Check that other servers can connect to you. Check with the [Matrix Connectivity Tester][federation-tester] to see that it's working.
Here are some tools that can help identify federation issues:
- [Matrix Connectivity Tester](https://federationtester.mtrnord.blog/) [federation-tester]: https://federationtester.mtrnord.blog/
- [Matrix Federation Tester](https://federationtester.matrix.org/)
### Cannot log in with web clients ### Cannot log in with web clients
@@ -258,45 +253,3 @@ See the following Matrix Specs for full details on client/server resolution mech
- [Server-to-Server resolution](https://spec.matrix.org/v1.17/server-server-api/#resolving-server-names) (see this for more information on SRV records) - [Server-to-Server resolution](https://spec.matrix.org/v1.17/server-server-api/#resolving-server-names) (see this for more information on SRV records)
- [Client-to-Server resolution](https://spec.matrix.org/v1.17/client-server-api/#server-discovery) - [Client-to-Server resolution](https://spec.matrix.org/v1.17/client-server-api/#server-discovery)
- [MSC1929: Homeserver Admin Contact and Support page](https://github.com/matrix-org/matrix-spec-proposals/pull/1929) - [MSC1929: Homeserver Admin Contact and Support page](https://github.com/matrix-org/matrix-spec-proposals/pull/1929)
## Appendix
### Docker Compose examples
The following Compose files are taken from [Docker instructions](../deploying/docker.mdx) and reconfigured to support split-domain delegation. Note the updated `CONTINUWUITY_WELL_KNOWN` variable and relevant changes in reverse proxy rules.
<details>
<summary>Caddy (using Caddyfile) - delegated.docker-compose.with-caddy.yml ([view raw](/advanced/delegated.docker-compose.with-caddy.yml))</summary>
```yaml file="../public/advanced/delegated.docker-compose.with-caddy.yml"
```
</details>
<details>
<summary>Caddy (using labels) - delegated.docker-compose.with-caddy-labels.yml ([view raw](/advanced/delegated.docker-compose.with-caddy-labels.yml))</summary>
```yaml file="../public/advanced/delegated.docker-compose.with-caddy-labels.yml"
```
</details>
<details>
<summary>Traefik (for existing setup) - delegated.docker-compose.for-traefik.yml ([view raw](/advanced/delegated.docker-compose.for-traefik.yml))</summary>
```yaml file="../public/advanced/delegated.docker-compose.for-traefik.yml"
```
</details>
<details>
<summary>Traefik included - delegated.docker-compose.with-traefik.yml ([view raw](/advanced/delegated.docker-compose.with-traefik.yml))</summary>
```yaml file="../public/advanced/delegated.docker-compose.with-traefik.yml"
```
</details>
+9 -13
View File
@@ -74,11 +74,13 @@ Some values that are commonly tuned include:
- Increase `discard-timeout` to something like `4800` to wait longer for upstream resolvers, as recursion can take a long time to respond to some domains. Continuwuity default to `dns_timeout = 10` seconds, so dropping requests early would lead to unnecessary retries and/or failures. - Increase `discard-timeout` to something like `4800` to wait longer for upstream resolvers, as recursion can take a long time to respond to some domains. Continuwuity default to `dns_timeout = 10` seconds, so dropping requests early would lead to unnecessary retries and/or failures.
### Recursion versus forwarding ### Using a forwarder (optional)
Unbound by default employs **recursive resolution** and contacts many servers around the world. While this allows updated and authoritative answers and are generally viable for most users, sometimes these recursive queries can be too slow to fully resolve. As an alternative, you can consider **forwarding** your queries to public resolvers, and benefit from faster responses from their CDNs. Unbound by default employs **recursive resolution** and contacts many servers around the world. If this is not performant enough, consider forwarding your queries to public resolvers to benefit from their CDNs and get faster responses.
Do note that most popular upstreams (such as Google DNS or Quad9) employ IP ratelimiting, so a generous cache is still needed to avoid making too many queries. However, most popular upstreams (such as Google DNS or Quad9) employ IP ratelimiting, so a generous cache is still needed to avoid making too many queries.
DNS-over-TLS forwarders may also be used should you need on-the-wire encryption, but TLS overhead causes some speed penalties.
If you want to use forwarders, configure it as follows: If you want to use forwarders, configure it as follows:
@@ -97,8 +99,6 @@ forward-zone:
# forward-addr: 2606:4700:4700::1111@53 # forward-addr: 2606:4700:4700::1111@53
# alternatively, use DNS-over-TLS for forwarders. # alternatively, use DNS-over-TLS for forwarders.
# this will encrypt traffic between you and the forwarder,
# but takes more time due to TLS overhead.
# forward-zone: # forward-zone:
# name: "." # name: "."
# forward-tls-upstream: yes # forward-tls-upstream: yes
@@ -133,11 +133,9 @@ However, `dnsmasq` does not support TCP fallback which can be problematic when r
[arch-linux-dnsmasq]: https://wiki.archlinux.org/title/Dnsmasq [arch-linux-dnsmasq]: https://wiki.archlinux.org/title/Dnsmasq
### Technitium DNS ### Technitium
[Technitium DNS Server][technitium] supports recursion as well as a myriad of forwarding protocols, allows saving cache to disk natively, and does work well with Continuwuity. Its out-of-the-box configs however ratelimits single-IP requests by a lot, and hence must be changed. [Technitium][technitium] supports recursion as well as a myriad of forwarding protocols, allows saving cache to disk natively, and does work well with Continuwuity. Its default configurations however ratelimits single-IP requests by a lot, and hence must be changed. You may consult this [community guide][technitium-continuwuity] for more details on setting up a dedicated Technitium for Continuwuity.
You may consult this [community guide][technitium-continuwuity] for more details on setting up and fine-tuning a dedicated Technitium instance for Continuwuity.
[technitium]: https://github.com/TechnitiumSoftware/DnsServer [technitium]: https://github.com/TechnitiumSoftware/DnsServer
[technitium-continuwuity]: https://muoi.me/~stratself/articles/technitium-continuwuity/ [technitium-continuwuity]: https://muoi.me/~stratself/articles/technitium-continuwuity/
@@ -152,13 +150,11 @@ Note that it is expected that not all servers will be resolved, as some of them
## Further steps ## Further steps
It is recommended to set **`dns_cache_entries = 0`** inside Continuwuity to fully rely on the external resolver. While Continuwuity does have an internal cache, it can run into reliability issues if you're federating with many domains. - (Recommended) Set **`dns_cache_entries = 0`** inside Continuwuity and fully rely on the more performant external resolver.
Additionally, you can also make the following improvements:
- Consider employing **persistent cache to disk**, so your resolver can still run without hassle after a restart. Unbound, via [Cache DB module][unbound-cachedb], can use Redis as a storage backend for this feature. - Consider employing **persistent cache to disk**, so your resolver can still run without hassle after a restart. Unbound, via [Cache DB module][unbound-cachedb], can use Redis as a storage backend for this feature.
- Consider [enabling **Serve Stale**][unbound-serve-stale] functionality to serve expired data beyond DNS TTLs. Since most Matrix homeservers have static IPs, this should still allow federating with them when upstream resolvers have timed out. For dnsproxy, this corresponds to its [optimistic caching options][dnsproxy-usage]. - Consider [enabling **Serve Stale**][unbound-serve-stale] functionality to serve expired data beyond DNS TTLs. Since most Matrix homeservers have static IPs, this should help improve federation with them especially when upstream resolvers have timed out. For dnsproxy, this corresponds to its [optimistic caching options][dnsproxy-usage].
- If you still experience DNS performance issues, another step could be to **disable DNSSEC** (which is computationally expensive) at a cost of slightly decreased security. On Unbound this is done by commenting out `trust-anchors` config options and removing the `validator` module. - If you still experience DNS performance issues, another step could be to **disable DNSSEC** (which is computationally expensive) at a cost of slightly decreased security. On Unbound this is done by commenting out `trust-anchors` config options and removing the `validator` module.
-135
View File
@@ -1,135 +0,0 @@
# Performance tuning
Continuwuity's default configs are suited for many typical setups and scales appropriately with the size of your hardware. However, there are many scenarios where additional modifications can be made to better utilize your server resources.
This page aims to outline various performance tweaks for Continuwuity and their effects. These adjustments are especially helpful for homeservers that join many large federated rooms or have many users, and it will become increasingly necessary as the Matrix network expands. As always, your mileage may vary according to your setup's specifics. If you have further discussions or recommendations, please share them in the community rooms.
## DNS tuning (recommended)
Please see the dedicated [DNS tuning guide](./dns.mdx).
## Cache capacities
If you have memory to spare, consider increasing the `cache_capacity_modifier` value to a larger number to allow more data to be stored in hot memory. This *significantly* speeds up many intensive operations (such as state resolutions) and decreases CPU usage and disk I/O. Start with a baseline of `cache_capacity_modifier = 2.0` and tune up until you are satisfied with RAM usage.
On the other hand, if your system doesn't have a lot of RAM, consider decreasing the cache capacity modifier to something smaller than `1.0` to avoid low-memory issues (at the cost of higher load on disk/CPU). This recommendation also works if your system has abnormally little RAM compared to the number of CPU cores (for example, 2GB RAM for 12 cores), as cache capacities scale according to number of available cores.
## Disabling some features
You can disable outgoing **typing notifications** and **read markers** to reduce strain on the CPU and network when actively participating in rooms.
```toml
# disables sending read receipts
allow_outgoing_read_receipts = false
# disables sending typing notifications
allow_outgoing_typing = false
```
Outgoing presence updates are also considered very expensive and have been disabled by default (`allow_outgoing_presence = false`). For more savings, you may wish to disable _all_ processing of presence entirely.
```toml title=continuwuity.toml
# disabling presence updates entirely
allow_local_presence = false
allow_incoming_presence = false
allow_outgoing_presence = false
```
## Tuning database compression
:::warning
These steps SHOULD be done **before** starting Continuwuity for the first time. While switching database compression midway through is theoretically possible, this has not been tested extensively in the wild.
:::
### Changing the compression algorithm
For reduced CPU usage at a tradeoff of increased storage space, consider deploying Continuwuity with the faster and less intensive `lz4` algorithm instead of `zstd` for rocksdb, and disable WAL compression entirely:
```toml
### in continuwuity.toml ###
rocksdb_compression_algo = "lz4"
rocksdb_wal_compression = "none"
```
This tweak can especially be helpful if you have an older or less performant CPU (e.g. a Raspberry Pi) and disk space to spare.
### Increasing bottommost layer compression (`zstd` only)
The bottommost layer of the database usually contains old and read-only data, so it is a suitable place for further compression. In Continuwuity, this is possible by setting `rocksdb_bottommost_compression = true` and tuning `rocksdb_bottommost_compression_level` to a more compact level than the default one used in `rocksdb_compression_level`. This tweak comes at a cost of increased CPU usage, but may prevent your database from growing too large in the long run.
For those using `zstd` compression, the compression level ranges from 1 to 22. An example like this could apply:
```toml
### in continuwuity.toml ###
rocksdb_compression_algo = "zstd"
rocksdb_compression_level = 32767 # magic number, translates to level 3 on zstd
rocksdb_bottommost_compression = true
rocksdb_bottommost_compression_level = 9 # level 9 on zstd
```
For `lz4` users, the default level (`-1`) is already the most compact. You can only further decrease it to favor compression speed over ratio.
Consult these documents for more information on compression tuning and levels:
- [Rocksdb compression documentation][rocksdb-compression]
- [Rocksdb default compression levels][rocksdb-compression-defaults]
- [Zstd manual][zstd-manual]
- [Lz4 manual][lz4-manual]
[rocksdb-compression]: https://github.com/facebook/rocksdb/wiki/Compression
[rocksdb-compression-defaults]: https://github.com/facebook/rocksdb/blob/main/include/rocksdb/options.h#L208-L217
[zstd-manual]: https://facebook.github.io/zstd/zstd_manual.html
[lz4-manual]: https://github.com/lz4/lz4/blob/release/doc/lz4_manual.html
## Other tweaks
### Using UNIX sockets
If your homeserver and reverse proxy live on the same machine, you may wish to expose Continuwuity on a UNIX socket instead of a port. This removes TCP overhead between the two programs.
<details>
<summary>Example config with Caddy</summary>
```toml
### in continuwuity.toml ###
# `address` and `port` has to be commented out first
#address = ["127.0.0.1", "::1"]
#port = 8008
unix_socket_path = "/run/continuwuity/continuwuity.sock"
```
```
### in your Caddyfile ###
https://matrix.example.com {
reverse_proxy unix//run/continuwuity/continuwuity.sock
# alternatively, use the http2-plaintext protocol
# reverse_proxy unix+h2c//run/continuwuity/continuwuity.sock
}
```
</details>
### Tuning your trusted servers
:::info Vet your trusted servers!
Trusted servers are your first point of contact when obtaining public keys from other servers, and they could theoretically impersonate other servers and cause significant harm to your deployment. Please thoroughly verify your trusted servers' credibility before adding them to your configuration.
:::
Trusted servers are queried sequentially in the order they are listed. If you have multiple trusted servers configured, put the faster ones first:
```toml
# Example config, using maintainers' recommended homeservers
trusted_servers = ["codestorm.net","starstruck.systems","unredacted.org","matrix.org"]
```
Avoid prioritising `matrix.org` as your primary trusted server, as it tends to be quite slow.
Some users have also reported that increasing `trusted_server_batch_size` has helped with faster joins for huge rooms. Start with doubling the default to `2048` until you find a suitable value.
### Enable HTTP/3 on your reverse proxy
Consider enabling the newer **HTTP/3** protocol for inbound connections to Continuwuity. In Caddy HTTP/3 is allowed by default, but you must expose port :443/**udp** on your firewall.
HTTP/3 can vastly improve Client-Server connections especially on unstable networks, as it reduces packet losses and latency from TCP head-of-line blocking, includes workarounds for network switching, and reduces connection establishment handshakes. Continuwuity also includes experimental _outbound_ HTTP/3 support in its Docker images, so connections between Continuwuity servers can benefit from this too.
+21 -53
View File
@@ -25,9 +25,9 @@ You must generate a key and secret to allow the Matrix service to authenticate w
:::tip Generating the secrets :::tip Generating the secrets
LiveKit provides a utility to generate secure random keys LiveKit provides a utility to generate secure random keys
```bash ```bash
docker run --rm livekit/livekit-server:latest generate-keys ~$ docker run --rm livekit/livekit-server:latest generate-keys
# API Key: APIUxUnMnSkuFWV API Key: APIUxUnMnSkuFWV
# API Secret: t93ZVjPeoEdyx7Wbet3kG4L3NGZIZVEFvqe0UuiVc22A API Secret: t93ZVjPeoEdyx7Wbet3kG4L3NGZIZVEFvqe0UuiVc22A
``` ```
::: :::
@@ -91,7 +91,7 @@ You will need to allow ports `7881/tcp` and `50100:50200/udp` through your firew
To tell clients where to find LiveKit, you need to add the address of your `lk-jwt-service` to the `[global.matrix_rtc]` config section using the `foci` option. To tell clients where to find LiveKit, you need to add the address of your `lk-jwt-service` to the `[global.matrix_rtc]` config section using the `foci` option.
The variable should be a list of servers serving as MatrixRTC endpoints. Replace the URL with the address you are deploying your instance of lk-jwt-service to: The variable should be a list of servers serving as MatrixRTC endpoints. Clients discover these via the `/_matrix/client/v1/rtc/transports` endpoint (MSC4143).
```toml ```toml
[global.matrix_rtc] [global.matrix_rtc]
@@ -100,10 +100,7 @@ foci = [
] ]
``` ```
This will expose LiveKit information on the following endpoints for clients to discover: Remember to replace the URL with the address you are deploying your instance of lk-jwt-service to.
- `/_matrix/client/unstable/org.matrix.msc4143/rtc/transports` (MSC4143 unstable, behind auth)
- `/.well-known/matrix/client` (fallback, not behind auth. Only enabled if `[global.well_known].client` is set)
### 4. Configure your Reverse Proxy ### 4. Configure your Reverse Proxy
@@ -117,7 +114,6 @@ All paths should be forwarded to LiveKit by default, with the exception of the f
<details> <details>
<summary>Example caddy config</summary> <summary>Example caddy config</summary>
``` ```
livekit.example.com { livekit.example.com {
@@ -131,12 +127,10 @@ All paths should be forwarded to LiveKit by default, with the exception of the f
reverse_proxy 127.0.0.1:7880 reverse_proxy 127.0.0.1:7880
} }
``` ```
</details> </details>
<details> <details>
<summary>Example nginx config</summary> <summary>Example nginx config</summary>
``` ```
server { server {
server_name livekit.example.com; server_name livekit.example.com;
@@ -173,19 +167,16 @@ All paths should be forwarded to LiveKit by default, with the exception of the f
'' close; '' close;
} }
``` ```
</details> </details>
<details> <details>
<summary>Example traefik router</summary> <summary>Example traefik router</summary>
``` ```
# on LiveKit itself # on LiveKit itself
traefik.http.routers.livekit.rule=Host(`livekit.example.com`) traefik.http.routers.livekit.rule=Host(`livekit.example.com`)
# on the JWT service # on the JWT service
traefik.http.routers.livekit-jwt.rule=Host(`livekit.example.com`) && (PathPrefix(`/sfu/get`) || PathPrefix(`/healthz`) || PathPrefix(`/get_token`)) traefik.http.routers.livekit-jwt.rule=Host(`livekit.example.com`) && (PathPrefix(`/sfu/get`) || PathPrefix(`/healthz`) || PathPrefix(`/get_token`))
``` ```
</details> </details>
@@ -219,7 +210,7 @@ ports:
### if you're using `network_mode: host`, you can skip this part ### if you're using `network_mode: host`, you can skip this part
``` ```
Recreate the LiveKit container (with `docker-compose up -d livekit`) to apply these changes. Remember to allow the new `3478/udp` and `50300:50400/udp` ports through your firewall. Recreate the LiveKit container (with `docker-compose up -d livekit`) to apply these changes. Remember to allow the new `3478/udp` and `50100:50200/udp` ports through your firewall.
### Integration with an external TURN server ### Integration with an external TURN server
@@ -262,29 +253,15 @@ Restart LiveKit and coturn to apply these changes.
## Testing ## Testing
To test that LiveKit is successfully integrated with Continuwuity, you will need to replicate its [Token Exchange Flow](https://github.com/element-hq/lk-jwt-service#%EF%B8%8F-how-it-works--token-exchange-flow). Follow the steps below while checking Docker logs (`docker-compose logs --follow`), in order to help [troubleshooting](#troubleshooting) any issues. To test that LiveKit is successfully integrated with Continuwuity, you will need to replicate its [Token Exchange Flow](https://github.com/element-hq/lk-jwt-service#%EF%B8%8F-how-it-works--token-exchange-flow).
First, you will need an access token for your current login session. These can be found in your client's settings or obtained via [this website](https://timedout.uk/mxtoken.html). First, you will need an access token for your current login session. These can be found in your client's settings or obtained via [this website](https://timedout.uk/mxtoken.html).
Then, using that token, fetch the discovery endpoints for MatrixRTC services: Then, using that token, request another OpenID token for use with the lk-jwt-service:
```bash ```bash
curl -H "Authorization: Bearer <session-access-token>" \ ~$ curl -X POST -H "Authorization: Bearer <session-access-token>" \
https://matrix.example.com/_matrix/client/unstable/org.matrix.msc4143/rtc/transports
```
In the output, you should see the LiveKit URL matching the one [configured above](#3-telling-clients-where-to-find-livekit).
With the same token, request another OpenID token for use with the lk-jwt-service:
```bash
curl -X POST -H "Authorization: Bearer <session-access-token>" \
https://matrix.example.com/_matrix/client/v3/user/@user:example.com/openid/request_token https://matrix.example.com/_matrix/client/v3/user/@user:example.com/openid/request_token
```
You will see a response as below:
```json
{"access_token":"<openid_access_token>","token_type":"Bearer","matrix_server_name":"example.com","expires_in":3600} {"access_token":"<openid_access_token>","token_type":"Bearer","matrix_server_name":"example.com","expires_in":3600}
``` ```
@@ -318,44 +295,30 @@ Replace `matrix_server_name` and `claimed_user_id` with your information, and `<
You can then send this payload to the lk-jwt-service: You can then send this payload to the lk-jwt-service:
```bash ```bash
curl -X POST -d @payload.json https://livekit.example.com/get_token ~$ curl -X POST -d @payload.json https://livekit.example.com/get_token
```
The lk-jwt-service will, after checking against Continuwuity, answer with a `jwt` token to create a LiveKit media room:
```json
{"url":"wss://livekit.example.com","jwt":"a_really_really_long_string"} {"url":"wss://livekit.example.com","jwt":"a_really_really_long_string"}
``` ```
Use this token to test at the [LiveKit Connection Tester](https://livekit.io/connection-test). If everything works there, then you have set up LiveKit successfully! The lk-jwt-service will, after checking against Continuwuity, answer with a `jwt` token to create a LiveKit media room. Use this token to test at the [LiveKit Connection Tester](https://livekit.io/connection-test). If everything works there, then you have set up LiveKit successfully!
## Troubleshooting ## Troubleshooting
To debug any issues, you can place a call or redo the Testing instructions, and check the container logs for any specific errors. Use `docker-compose logs --follow` to follow these logs in real-time. To debug any issues, you can place a call or redo the Testing instructions, and check the container logs for any specific errors. Use `docker-compose logs --follow` to follow them in real-time.
### Common errors in Element Call UI ### Common errors in Element Call UI
- `MISSING_MATRIX_RTC_FOCUS`: LiveKit is missing from Continuwuity's config file - `MISSING_MATRIX_RTC_FOCUS`: LiveKit is missing from Continuwuity's config file
- "Waiting for media" popup always showing: a LiveKit URL has been configured in Continuwuity, but your client cannot connect to it for some reason - "Waiting for media" popup always showing: a LiveKit URL has been configured in Continuwuity, but your client cannot connect to it for some reason
For browser-based clients, you can also inspect connections using DevTools' Networking tab, to see which requests are erroring out.
### Docker loopback networking issues ### Docker loopback networking issues
Some distros do not allow Docker containers to connect to its host's public IP by default. This would cause `lk-jwt-service` to fail connecting to `livekit` or `continuwuity` on the same host. As a result, you would see connection refused/connection timeouts log entries in the JWT service, even when `LIVEKIT_URL` has been configured correctly. Some distros do not allow Docker containers to connect to its host's public IP by default. This would cause `lk-jwt-service` to fail connecting to `livekit` or `continuwuity` on the same host. As a result, you would see connection refused/connection timeouts log entries in the JWT service, even when `LIVEKIT_URL` has been configured correctly.
You can also test that this is the case by cURLing from a sidecar container:
```bash
docker run --rm --net container:lk-jwt-service docker.io/curlimages/curl https://livekit.example.com
# --- some errors ---
```
To alleviate this, you can try one of the following workarounds: To alleviate this, you can try one of the following workarounds:
- Use `network_mode: host` for the `lk-jwt-service` container (instead of the default bridge networking). - Use `network_mode: host` for the `lk-jwt-service` container (instead of the default bridge networking).
- Add an `extra_hosts` file mapping livekit's (and continuwuity's) domain name to a locally-reachable address: - Add an `extra_hosts` file mapping livekit's (and continuwuity's) domain name to a localhost address:
```diff ```diff
# in docker-compose.yaml # in docker-compose.yaml
@@ -369,7 +332,12 @@ To alleviate this, you can try one of the following workarounds:
- (**untested, use at your own risk**) Implement an iptables workaround as shown [here](https://forums.docker.com/t/unable-to-connect-to-host-service-from-inside-docker-container/145749/6). - (**untested, use at your own risk**) Implement an iptables workaround as shown [here](https://forums.docker.com/t/unable-to-connect-to-host-service-from-inside-docker-container/145749/6).
After implementing the changes and restarting your compose, `lk-jwt-service` should now connect to your other services. The sidecar container test above should now return an `OK` from LiveKit. After implementing the changes and restarting your compose, you can test whether the connection works by cURLing from a sidecar container:
```bash
~$ docker run --rm --net container:lk-jwt-service docker.io/curlimages/curl https://livekit.example.com
OK
```
### Workaround for non-federating servers ### Workaround for non-federating servers
@@ -395,8 +363,8 @@ Guides:
Specifications: Specifications:
- [MSC4143 - MatrixRTC proposal](https://github.com/matrix-org/matrix-spec-proposals/pull/4143) - [MatrixRTC proposal](https://github.com/matrix-org/matrix-spec-proposals/pull/4143)
- [MSC4195 - LiveKit proposal](https://github.com/matrix-org/matrix-spec-proposals/pull/4195) - [LiveKit proposal](https://github.com/matrix-org/matrix-spec-proposals/pull/4195)
Source code: Source code:
-5
View File
@@ -34,11 +34,6 @@
"name": "kubernetes", "name": "kubernetes",
"label": "Kubernetes" "label": "Kubernetes"
}, },
{
"type": "file",
"name": "nomad",
"label": "Nomad"
},
{ {
"type": "file", "type": "file",
"name": "freebsd", "name": "freebsd",
+9 -33
View File
@@ -148,7 +148,7 @@ Consult the [**DNS tuning guide (recommended)**](../advanced/dns.mdx) for full s
</details> </details>
See the [Other reverse proxies](generic.mdx#setting-up-the-reverse-proxy) section of the Generic page for further routing details. You will then need to point your reverse proxy towards Continuwuity at `127.0.0.1:8008`. See the [Other reverse proxies](generic.mdx#setting-up-the-reverse-proxy) section of the Generic page for further routing details.
### Starting Your Server ### Starting Your Server
@@ -185,15 +185,13 @@ See the [generic deployment guide](generic.mdx) for more deployment options.
Test that your setup works by following these [instructions](./generic.mdx#how-do-i-know-it-works) Test that your setup works by following these [instructions](./generic.mdx#how-do-i-know-it-works)
Check your container logs using `docker-compose logs --follow` to debug any issues. See the [Troubleshooting](../troubleshooting.mdx) page for common errors and how to fix them.
## Other deployment methods ## Other deployment methods
### Docker - Quick Run ### Docker - Quick Run
:::warning For testing only :::note For testing only
The instructions below are only meant for a quick demo of Continuwuity with **federation disabled**. The instructions below are only meant for a quick demo of Continuwuity.
For production deployment, we recommend using [Docker Compose](#docker-compose). For production deployment, we recommend using [Docker Compose](#docker-compose)
::: :::
Get a working Continuwuity server with an admin user in four steps: Get a working Continuwuity server with an admin user in four steps:
@@ -213,7 +211,7 @@ Get a working Continuwuity server with an admin user in four steps:
-e CONTINUWUITY_SERVER_NAME="example.com" \ -e CONTINUWUITY_SERVER_NAME="example.com" \
-e CONTINUWUITY_DATABASE_PATH="/var/lib/continuwuity" \ -e CONTINUWUITY_DATABASE_PATH="/var/lib/continuwuity" \
-e CONTINUWUITY_ADDRESS="0.0.0.0" \ -e CONTINUWUITY_ADDRESS="0.0.0.0" \
-e CONTINUWUITY_ALLOW_FEDERATION="false" \ -e CONTINUWUITY_ALLOW_REGISTRATION="false" \
--name continuwuity \ --name continuwuity \
forgejo.ellis.link/continuwuation/continuwuity:latest \ forgejo.ellis.link/continuwuation/continuwuity:latest \
/sbin/conduwuit /sbin/conduwuit
@@ -235,9 +233,9 @@ Get a working Continuwuity server with an admin user in four steps:
Pick your own username and password! Pick your own username and password!
``` ```
4. Configure your reverse proxy to forward HTTPS traffic to Continuwuity at port 8008. See [Docker Compose](#docker-compose) or the [Generic instructions](./generic.mdx#setting-up-the-reverse-proxy) for examples. 4. Configure your reverse proxy to forward HTTPS traffic to Continuwuity at port 8008. See [Docker Compose](#docker-compose) for examples.
Once configured, log in to your server with any Matrix client, and register for an account with the registration token from step 3. If you did not configure step 4., log in via the `http://<your_server_ip>:8008` address. You will be automatically invited to the admin room where you can [manage your server](../reference/admin). Once configured, log in to your server with any Matrix client, and register for an account with the registration token from step 3. You'll automatically be invited to the admin room where you can [manage your server](../reference/admin).
### (Optional) Building Custom Images ### (Optional) Building Custom Images
@@ -245,31 +243,9 @@ For information on building your own Continuwuity Docker images, see the
[Building Docker Images](../development/index.mdx#building-docker-images) [Building Docker Images](../development/index.mdx#building-docker-images)
section in the development documentation. section in the development documentation.
### Accessing the Server's Console
Before you can access the server's console and [send admin commands](../reference/admin/index.md) from the CLI, you will need to make the container interactive and allocate a pseudo-tty. Make sure you set `admin_console_automatic` to `true` in [the config](../reference/config.mdx) as well for Continuwuity to activate the CLI on startup.
For Docker Compose deployments this means adding `stdin_open: true` and `tty: true` to the container's declaration:
```yaml
services:
homeserver:
stdin_open: true
tty: true
# ...
```
If you choose to deploy via `docker run`, add the flags `-i`/`--interactive` and `-t`/`--tty` to the command.
From there you can access the server's console by running `docker attach <container-name>`, which will show the server's prompt `uwu> `. To exit `docker attach`, press `CTRL+p` then `CTRL+q`.
Note that using `CTRL+c` within `docker attach`'s context will forward the signal to the server, stopping it. See [Docker's reference][docker-attach-reference] for more information.
[docker-attach-reference]: https://docs.docker.com/reference/cli/docker/container/attach/
## Next steps ## Next steps
- For smooth federation, set up a caching resolver according to the [**DNS tuning guide**](../advanced/dns.mdx) (recommended) - For smooth federation, set up a caching resolver according to the [**DNS tuning guide**](../advanced/dns.mdx) (recommended)
- To set up Audio/Video communication, see the [**Calls**](../calls.mdx) page. - To set up Audio/Video communication, see the [**Calls**](../calls.mdx) page.
- Consult the [Maintenance](../maintenance.mdx) page for guidance on maintaining your homeserver. - If you want to set up an appservice, take a look at the [**Appservice
- If you want to set up an appservice, take a look at the [**Appservice Guide**](../appservices.mdx). Guide**](../appservices.mdx).
+99 -104
View File
@@ -1,12 +1,10 @@
# Generic deployment documentation # Generic deployment documentation
:::tip Getting help > ### Getting help
If you run into any problems while setting up Continuwuity, ask us in >
`#continuwuity:continuwuity.org` or [open an issue on > If you run into any problems while setting up Continuwuity, ask us in
Forgejo][forgejo-new-issue]. > `#continuwuity:continuwuity.org` or [open an issue on
::: > Forgejo](https://forgejo.ellis.link/continuwuation/continuwuity/issues/new).
[forgejo-new-issue]: https://forgejo.ellis.link/continuwuation/continuwuity/issues/new
## Installing Continuwuity ## Installing Continuwuity
@@ -17,16 +15,17 @@ run the `uname -m` to check which you need.
Prebuilt binaries are available from: Prebuilt binaries are available from:
- **Tagged releases**: [see Release page][release-page] - **Tagged releases**: [Latest release page](https://forgejo.ellis.link/continuwuation/continuwuity/releases/latest)
- **Development builds**: CI artifacts from the `main` branch, - **Development builds**: CI artifacts from the `main` branch
[see `release-image.yml` for details][release-image] (includes Debian/Ubuntu packages)
When browsing CI artifacts, `ci-bins` contains binaries organised
by commit hash, while `releases` contains tagged versions. Sort
by last modified date to find the most recent builds.
The binaries require jemalloc and io_uring on the host system. Currently The binaries require jemalloc and io_uring on the host system. Currently
we can't cross-build static binaries - contributions are welcome here. we can't cross-build static binaries - contributions are welcome here.
[release-page]: https://forgejo.ellis.link/continuwuation/continuwuity/releases/
[release-image]: https://forgejo.ellis.link/continuwuation/continuwuity/actions/?workflow=release-image.yml
#### Performance-optimised builds #### Performance-optimised builds
For x86_64 systems with CPUs from the last ~15 years, use the For x86_64 systems with CPUs from the last ~15 years, use the
@@ -39,12 +38,11 @@ compatibility and speed.
If you're using Docker instead, equivalent performance-optimised If you're using Docker instead, equivalent performance-optimised
images are available with the `-maxperf` suffix (e.g. images are available with the `-maxperf` suffix (e.g.
`forgejo.ellis.link/continuwuation/continuwuity:latest-maxperf`). `forgejo.ellis.link/continuwuation/continuwuity:latest-maxperf`).
These images use the `release-max-perf` build profile with These images use the `release-max-perf`
[link-time optimisation (LTO)][lto-rust-docs] build profile with
[link-time optimisation (LTO)](https://doc.rust-lang.org/cargo/reference/profiles.html#lto)
and, for amd64, target the haswell CPU architecture. and, for amd64, target the haswell CPU architecture.
[lto-rust-docs]: https://doc.rust-lang.org/cargo/reference/profiles.html#lto
### Nix ### Nix
Theres a Nix package defined in our flake, available for Linux and MacOS. Add continuwuity as an input to your flake, and use `inputs.continuwuity.packages.${system}.default` to get a working Continuwuity package. Theres a Nix package defined in our flake, available for Linux and MacOS. Add continuwuity as an input to your flake, and use `inputs.continuwuity.packages.${system}.default` to get a working Continuwuity package.
@@ -57,8 +55,7 @@ Alternatively, you may compile the binary yourself.
#### Using Docker #### Using Docker
See the [Building Docker Images](../development/index.mdx#building-docker-images) If you would like to build using docker, you can run the command `docker build -f ./docker/Dockerfile -t forgejo.ellis.link/continuwuation/continuwuity:main .` to compile continuwuity.
section in the development documentation.
#### Manual #### Manual
@@ -72,7 +69,7 @@ section in the development documentation.
##### Build ##### Build
You can now build Continuwuity using `cargo build --release`. You can build Continuwuity using `cargo build --release`.
Continuwuity supports various optional features that can be enabled during compilation. Please see the Cargo.toml file for a comprehensive list, or ask in our rooms. Continuwuity supports various optional features that can be enabled during compilation. Please see the Cargo.toml file for a comprehensive list, or ask in our rooms.
@@ -94,6 +91,27 @@ For distros without `adduser` (or where it's a symlink to `useradd`):
sudo useradd -r --shell /usr/bin/nologin --no-create-home continuwuity sudo useradd -r --shell /usr/bin/nologin --no-create-home continuwuity
``` ```
## Forwarding ports in the firewall or the router
Matrix's default federation port is 8448, and clients must use port 443.
If you would like to use only port 443 or a different port, you will need to set up
delegation. Continuwuity has configuration options for delegation, or you can configure
your reverse proxy to manually serve the necessary JSON files for delegation
(see the `[global.well_known]` config section).
If Continuwuity runs behind a router or in a container and has a different public
IP address than the host system, you need to forward these public ports directly
or indirectly to the port mentioned in the configuration.
Note for NAT users: if you have trouble connecting to your server from inside
your network, check if your router supports "NAT
hairpinning" or "NAT loopback".
If your router does not support this feature, you need to research doing local
DNS overrides and force your Matrix DNS records to use your local IP internally.
This can be done at the host level using `/etc/hosts`. If you need this to be
on the network level, consider something like NextDNS or Pi-Hole.
## Setting up a systemd service ## Setting up a systemd service
You can find an example unit for continuwuity below. You can find an example unit for continuwuity below.
@@ -105,7 +123,7 @@ and OpenSUSE), put `$EscapeControlCharactersOnReceive off` inside
`/etc/rsyslog.conf` to allow color in logs. `/etc/rsyslog.conf` to allow color in logs.
If you are using a different `database_path` than the systemd unit's If you are using a different `database_path` than the systemd unit's
configured default (`/var/lib/conduwuit`), you need to add your path to the configured default `/var/lib/conduwuit`, you need to add your path to the
systemd unit's `ReadWritePaths=`. You can do this by either directly editing systemd unit's `ReadWritePaths=`. You can do this by either directly editing
`conduwuit.service` and reloading systemd, or by running `systemctl edit conduwuit.service` `conduwuit.service` and reloading systemd, or by running `systemctl edit conduwuit.service`
and entering the following: and entering the following:
@@ -126,9 +144,7 @@ ReadWritePaths=/path/to/custom/database/path
</details> </details>
You can also [view the file on Foregejo][systemd-file]. You can also [view the file on Foregejo](https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/pkg/conduwuit.service).
[systemd-file]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/pkg/conduwuit.service
## Creating the Continuwuity configuration file ## Creating the Continuwuity configuration file
@@ -139,7 +155,9 @@ Now you need to create the Continuwuity configuration file in
**Please take a moment to read the config. You need to change at least the **Please take a moment to read the config. You need to change at least the
server name.** server name.**
### Setting the correct file permissions RocksDB is the only supported database backend.
## Setting the correct file permissions
If you are using a dedicated user for Continuwuity, you need to allow it to If you are using a dedicated user for Continuwuity, you need to allow it to
read the configuration. To do this, run: read the configuration. To do this, run:
@@ -157,29 +175,22 @@ sudo chown -R continuwuity:continuwuity /var/lib/conduwuit/
sudo chmod 700 /var/lib/conduwuit/ sudo chmod 700 /var/lib/conduwuit/
``` ```
## Exposing ports in the firewall or the router
Matrix's default federation port is **:8448**, and clients use port **:443**. You will need to
expose these ports on your firewall or router. If you use UFW, the commands to allow them
are: `ufw allow 8448/tcp` and `ufw allow 443/tcp`.
:::tip Alternative port/domain setups
If you would like to use only port 443, a different port, or a subdomain for the homeserver, you will need to set up `.well-known` delegation. Consult the `[global.well_known]` section of the config file, and the [**Delegation/Split-domain**](../advanced/delegation) page to learn more about these kinds of deployments.
:::
## Setting up the Reverse Proxy ## Setting up the Reverse Proxy
We recommend Caddy as a reverse proxy because it is trivial to use and handles TLS certificates, reverse proxy headers, etc. transparently with proper defaults.
For other software, please refer to their respective documentation or online guides.
### Caddy ### Caddy
Caddy is the recommended reverse proxy as it is easy to use, has good defaults, After installing Caddy via your preferred method, create `/etc/caddy/conf.d/conduwuit_caddyfile`
and handle TLS certificates automatically. After installing Caddy via your preferred and enter the following (substitute your actual server name):
method, create `/etc/caddy/conf.d/conduwuit_caddyfile` and enter the following
(substitute `example.com` with your actual server name):
``` ```
example.com, example.com:8448 { your.server.name, your.server.name:8448 {
# TCP reverse_proxy # TCP reverse_proxy
reverse_proxy 127.0.0.1:8008 reverse_proxy 127.0.0.1:6167
# UNIX socket
#reverse_proxy unix//run/conduwuit/conduwuit.sock
} }
``` ```
@@ -191,45 +202,51 @@ sudo systemctl enable --now caddy
### Other Reverse Proxies ### Other Reverse Proxies
Normally, your reverse proxy should route everything from port :8448 and :443 back to Continuwuity. As we prefer our users to use Caddy, we do not provide configuration files for other proxies.
For more granular controls, you will need to proxy everything under these following routes: You will need to reverse proxy everything under the following routes:
- `/_matrix/` - core Matrix APIs, which includes: - `/_matrix/` - core Matrix C-S and S-S APIs
- `/_conduwuit/` and/or `/_continuwuity/` - ad-hoc Continuwuity routes such as `/local_user_count` and
- `/_matrix/federation` and `/_matrix/key` - core Server-Server APIs. These should be available on port :8448 `/server_version`
- `/_matrix/client` - core Client-Server APIs. These should be available on port :443
- `/_conduwuit/` and `/_continuwuity/` - ad-hoc Continuwuity routes for password resets, email verification, and server details such as `/local_user_count` and `/server_version`.
You can optionally reverse proxy the following individual routes: You can optionally reverse proxy the following individual routes:
- `/.well-known/matrix/client` and `/.well-known/matrix/server` if using - `/.well-known/matrix/client` and `/.well-known/matrix/server` if using
Continuwuity to perform delegation (see the `[global.well_known]` config section) Continuwuity to perform delegation (see the `[global.well_known]` config section)
- `/.well-known/matrix/support` if using Continuwuity to send the homeserver admin - `/.well-known/matrix/support` if using Continuwuity to send the homeserver admin
[contact and support page][well-known-support] contact and support page (formerly known as MSC1929)
- `/` and `/_continuwuity/logo.svg` if you would like to see the Continuwuity landing page - `/` if you would like to see `hewwo from conduwuit woof!` at the root
Refer to the respective software's documentation and online guides on how to do so. See the following spec pages for more details on these files:
[well-known-support]: https://spec.matrix.org/v1.18/client-server-api/#getwell-knownmatrixsupport - [`/.well-known/matrix/server`](https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixserver)
- [`/.well-known/matrix/client`](https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient)
- [`/.well-known/matrix/support`](https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixsupport)
#### Caveats for specific reverse proxies Examples of delegation:
- Lighttpd is not supported as it appears to interfere with the `X-Matrix` Authorization - https://continuwuity.org/.well-known/matrix/server
- https://continuwuity.org/.well-known/matrix/client
- https://ellis.link/.well-known/matrix/server
- https://ellis.link/.well-known/matrix/client
For Apache and Nginx there are many examples available online.
Lighttpd is not supported as it appears to interfere with the `X-Matrix` Authorization
header, making federation non-functional. If you find a workaround, please share it so we can add it to this documentation. header, making federation non-functional. If you find a workaround, please share it so we can add it to this documentation.
- If using Apache, you need to use `nocanon` in your `ProxyPass` directive to prevent httpd from interfering with the `X-Matrix` header (note that Apache is not ideal as a general reverse proxy, so we discourage using it if alternatives are available). If using Apache, you need to use `nocanon` in your `ProxyPass` directive to prevent httpd from interfering with the `X-Matrix` header (note that Apache is not ideal as a general reverse proxy, so we discourage using it if alternatives are available).
- If using Nginx, you need to pass the request URI to Continuwuity using `$request_uri`, like this: If using Nginx, you need to pass the request URI to Continuwuity using `$request_uri`, like this:
- `proxy_pass http://127.0.0.1:6167$request_uri;` - `proxy_pass http://127.0.0.1:6167$request_uri;`
- `proxy_pass http://127.0.0.1:6167;` - `proxy_pass http://127.0.0.1:6167;`
Furthermore, Nginx users need to increase the `client_max_body_size` setting (default is 1M) to match the `max_request_size` defined in conduwuit.toml. Nginx users need to increase the `client_max_body_size` setting (default is 1M) to match the
`max_request_size` defined in conduwuit.toml.
## Starting Your Server ## You're done
Now you can start Continuwuity with: Now you can start Continuwuity with:
@@ -243,58 +260,36 @@ Set it to start automatically when your system boots with:
sudo systemctl enable conduwuit sudo systemctl enable conduwuit
``` ```
Check Continuwuity logs with the following command:
```bash
sudo journalctl -u conduwuit.service
```
If Continuwuity has successfully initialized, you'll see output as below.
```
In order to use your new homeserver, you need to create its
first user account.
Open your Matrix client of choice and register an account
on example.com using registration token x5keUZ811RqvLsNa .
Pick your own username and password!
```
You can then open [a Matrix client][matrix-clients],
enter your homeserver address, and register with the provided token.
By default, the first user is the instance's first admin. They will be added
to the `#admin:example.com` room and be able to [issue admin commands](../reference/admin/index.md).
[matrix-clients]: https://matrix.org/ecosystem/clients
## How do I know it works? ## How do I know it works?
To check if your server can communicate with other homeservers, You can open [a Matrix client](https://matrix.org/ecosystem/clients), enter your
use an external testing tool: homeserver address, and try to register.
- [Matrix Connectivity Tester](https://federationtester.mtrnord.blog/) You can also use these commands as a quick health check (replace
- [Matrix Federation Tester](https://federationtester.matrix.org/) `your.server.name`).
If you can register your account but cannot join federated rooms, check your configuration
and verify that your federation endpoints are opened and forwarded correctly.
As a quick health check, you can also use these cURL commands:
```bash ```bash
curl https://example.com/_conduwuit/server_version curl https://your.server.name/_conduwuit/server_version
# If using port 8448 # If using port 8448
curl https://example.com:8448/_conduwuit/server_version curl https://your.server.name:8448/_conduwuit/server_version
# If federation is enabled # If federation is enabled
curl https://example.com:8448/_matrix/federation/v1/version curl https://your.server.name:8448/_matrix/federation/v1/version
# For client-server endpoints
curl https://example.com/_matrix/client/versions
``` ```
- To check if your server can communicate with other homeservers, use the
[Matrix Federation Tester](https://federationtester.mtrnord.blog/). If you can
register but cannot join federated rooms, check your configuration and verify
that port 8448 is open and forwarded correctly.
## What's next? ## What's next?
- For smooth federation, set up a caching resolver according to the [**DNS tuning guide**](../advanced/dns.mdx) (recommended) ### Audio/Video calls
- For Audio/Video call functionality see the [**Calls**](../calls.md) page.
- Consult the [Maintenance](../maintenance.mdx) page for guidance on maintaining your homeserver. For Audio/Video call functionality see the [Calls](../calls.md) page.
- If you want to set up an appservice, take a look at the [**Appservice Guide**](../appservices.md).
### Appservices
If you want to set up an appservice, take a look at the [Appservice
Guide](../appservices.md).
-118
View File
@@ -1,118 +0,0 @@
# Continuwuity for Nomad
You can either pass the configuration as environment variables or mount a file containing the configuration from consul.
This given configuration assumes that you have a traefik reverse proxy running.
## Persistence
The database being a RockDB file, it is recommended to use a volume to persist the data.
The example below uses a volume, you need to configure the CSI driver on your cluster.
| Volume Name | Mount Path | Purpose |
|-------------|------------|---------|
| continuwuity-volume | `/var/lib/continuwuity` | Store the database |
| continuwuity-media-volume | `/var/lib/continuwuity/media` | Store uploaded media |
## Configuration
### Using environment variables
```hcl
job "continuwuity" {
datacenters = ["dc1"]
type = "service"
node_pool = "default"
group "continuwuity" {
count = 1
network {
port "http" {
static = 6167
}
}
service {
name = "continuwuity"
port = "http"
tags = [
"traefik.enable=true",
"traefik.http.routers.continuwuity.rule=(Host(`matrix.example.com`) || (Host(`example.com`) && PathPrefix(`/.well-known/matrix`)))",
"traefik.http.routers.continuwuity.entrypoints=https",
"traefik.http.routers.continuwuity.tls=true",
"traefik.http.routers.continuwuity.tls.certresolver=letsencrypt",
"traefik.http.routers.continuwuity-http.rule=(Host(`matrix.example.com`) || (Host(`example.com`) && PathPrefix(`/.well-known/matrix`)))",
"traefik.http.routers.continuwuity-http.entrypoints=http",
"traefik.http.routers.continuwuity-http.middlewares=continuwuity-redirect",
"traefik.http.middlewares.continuwuity-redirect.redirectscheme.scheme=https",
"traefik.http.middlewares.continuwuity-redirect.redirectscheme.permanent=true",
]
}
volume "continuwuity-volume" {
type = "csi"
read_only = false
source = "continuwuity-volume"
attachment_mode = "file-system"
access_mode = "single-node-writer"
per_alloc = false
}
volume "continuwuity-media-volume" {
type = "csi"
read_only = false
source = "continuwuity-media-volume"
attachment_mode = "file-system"
access_mode = "single-node-writer"
per_alloc = false
mount_options {
mount_flags = []
}
}
task "continuwuity" {
driver = "docker"
env {
CONTINUWUITY_SERVER_NAME = "matrix.example.com"
CONTINUWUITY_TRUSTED_SERVERS = "[\"matrix.org\", \"mozilla.org\"]"
CONTINUWUITY_ALLOW_REGISTRATION = false
CONTINUWUITY_ADDRESS = "0.0.0.0"
CONTINUWUITY_PORT = 6167
CONTINUWUITY_DATABASE_PATH = "/var/lib/continuwuity"
CONTINUWUITY_WELL_KNOWN = <<EOF
{
client=https://matrix.example.com,
server=matrix.example.com:443
}
EOF
}
config {
image = "forgejo.ellis.link/continuwuation/continuwuity:latest"
ports = ["http"]
}
volume_mount {
volume = "continuwuity-volume"
destination = "/var/lib/continuwuity"
}
volume_mount {
volume = "continuwuity-media-volume"
destination = "/var/lib/continuwuity/media"
}
}
}
}
```
### Using consul
```hcl
...
template {
data = <<EOF
{{key "config/continuwuity"}}
EOF
destination = "local/conduwuit.toml"
}
...
```
+2
View File
@@ -81,6 +81,8 @@ changes.
All forked dependencies are maintained under the All forked dependencies are maintained under the
[continuwuation organization on Forgejo](https://forgejo.ellis.link/continuwuation): [continuwuation organization on Forgejo](https://forgejo.ellis.link/continuwuation):
- [ruwuma][continuwuation-ruwuma] - Fork of [ruma/ruma][ruma] with various
performance improvements, more features and better client/server interop
- [rocksdb][continuwuation-rocksdb] - Fork of [facebook/rocksdb][rocksdb] via - [rocksdb][continuwuation-rocksdb] - Fork of [facebook/rocksdb][rocksdb] via
[`@zaidoon1`][8] with liburing build fixes and GCC debug build fixes [`@zaidoon1`][8] with liburing build fixes and GCC debug build fixes
- [jemallocator][continuwuation-jemallocator] - Fork of - [jemallocator][continuwuation-jemallocator] - Fork of
@@ -6,10 +6,10 @@
"message": "Welcome to Continuwuity! Important announcements about the project will appear here." "message": "Welcome to Continuwuity! Important announcements about the project will appear here."
}, },
{ {
"id": 13, "id": 11,
"mention_room": true, "mention_room": false,
"date": "2026-05-08", "date": "2026-04-17",
"message": "[v0.5.9](https://forgejo.ellis.link/continuwuation/continuwuity/releases/tag/v0.5.9) has been released, fixing a few low-severity federation-related vulnerabilities. It is recommended you read the changelog and update as soon as possible. There are no new features or other changes in this release, only related bugfixes. Deployments tracking the main branch should also update to the latest commit." "message": "[v0.5.7](https://forgejo.ellis.link/continuwuation/continuwuity/releases/tag/v0.5.7) is out! Email verification! Terms and Conditions! Deleting notification pushers! So much good stuff. Go grab the release and read the changelog!"
} }
] ]
} }
@@ -1,43 +0,0 @@
# Continuwuity - Behind Traefik Reverse Proxy
services:
homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
networks:
- proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.continuwuity.rule=(Host(`matrix.example.com`) || (Host(`example.com`) && PathPrefix(`/.well-known/matrix`)))"
- "traefik.http.routers.continuwuity.entrypoints=websecure" # your HTTPS entry point
- "traefik.http.routers.continuwuity.tls=true"
- "traefik.http.routers.continuwuity.service=continuwuity"
- "traefik.http.services.continuwuity.loadbalancer.server.port=8008"
# possibly, depending on your config:
# - "traefik.http.routers.continuwuity.tls.certresolver=letsencrypt"
environment:
CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS
CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity
CONTINUWUITY_ADDRESS: 0.0.0.0
CONTINUWUITY_PORT: 8008 # This must match with traefik's loadbalancer label
#CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above
# Serve .well-known files to tell others to reach Continuwuity on port :443
CONTINUWUITY_WELL_KNOWN: |
{
client=https://matrix.example.com,
server=matrix.example.com:443
}
volumes:
db:
networks:
# This must match the network name that Traefik listens on
proxy:
external: true
@@ -1,54 +0,0 @@
# Continuwuity - With Caddy Labels
services:
caddy:
# This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity!
# For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy
image: "docker.io/lucaslorentz/caddy-docker-proxy:ci-alpine"
ports:
- 80:80
- 443:443
environment:
- CADDY_INGRESS_NETWORKS=caddy
networks:
- caddy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data:/data
restart: unless-stopped
labels:
caddy: example.com
caddy.reverse_proxy: /.well-known/matrix/* homeserver:8008
homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
environment:
CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS
CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity
CONTINUWUITY_ADDRESS: 0.0.0.0
CONTINUWUITY_PORT: 8008
#CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above
# Serve .well-known files to tell others to reach Continuwuity on port :443
CONTINUWUITY_WELL_KNOWN: |
{
client=https://matrix.example.com,
server=matrix.example.com:443
}
networks:
- caddy
labels:
caddy: matrix.example.com
caddy.reverse_proxy: "{{upstreams 8008}}"
volumes:
db:
networks:
caddy:
@@ -1,57 +0,0 @@
# Continuwuity - Using Caddy Docker Image
services:
caddy:
image: "docker.io/caddy:latest"
ports:
- 80:80
- 443:443
networks:
- caddy
volumes:
- ./data:/data
restart: unless-stopped
configs:
- source: Caddyfile
target: /etc/caddy/Caddyfile
homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
environment:
CONTINUWUITY_SERVER_NAME: example.com
CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity
CONTINUWUITY_ADDRESS: 0.0.0.0
CONTINUWUITY_PORT: 8008
#CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above
## Serve .well-known files to tell others to reach Continuwuity on port :443
CONTINUWUITY_WELL_KNOWN: |
{
client=https://matrix.example.com,
server=matrix.example.com:443
}
networks:
- caddy
networks:
caddy:
volumes:
db:
configs:
Caddyfile:
content: |
https://matrix.example.com:443 {
reverse_proxy http://homeserver:8008
}
https://example.com:443 {
reverse_proxy /.well-known/matrix* http://homeserver:8008
}
@@ -1,85 +0,0 @@
# Continuwuity - With Traefik Reverse Proxy
services:
homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest"
restart: unless-stopped
command: /sbin/conduwuit
volumes:
- db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
#- ./continuwuity.toml:/etc/continuwuity.toml
networks:
- proxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.continuwuity.rule=(Host(`matrix.example.com`) || (Host(`example.com`) && PathPrefix(`/.well-known/matrix`)))"
- "traefik.http.routers.continuwuity.entrypoints=websecure"
- "traefik.http.routers.continuwuity.tls.certresolver=letsencrypt"
- "traefik.http.services.continuwuity.loadbalancer.server.port=8008"
environment:
CONTINUWUITY_SERVER_NAME: example.com # EDIT THIS
CONTINUWUITY_DATABASE_PATH: /var/lib/continuwuity
CONTINUWUITY_ADDRESS: 0.0.0.0
CONTINUWUITY_PORT: 8008 # This must match with traefik's loadbalancer label
#CONTINUWUITY_CONFIG: '/etc/continuwuity.toml' # Uncomment if you mapped config toml above
# Serve .well-known files to tell others to reach Continuwuity on port :443
CONTINUWUITY_WELL_KNOWN: |
{
client=https://matrix.example.com,
server=matrix.example.com:443
}
traefik:
image: "docker.io/traefik:latest"
container_name: "traefik"
restart: "unless-stopped"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
- "acme:/etc/traefik/acme"
labels:
- "traefik.enable=true"
# middleware redirect
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
# global redirect to https
- "traefik.http.routers.redirs.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.redirs.entrypoints=web"
- "traefik.http.routers.redirs.middlewares=redirect-to-https"
environment:
TRAEFIK_LOG_LEVEL: DEBUG
TRAEFIK_ENTRYPOINTS_WEB: true
TRAEFIK_ENTRYPOINTS_WEB_ADDRESS: ":80"
TRAEFIK_ENTRYPOINTS_WEB_HTTP_REDIRECTIONS_ENTRYPOINT_TO: websecure
TRAEFIK_ENTRYPOINTS_WEBSECURE: true
TRAEFIK_ENTRYPOINTS_WEBSECURE_ADDRESS: ":443"
TRAEFIK_ENTRYPOINTS_WEBSECURE_HTTP_TLS_CERTRESOLVER: letsencrypt
TRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT: true
# CHANGE THIS to desired email for ACME
TRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_ACME_EMAIL: user@example.com
TRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_ACME_HTTPCHALLENGE: true
TRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_ACME_HTTPCHALLENGE_ENTRYPOINT: web
TRAEFIK_CERTIFICATESRESOLVERS_LETSENCRYPT_ACME_STORAGE: "/etc/traefik/acme/acme.json"
# Since Traefik 3.6.3, paths with certain "encoded characters" are now blocked by default; we need a couple, or else things *will* break
TRAEFIK_ENTRYPOINTS_WEBSECURE_HTTP_ENCODEDCHARACTERS_ALLOWENCODEDSLASH: true
TRAEFIK_ENTRYPOINTS_WEBSECURE_HTTP_ENCODEDCHARACTERS_ALLOWENCODEDHASH: true
TRAEFIK_PROVIDERS_DOCKER: true
TRAEFIK_PROVIDERS_DOCKER_ENDPOINT: "unix:///var/run/docker.sock"
TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT: false
volumes:
db:
acme:
networks:
proxy:
@@ -2,7 +2,7 @@
services: services:
homeserver: homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest" image: forgejo.ellis.link/continuwuation/continuwuity:latest
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
@@ -38,6 +38,7 @@ volumes:
db: db:
networks: networks:
# This must match the network name that Traefik listens on # This is the network Traefik listens to, if your network has a different
# name, don't forget to change it here and in the docker-compose.override.yml
proxy: proxy:
external: true external: true
@@ -1,10 +1,10 @@
# Continuwuity - Traefik Reverse Proxy Labels (override file) # Continuwuity - Traefik Reverse Proxy Labels
services: services:
homeserver: homeserver:
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.docker.network=proxy" # Change this to the name of your Traefik docker proxy network - "traefik.docker.network=proxy" # Change this to the name of your Traefik docker proxy network
- "traefik.http.routers.to-continuwuity.rule=Host(`example.com`)" # Change to the address on which Continuwuity is hosted - "traefik.http.routers.to-continuwuity.rule=Host(`example.com`)" # Change to the address on which Continuwuity is hosted
- "traefik.http.routers.to-continuwuity.tls=true" - "traefik.http.routers.to-continuwuity.tls=true"
@@ -14,10 +14,13 @@ services:
# This must match with CONTINUWUITY_PORT (default: 8008) # This must match with CONTINUWUITY_PORT (default: 8008)
- "traefik.http.services.to_continuwuity.loadbalancer.server.port=8008" - "traefik.http.services.to_continuwuity.loadbalancer.server.port=8008"
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowOriginList=*"
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowHeaders=Origin, X-Requested-With, Content-Type, Accept, Authorization"
- "traefik.http.middlewares.cors-headers.headers.accessControlAllowMethods=GET, POST, PUT, DELETE, OPTIONS"
# If you want to have your account on <DOMAIN>, but host Continuwuity on a subdomain, # If you want to have your account on <DOMAIN>, but host Continuwuity on a subdomain,
# you can let it only handle the well known file on the base domain instead # you can let it only handle the well known file on that domain instead
# #- "traefik.http.routers.to-matrix-wellknown.rule=Host(`example.com`) && PathPrefix(`/.well-known/matrix`)"
# - "traefik.http.routers.to-matrix-wellknown.rule=Host(`example.com`) && PathPrefix(`/.well-known/matrix`)"
#- "traefik.http.routers.to-matrix-wellknown.tls=true" #- "traefik.http.routers.to-matrix-wellknown.tls=true"
#- "traefik.http.routers.to-matrix-wellknown.tls.certresolver=letsencrypt" #- "traefik.http.routers.to-matrix-wellknown.tls.certresolver=letsencrypt"
#- "traefik.http.routers.to-matrix-wellknown.middlewares=cors-headers@docker" #- "traefik.http.routers.to-matrix-wellknown.middlewares=cors-headers@docker"
@@ -1,10 +1,8 @@
# Continuwuity - With Caddy Labels
services: services:
caddy: caddy:
# This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity! # This compose file uses caddy-docker-proxy as the reverse proxy for Continuwuity!
# For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy # For more info, visit https://github.com/lucaslorentz/caddy-docker-proxy
image: "docker.io/lucaslorentz/caddy-docker-proxy:ci-alpine" image: lucaslorentz/caddy-docker-proxy:ci-alpine
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
@@ -18,7 +16,7 @@ services:
restart: unless-stopped restart: unless-stopped
homeserver: homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest" image: forgejo.ellis.link/continuwuation/continuwuity:latest
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
@@ -1,8 +1,6 @@
# Continuwuity - Using Caddy Docker Image
services: services:
caddy: caddy:
image: "docker.io/caddy:latest" image: docker.io/caddy:latest
ports: ports:
- 80:80 - 80:80
- 443:443 - 443:443
@@ -17,7 +15,7 @@ services:
target: /etc/caddy/Caddyfile target: /etc/caddy/Caddyfile
homeserver: homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest" image: forgejo.ellis.link/continuwuation/continuwuity:latest
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
@@ -39,6 +37,7 @@ services:
# server=example.com:443 # server=example.com:443
# } # }
networks: networks:
- caddy - caddy
@@ -49,8 +48,8 @@ volumes:
db: db:
configs: configs:
Caddyfile: dynamic.yml:
content: | content: |
https://example.com:443, https://example.com:8448 { https://example.com, https://example.com:8448 {
reverse_proxy http://homeserver:8008 reverse_proxy http://homeserver:8008
} }
@@ -1,8 +1,8 @@
# Continuwuity - With Traefik Reverse Proxy # Continuwuity - Behind Traefik Reverse Proxy
services: services:
homeserver: homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest" image: forgejo.ellis.link/continuwuation/continuwuity:latest
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
volumes: volumes:
@@ -32,14 +32,14 @@ services:
} }
traefik: traefik:
image: "docker.io/traefik:latest" image: "traefik:latest"
container_name: "traefik" container_name: "traefik"
restart: "unless-stopped" restart: "unless-stopped"
ports: ports:
- "80:80" - "80:80"
- "443:443" - "443:443"
volumes: volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro" - "/var/run/docker.sock:/var/run/docker.sock:z"
- "acme:/etc/traefik/acme" - "acme:/etc/traefik/acme"
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
@@ -52,7 +52,6 @@ services:
- "traefik.http.routers.redirs.middlewares=redirect-to-https" - "traefik.http.routers.redirs.middlewares=redirect-to-https"
environment: environment:
TRAEFIK_LOG_LEVEL: DEBUG TRAEFIK_LOG_LEVEL: DEBUG
TRAEFIK_ENTRYPOINTS_WEB: true TRAEFIK_ENTRYPOINTS_WEB: true
TRAEFIK_ENTRYPOINTS_WEB_ADDRESS: ":80" TRAEFIK_ENTRYPOINTS_WEB_ADDRESS: ":80"
+3 -13
View File
@@ -1,23 +1,12 @@
# Continuwuity - Bare Configuration (for other reverse proxies) # Continuwuity
services: services:
homeserver: homeserver:
image: "forgejo.ellis.link/continuwuation/continuwuity:latest" image: forgejo.ellis.link/continuwuation/continuwuity:latest
restart: unless-stopped restart: unless-stopped
command: /sbin/conduwuit command: /sbin/conduwuit
ports: ports:
# If your reverse proxy is on the host, use this
# and configure it to connect to `127.0.0.1:8008`
- 127.0.0.1:8008:8008 - 127.0.0.1:8008:8008
# If your reverse proxy is on another machine, use this
# and configure it to connect to <this-machine-ip>:8008
# - 8008:8008
# If your reverse proxy is a docker container on the same network,
# comment out the entire `ports` section, and configure it to connect to `continuwuity:8008`
volumes: volumes:
- db:/var/lib/continuwuity - db:/var/lib/continuwuity
- ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's - ./continuwuity-resolv.conf:/etc/resolv.conf # use custom resolvers rather than Docker's
@@ -37,5 +26,6 @@ services:
# server=example.com:443 # server=example.com:443
# } # }
volumes: volumes:
db: db:
+1 -1
View File
@@ -146,7 +146,7 @@ cargo clippy \
--locked \ --locked \
--profile test \ --profile test \
--no-default-features \ --no-default-features \
--features=console,systemd,element_hacks,direct_tls,perf_measurements,brotli_compression \ --features=console,systemd,element_hacks,direct_tls,perf_measurements,brotli_compression,blurhashing \
--color=always \ --color=always \
-- \ -- \
-D warnings -D warnings
Generated
+21 -21
View File
@@ -3,11 +3,11 @@
"advisory-db": { "advisory-db": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1779575509, "lastModified": 1775907537,
"narHash": "sha256-wXKYURZz76ZC5lbuDA1oVQA/MxSB3pSJ1raF1HG0oIc=", "narHash": "sha256-vbeLNgmsx1Z6TwnlDV0dKyeBCcon3UpkV9yLr/yc6HM=",
"owner": "rustsec", "owner": "rustsec",
"repo": "advisory-db", "repo": "advisory-db",
"rev": "831c50f4a4304068f125e603add6a8839f08b3eb", "rev": "d99f7b9eb81731bddebf80a355f8be7b2f8b1b28",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -18,11 +18,11 @@
}, },
"crane": { "crane": {
"locked": { "locked": {
"lastModified": 1779130139, "lastModified": 1775839657,
"narHash": "sha256-BLrtr42azquO7MdGFU5a7KiMl3YpFlTeIXqy1fT5GlQ=", "narHash": "sha256-SPm9ck7jh3Un9nwPuMGbRU04UroFmOHjLP56T10MOeM=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "edb38893982a3338972bb4a2ec7ce7c29ba10fd9", "rev": "7cf72d978629469c4bd4206b95c402514c1f6000",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -39,11 +39,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1779612045, "lastModified": 1775891769,
"narHash": "sha256-+7lfNVnmXJDkiRYHd5NoNwYoyUcc0LcXPaIJqjO7VWM=", "narHash": "sha256-EOfVlTKw2n8w1uhfh46GS4hEGnQ7oWrIWQfIY6utIkI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "d7be747f0a65af378de515fc3cee131bf99a008f", "rev": "6fbc54dde15aee725bdc7aae5e478849685d5f56",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -74,11 +74,11 @@
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1778716662, "lastModified": 1775087534,
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=", "narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb", "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -89,11 +89,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1779508470, "lastModified": 1775710090,
"narHash": "sha256-Ap9KJX+5xHIn3bPIpfNgT6MEXdAECECwo4/rmlQD74M=", "narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "29916453413845e54a65b8a1cf996842300cd299", "rev": "4c1018dae018162ec878d42fec712642d214fdfa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -105,11 +105,11 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1777168982, "lastModified": 1774748309,
"narHash": "sha256-GOkGPcboWE9BmGCRMLX3worL4EMnsnG8MyKmXNeYuhQ=", "narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "f5901329dade4a6ea039af1433fb087bd9c1fe14", "rev": "333c4e0545a6da976206c74db8773a1645b5870a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -132,11 +132,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1779569060, "lastModified": 1775843361,
"narHash": "sha256-NSnk5D+3KEfRdbgPijs33N2RAKSG6A74SwfnynLcouo=", "narHash": "sha256-j53ZgyDvmYf3Sjh1IPvvTjqa614qUfVQSzj59+MpzkY=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "987ea33645ab1c709b1df6823038abcb2fe8973e", "rev": "9eb97ea96d8400e8957ddd56702e962614296583",
"type": "github" "type": "github"
}, },
"original": { "original": {
+4 -7
View File
@@ -5,11 +5,11 @@
liburing, liburing,
craneLib, craneLib,
pkg-config, pkg-config,
callPackage,
rustPlatform, rustPlatform,
cargoExtraArgs ? "", cargoExtraArgs ? "",
rustflags ? "", rustflags ? "",
target_cpu ? null, rocksdb ? callPackage ./rocksdb.nix { },
rocksdb,
profile ? "release", profile ? "release",
}: }:
let let
@@ -39,10 +39,7 @@ let
ROCKSDB_LIB_DIR = "${rocksdb}/lib"; ROCKSDB_LIB_DIR = "${rocksdb}/lib";
CARGO_PROFILE = profile; CARGO_PROFILE = profile;
RUSTFLAGS = rustflags; RUSTFLAGS = rustflags;
} };
// (lib.optionalAttrs (target_cpu != null) {
TARGET_CPU = target_cpu;
});
}; };
in in
craneLib.buildPackage ( craneLib.buildPackage (
@@ -59,7 +56,7 @@ craneLib.buildPackage (
] ]
}" }"
patchelf --set-rpath "$old_rpath:$extra_rpath" $out/bin/conduwuit patchelf --set-rpath "$old_rpath:$extra_rpath" $out/bin/conduwuit
''; '';
meta = { meta = {
+5 -8
View File
@@ -15,7 +15,6 @@
rocksdb = pkgs.callPackage ./rocksdb.nix { }; rocksdb = pkgs.callPackage ./rocksdb.nix { };
default = pkgs.callPackage ./continuwuity.nix { default = pkgs.callPackage ./continuwuity.nix {
inherit self craneLib; inherit self craneLib;
inherit (self'.packages) rocksdb;
# extra features via `cargoExtraArgs` # extra features via `cargoExtraArgs`
cargoExtraArgs = "-F http3"; cargoExtraArgs = "-F http3";
# extra RUSTFLAGS via `rustflags` # extra RUSTFLAGS via `rustflags`
@@ -23,13 +22,11 @@
rustflags = "--cfg reqwest_unstable"; rustflags = "--cfg reqwest_unstable";
}; };
# users may also override this with other cargo profiles to build for other feature sets # users may also override this with other cargo profiles to build for other feature sets
# for features configuration see `default` package which enables http3 by default #
# other examples include:
# example: different compilation profile and different target_cpu #
max-perf-haswell = self'.packages.default.override { # - release-high-perf
# compiles explicitly for haswell arch cpus max-perf = self'.packages.default.override {
target_cpu = "haswell";
# compiles slower but with more thorough optimizations
profile = "release-max-perf"; profile = "release-max-perf";
}; };
}; };
+5 -7
View File
@@ -1,7 +1,5 @@
{ {
# stdenv, stdenv,
# enableJemalloc ? stdenv.hostPlatform.isLinux,
enableJemalloc ? false,
rocksdb, rocksdb,
fetchFromGitea, fetchFromGitea,
rust-jemalloc-sys-unprefixed, rust-jemalloc-sys-unprefixed,
@@ -15,16 +13,16 @@
# #
# [1]: https://github.com/tikv/jemallocator/blob/ab0676d77e81268cd09b059260c75b38dbef2d51/jemalloc-sys/src/env.rs#L17 # [1]: https://github.com/tikv/jemallocator/blob/ab0676d77e81268cd09b059260c75b38dbef2d51/jemalloc-sys/src/env.rs#L17
jemalloc = rust-jemalloc-sys-unprefixed; jemalloc = rust-jemalloc-sys-unprefixed;
inherit enableJemalloc; enableJemalloc = stdenv.hostPlatform.isLinux;
}).overrideAttrs }).overrideAttrs
({ ({
version = "continuwuity-v0.5.0-unstable-2026-05-19"; version = "continuwuity-v0.5.0-unstable-2026-03-27";
src = fetchFromGitea { src = fetchFromGitea {
domain = "forgejo.ellis.link"; domain = "forgejo.ellis.link";
owner = "continuwuation"; owner = "continuwuation";
repo = "rocksdb"; repo = "rocksdb";
rev = "3756b2b905e13216d8b56bcc783d814e7b073aff"; rev = "463f47afceebfe088f6922420265546bd237f249";
hash = "sha256-rSv4fr2bf9JJwdodgeuPCuceeh7k97KVxrAOC0wyPQY="; hash = "sha256-1ef75IDMs5Hba4VWEyXPJb02JyShy5k4gJfzGDhopRk=";
}; };
# We have this already at https://forgejo.ellis.link/continuwuation/rocksdb/commit/a935c0273e1ba44eacf88ce3685a9b9831486155 # We have this already at https://forgejo.ellis.link/continuwuation/rocksdb/commit/a935c0273e1ba44eacf88ce3685a9b9831486155
+1 -1
View File
@@ -16,7 +16,7 @@
file = inputs.self + "/rust-toolchain.toml"; file = inputs.self + "/rust-toolchain.toml";
# See also `rust-toolchain.toml` # See also `rust-toolchain.toml`
sha256 = "sha256-gh/xTkxKHL4eiRXzWv8KP7vfjSk61Iq48x47BEDFgfk="; sha256 = "sha256-sqSWJDUxc+zaz1nBWMAJKTAGBuGWP25GCftIOlCEAtA=";
}; };
in in
{ {
+210 -189
View File
@@ -16,24 +16,26 @@
} }
}, },
"node_modules/@emnapi/core": { "node_modules/@emnapi/core": {
"version": "1.10.0", "version": "1.9.2",
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz", "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.2.tgz",
"integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==", "integrity": "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"@emnapi/wasi-threads": "1.2.1", "@emnapi/wasi-threads": "1.2.1",
"tslib": "^2.4.0" "tslib": "^2.4.0"
} }
}, },
"node_modules/@emnapi/runtime": { "node_modules/@emnapi/runtime": {
"version": "1.10.0", "version": "1.9.2",
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.2.tgz",
"integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==", "integrity": "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"tslib": "^2.4.0" "tslib": "^2.4.0"
} }
@@ -45,6 +47,7 @@
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"tslib": "^2.4.0" "tslib": "^2.4.0"
} }
@@ -106,9 +109,9 @@
} }
}, },
"node_modules/@napi-rs/wasm-runtime": { "node_modules/@napi-rs/wasm-runtime": {
"version": "1.1.4", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.4.tgz", "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.2.tgz",
"integrity": "sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==", "integrity": "sha512-sNXv5oLJ7ob93xkZ1XnxisYhGYXfaG9f65/ZgYuAu3qt7b3NadcOEhLvx28hv31PgX8SZJRYrAIPQilQmFpLVw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
@@ -125,13 +128,13 @@
} }
}, },
"node_modules/@rsbuild/core": { "node_modules/@rsbuild/core": {
"version": "2.0.7", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.0.7.tgz", "resolved": "https://registry.npmjs.org/@rsbuild/core/-/core-2.0.0-rc.1.tgz",
"integrity": "sha512-LsBONEzsjzOAqO72ot39eI7g53zSfF9QuDXTu4ks8IUX+EZsxRSniQfc+1zVA6a6y3b9KUUtG96avoMLKbWklQ==", "integrity": "sha512-eqxtRlQiFSm/ibCNGiPj8ozsGSNK91NY+GksmPuTCPmWQExGtPqM1V+s13UYeWZS6fYbMRs7NlQKD896e0QkKA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@rspack/core": "~2.0.4", "@rspack/core": "2.0.0-rc.1",
"@swc/helpers": "^0.5.21" "@swc/helpers": "^0.5.21"
}, },
"bin": { "bin": {
@@ -150,17 +153,17 @@
} }
}, },
"node_modules/@rsbuild/plugin-react": { "node_modules/@rsbuild/plugin-react": {
"version": "2.0.0", "version": "1.4.6",
"resolved": "https://registry.npmjs.org/@rsbuild/plugin-react/-/plugin-react-2.0.0.tgz", "resolved": "https://registry.npmjs.org/@rsbuild/plugin-react/-/plugin-react-1.4.6.tgz",
"integrity": "sha512-/1gzt39EGUSFEqB83g46QoOwsgv172HI18i6au1b6lgIaX4sv9stuX4ijdHbHCp8PqYEq+MyQ99jIQMO6I+etg==", "integrity": "sha512-LAT6xHlEyZKA0VjF/ph5d50iyG+WSmBx+7g98HNZUwb94VeeTMZFB8qVptTkbIRMss3BNKOXmHOu71Lhsh9oEw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@rspack/plugin-react-refresh": "2.0.0", "@rspack/plugin-react-refresh": "^1.6.1",
"react-refresh": "^0.18.0" "react-refresh": "^0.18.0"
}, },
"peerDependencies": { "peerDependencies": {
"@rsbuild/core": "^2.0.0-0" "@rsbuild/core": "^1.0.0 || ^2.0.0-0"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"@rsbuild/core": { "@rsbuild/core": {
@@ -169,28 +172,28 @@
} }
}, },
"node_modules/@rspack/binding": { "node_modules/@rspack/binding": {
"version": "2.0.4", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding/-/binding-2.0.0-rc.1.tgz",
"integrity": "sha512-/QeJDPUw/lWkBJESG264KA9u6/rAjvoJhKncU4rkTi5Ap45kue5HTgOzr0ufxKdd2Xl72fjFBuqlKmtFDD5LiQ==", "integrity": "sha512-rhJqtbyiRPOjTAZW0xTZFbOrS5yP5yL1SF0DPE9kvFfzePz30IqjMDMxL0KuhkDZd/M1eUINJyoqd8NTbR9wHw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"optionalDependencies": { "optionalDependencies": {
"@rspack/binding-darwin-arm64": "2.0.4", "@rspack/binding-darwin-arm64": "2.0.0-rc.1",
"@rspack/binding-darwin-x64": "2.0.4", "@rspack/binding-darwin-x64": "2.0.0-rc.1",
"@rspack/binding-linux-arm64-gnu": "2.0.4", "@rspack/binding-linux-arm64-gnu": "2.0.0-rc.1",
"@rspack/binding-linux-arm64-musl": "2.0.4", "@rspack/binding-linux-arm64-musl": "2.0.0-rc.1",
"@rspack/binding-linux-x64-gnu": "2.0.4", "@rspack/binding-linux-x64-gnu": "2.0.0-rc.1",
"@rspack/binding-linux-x64-musl": "2.0.4", "@rspack/binding-linux-x64-musl": "2.0.0-rc.1",
"@rspack/binding-wasm32-wasi": "2.0.4", "@rspack/binding-wasm32-wasi": "2.0.0-rc.1",
"@rspack/binding-win32-arm64-msvc": "2.0.4", "@rspack/binding-win32-arm64-msvc": "2.0.0-rc.1",
"@rspack/binding-win32-ia32-msvc": "2.0.4", "@rspack/binding-win32-ia32-msvc": "2.0.0-rc.1",
"@rspack/binding-win32-x64-msvc": "2.0.4" "@rspack/binding-win32-x64-msvc": "2.0.0-rc.1"
} }
}, },
"node_modules/@rspack/binding-darwin-arm64": { "node_modules/@rspack/binding-darwin-arm64": {
"version": "2.0.4", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-arm64/-/binding-darwin-arm64-2.0.0-rc.1.tgz",
"integrity": "sha512-0Q1QXFEsZfDc4opiDnb8q50KlBbC2VovViDaYlMJZBzvjAo325mh3itXPfz7YZ31M+TxRE7TUiJXH3ltiV1Hdg==", "integrity": "sha512-fYbeDDDg6QKZzXYt/J0/j0Qhr01wQLuISUsYnNhu5MLwdXVUSVcqz+CTqgF3d0EQVVn6FqLV63lbNRzUGfSq9g==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -202,9 +205,9 @@
] ]
}, },
"node_modules/@rspack/binding-darwin-x64": { "node_modules/@rspack/binding-darwin-x64": {
"version": "2.0.4", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-darwin-x64/-/binding-darwin-x64-2.0.0-rc.1.tgz",
"integrity": "sha512-oO5J2QYf7+H+aYRj85EiGrDOoDEE9EDDl7NgXv46iWvIF0wXowEHXqnjMFxHxRq2Vf6scT+0yYQX9blWcvMWAA==", "integrity": "sha512-MvXi9kr8xXn1y0PD1WI/4YphRNOdbykJjKdEsAG4JxEVoERmhIHOTwKvUqlejajizAwlVZcxQl/FacoPLsKN5Q==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -216,9 +219,9 @@
] ]
}, },
"node_modules/@rspack/binding-linux-arm64-gnu": { "node_modules/@rspack/binding-linux-arm64-gnu": {
"version": "2.0.4", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-2.0.0-rc.1.tgz",
"integrity": "sha512-BEk6mIYBK4BihW9qXXITJORrVXecTlkRjrqhgefili4xjXtLdcUnxAm9sN/2oJ8m378n2h33qDh4gr2orPBFWQ==", "integrity": "sha512-j6WsHEwGSdUoiy4BsQBW0RjFl+MBzozdybSYhkiyVSoHlbm7CPt3XaaS3elH5YcwuLHORmVHPP91QhwWl9UFJg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -233,9 +236,9 @@
] ]
}, },
"node_modules/@rspack/binding-linux-arm64-musl": { "node_modules/@rspack/binding-linux-arm64-musl": {
"version": "2.0.4", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-linux-arm64-musl/-/binding-linux-arm64-musl-2.0.0-rc.1.tgz",
"integrity": "sha512-Hyt3z1RwNcSMIoaoWLN4Hb/696/O5JPukf8rXQASvf2UkC+X3ij7tr+8lMSYi3Zysi1QL375CnT4fNoABEW0JA==", "integrity": "sha512-MPoZE0aS8oH+Wr0R5tIYch8gbUwYYf4LsiGdP6enMKMTrmpJyOVGlhPHVSwsrFgBg7fjTGOuxHuibtsvDUdLOQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -250,9 +253,9 @@
] ]
}, },
"node_modules/@rspack/binding-linux-x64-gnu": { "node_modules/@rspack/binding-linux-x64-gnu": {
"version": "2.0.4", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-gnu/-/binding-linux-x64-gnu-2.0.0-rc.1.tgz",
"integrity": "sha512-xHorBPBZAg0Pn9Q0k9dWZ9euowieDxcSOzQ9JhTCmhDY6wZH5M/kCBFlCs/OQeW5/NUArW3x3MwEdO/0QJHMxg==", "integrity": "sha512-gOlPCwtIg9GsFG/8ZdUyV5SyXDaGq2kmtXmyyFU7RO33MaalltNEBMf2hevRPj9z39eSzxwgJDonMOdx5Fo0Og==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -267,9 +270,9 @@
] ]
}, },
"node_modules/@rspack/binding-linux-x64-musl": { "node_modules/@rspack/binding-linux-x64-musl": {
"version": "2.0.4", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-linux-x64-musl/-/binding-linux-x64-musl-2.0.0-rc.1.tgz",
"integrity": "sha512-QLxEGUXofF0kVNU12Y2NT3Qi9lGs+WbnYpapVeb+2IXtrAXJfU7Rhy7lAp5GLMzYMQNrKKL9SVnTWKbODbNW9Q==", "integrity": "sha512-K6Swk1rfP4z4b6bp84NlikGlUWMOPpIWCtlPr/W0TWgc2C/cd844oHdoIu7WtmOH7y9AwB5UG2bWpgFAVwykCw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -284,9 +287,9 @@
] ]
}, },
"node_modules/@rspack/binding-wasm32-wasi": { "node_modules/@rspack/binding-wasm32-wasi": {
"version": "2.0.4", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-wasm32-wasi/-/binding-wasm32-wasi-2.0.0-rc.1.tgz",
"integrity": "sha512-YhN8HkiH46ONU9tm5dyoXDImDWGpU7E4SPqGI4OyAVF0445uIChurIUmTIOYcD6cg81GGeIjozWJOcb635Dcqw==", "integrity": "sha512-aa9oUTqOb1QjwsHVlMr5sV+7mcBI4MLQ/xhFO2CIEcfVnJIPl8XpKUbDEgqMwcFlzcgzKmHg5cVmIvd82BLgow==",
"cpu": [ "cpu": [
"wasm32" "wasm32"
], ],
@@ -294,15 +297,13 @@
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"dependencies": { "dependencies": {
"@emnapi/core": "1.10.0", "@napi-rs/wasm-runtime": "1.1.2"
"@emnapi/runtime": "1.10.0",
"@napi-rs/wasm-runtime": "1.1.4"
} }
}, },
"node_modules/@rspack/binding-win32-arm64-msvc": { "node_modules/@rspack/binding-win32-arm64-msvc": {
"version": "2.0.4", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-2.0.0-rc.1.tgz",
"integrity": "sha512-MUlYIz82xQRN0aoiXXyEBrNVUwiOSSFRi7nuCgUKduaSdlbPWzCY31IdtOygZ06LVp5JIGUEtyqSrjQq4FrMRw==", "integrity": "sha512-+UxF0c7E9bE3siFbMHi+mmoeQJzcTKl1j3x+Y6MY/PJ3V70cU23wOaxMvmSsCyq2JNJBT2RCNZ9HaL+o3kReug==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -314,9 +315,9 @@
] ]
}, },
"node_modules/@rspack/binding-win32-ia32-msvc": { "node_modules/@rspack/binding-win32-ia32-msvc": {
"version": "2.0.4", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-2.0.0-rc.1.tgz",
"integrity": "sha512-D7UcIFMzlY2yhhyuW4Ej15gBWmTwUM5DxuObl3Kv31qRv/pmV3MsqUeG5m2dqLbUxzqPH87qnp0cArbkJQ1b+w==", "integrity": "sha512-gc0JdkdxSWo+o/b1qTCT6mZ3DrlGe32eW+Ps3xInxcG4UHjUG7hTDgFtOgVQ6VhQ8WMUXG+TQOz0CySVpYjsoQ==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@@ -328,9 +329,9 @@
] ]
}, },
"node_modules/@rspack/binding-win32-x64-msvc": { "node_modules/@rspack/binding-win32-x64-msvc": {
"version": "2.0.4", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@rspack/binding-win32-x64-msvc/-/binding-win32-x64-msvc-2.0.0-rc.1.tgz",
"integrity": "sha512-MnYKPfdrAEbtpKg/1SZ6cNtzreIRyQJK4APbxLLPXENdTH5QXQkaTjLMKEeJcJ51FRhI/+yNpOUm2oTHdCQ1Og==", "integrity": "sha512-Dnj0jthyVUikf65MGEyZy3akshtSmR1xsp/Xr0h/NWTo5JFWHKAFNYFE+jFfY0uzC8e4IDcLQLYoFomqV1DsEg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -342,13 +343,13 @@
] ]
}, },
"node_modules/@rspack/core": { "node_modules/@rspack/core": {
"version": "2.0.4", "version": "2.0.0-rc.1",
"resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.0.4.tgz", "resolved": "https://registry.npmjs.org/@rspack/core/-/core-2.0.0-rc.1.tgz",
"integrity": "sha512-OuxdQeeKWQpNvFBRDOcnoSaQvp6E4APM/6JJMM/k0p6oL1TEFQVGdNu3VGY4mRAsebnNBXapMVMhj+v66Bn2pg==", "integrity": "sha512-OIfkYn05/IWtVIdZ8Y/a0y/k4ipzqfApxIZqnJM59G/bGwQKMBrLHpOMGgV2Wmq1j9UMXzF7ZtsFMUbYBhFb9A==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@rspack/binding": "2.0.4" "@rspack/binding": "2.0.0-rc.1"
}, },
"engines": { "engines": {
"node": "^20.19.0 || >=22.12.0" "node": "^20.19.0 || >=22.12.0"
@@ -367,36 +368,39 @@
} }
}, },
"node_modules/@rspack/plugin-react-refresh": { "node_modules/@rspack/plugin-react-refresh": {
"version": "2.0.0", "version": "1.6.2",
"resolved": "https://registry.npmjs.org/@rspack/plugin-react-refresh/-/plugin-react-refresh-2.0.0.tgz", "resolved": "https://registry.npmjs.org/@rspack/plugin-react-refresh/-/plugin-react-refresh-1.6.2.tgz",
"integrity": "sha512-Cf6CxBStNDJbiXMc/GmsvG1G8PRlUpa0MSfWsMTI+e8npzuTN/p8nwLs3shriBZOLciqgkSZpBtPTd10BLpj1g==", "integrity": "sha512-k+/VrfTNgo+KirjI6V+8CWRj6y+DH9jOUWv8JorYY4vKf/9xfnZ8xHzuB4iqCwTtoZl9YnxOaOuoyjJipc2tiQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": {
"error-stack-parser": "^2.1.4"
},
"peerDependencies": { "peerDependencies": {
"@rspack/core": "^2.0.0-0", "react-refresh": ">=0.10.0 <1.0.0",
"react-refresh": ">=0.10.0 <1.0.0" "webpack-hot-middleware": "2.x"
}, },
"peerDependenciesMeta": { "peerDependenciesMeta": {
"@rspack/core": { "webpack-hot-middleware": {
"optional": true "optional": true
} }
} }
}, },
"node_modules/@rspress/core": { "node_modules/@rspress/core": {
"version": "2.0.13", "version": "2.0.9",
"resolved": "https://registry.npmjs.org/@rspress/core/-/core-2.0.13.tgz", "resolved": "https://registry.npmjs.org/@rspress/core/-/core-2.0.9.tgz",
"integrity": "sha512-lbaBA5eqh7wKdH98TUQEI+SfS3Z6YgaNCup3X+ttrYVLOrxN8PJvbedo6fFAcl+wP3XLy6D0pcnnzAgu8y3tdg==", "integrity": "sha512-cfbqqbWtdimrWIsfeyPnQOTKwJpdNLr8VnwLIL4JYC2ZcRq+xcInpszLXVpV86nONL6qI19usr2Or7uzZJ+ynA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@mdx-js/mdx": "^3.1.1", "@mdx-js/mdx": "^3.1.1",
"@mdx-js/react": "^3.1.1", "@mdx-js/react": "^3.1.1",
"@rsbuild/core": "^2.0.7", "@rsbuild/core": "2.0.0-rc.1",
"@rsbuild/plugin-react": "~2.0.0", "@rsbuild/plugin-react": "~1.4.6",
"@rspress/shared": "2.0.13", "@rspress/shared": "2.0.9",
"@shikijs/rehype": "^4.0.2", "@shikijs/rehype": "^4.0.2",
"@types/unist": "^3.0.3", "@types/unist": "^3.0.3",
"@unhead/react": "^2.1.15", "@unhead/react": "^2.1.13",
"body-scroll-lock": "4.0.0-beta.0", "body-scroll-lock": "4.0.0-beta.0",
"clsx": "2.1.1", "clsx": "2.1.1",
"copy-to-clipboard": "^3.3.3", "copy-to-clipboard": "^3.3.3",
@@ -407,12 +411,12 @@
"mdast-util-mdxjs-esm": "^2.0.1", "mdast-util-mdxjs-esm": "^2.0.1",
"medium-zoom": "1.1.0", "medium-zoom": "1.1.0",
"nprogress": "^0.2.0", "nprogress": "^0.2.0",
"react": "^19.2.6", "react": "^19.2.4",
"react-dom": "^19.2.6", "react-dom": "^19.2.4",
"react-lazy-with-preload": "^2.2.1", "react-lazy-with-preload": "^2.2.1",
"react-reconciler": "0.33.0", "react-reconciler": "0.33.0",
"react-render-to-markdown": "19.1.0", "react-render-to-markdown": "19.0.1",
"react-router-dom": "^7.15.1", "react-router-dom": "^7.13.2",
"rehype-external-links": "^3.0.0", "rehype-external-links": "^3.0.0",
"rehype-raw": "^7.0.0", "rehype-raw": "^7.0.0",
"remark-cjk-friendly": "^2.0.1", "remark-cjk-friendly": "^2.0.1",
@@ -436,52 +440,52 @@
} }
}, },
"node_modules/@rspress/plugin-client-redirects": { "node_modules/@rspress/plugin-client-redirects": {
"version": "2.0.13", "version": "2.0.9",
"resolved": "https://registry.npmjs.org/@rspress/plugin-client-redirects/-/plugin-client-redirects-2.0.13.tgz", "resolved": "https://registry.npmjs.org/@rspress/plugin-client-redirects/-/plugin-client-redirects-2.0.9.tgz",
"integrity": "sha512-dP753ASTvH6eDtSEulcqq2lE/kTSdOWSCw0nzvXG+7atTWTHDp6z47uH3CGD8E78cBuKyEi4OH+U7V0EtCTc0Q==", "integrity": "sha512-r2GyHzOSt8CeS4UIsy/cPM5Zotekt1JVQFmgOYGapvll5ktUlVcd77HLtXDbZjtpgtj0XlaMLrXueOpV2gsBoQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": "^20.19.0 || >=22.12.0" "node": "^20.19.0 || >=22.12.0"
}, },
"peerDependencies": { "peerDependencies": {
"@rspress/core": "^2.0.10" "@rspress/core": "^2.0.9"
} }
}, },
"node_modules/@rspress/plugin-sitemap": { "node_modules/@rspress/plugin-sitemap": {
"version": "2.0.13", "version": "2.0.9",
"resolved": "https://registry.npmjs.org/@rspress/plugin-sitemap/-/plugin-sitemap-2.0.13.tgz", "resolved": "https://registry.npmjs.org/@rspress/plugin-sitemap/-/plugin-sitemap-2.0.9.tgz",
"integrity": "sha512-JtkNlxNuA7BzknKIrLvLQkSk0XVi7OXzrE76ma/cLvleccNWr8LGrHtrac4IrDr+HauK4WKTM2JaHGGHUdOUKw==", "integrity": "sha512-GTuXuySaeaazUZoUxdk2vZ8p0ehIgulPjCP9C7gDg6lIh5JGpUbcjG4def4tWHsxUoKp2rIwu/93bHwKb8T0Mw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": "^20.19.0 || >=22.12.0" "node": "^20.19.0 || >=22.12.0"
}, },
"peerDependencies": { "peerDependencies": {
"@rspress/core": "^2.0.10" "@rspress/core": "^2.0.9"
} }
}, },
"node_modules/@rspress/shared": { "node_modules/@rspress/shared": {
"version": "2.0.13", "version": "2.0.9",
"resolved": "https://registry.npmjs.org/@rspress/shared/-/shared-2.0.13.tgz", "resolved": "https://registry.npmjs.org/@rspress/shared/-/shared-2.0.9.tgz",
"integrity": "sha512-LmDfr7+MDNWRBbxcNoWkW68A35oRonpDJq2Jlx3L8GCzG4sAsyd6Yw0DebTWAxx7hVOXGMf37nEf1J4aOLEZfg==", "integrity": "sha512-G48n3pC7AVAR58pLqwClUCYj5Nt7ZgYEStR8VTBGFuPgXtzb3+KPfo/gz0hb6wxdKJ1cL5ohPsZ6EXqllu6lew==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@rsbuild/core": "^2.0.7", "@rsbuild/core": "2.0.0-rc.1",
"@shikijs/rehype": "^4.0.2", "@shikijs/rehype": "^4.0.2",
"unified": "^11.0.5" "unified": "^11.0.5"
} }
}, },
"node_modules/@shikijs/core": { "node_modules/@shikijs/core": {
"version": "4.1.0", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.1.0.tgz", "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-4.0.2.tgz",
"integrity": "sha512-jLJtSJeuFffqX6/inRE1zqU5aFv2hrszvYgq3OjbAgFRZiWv7abKMDdQzYxuSDfmUPQozZvI/kuy6VMTvnvqTQ==", "integrity": "sha512-hxT0YF4ExEqB8G/qFdtJvpmHXBYJ2lWW7qTHDarVkIudPFE6iCIrqdgWxGn5s+ppkGXI0aEGlibI0PAyzP3zlw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/primitive": "4.1.0", "@shikijs/primitive": "4.0.2",
"@shikijs/types": "4.1.0", "@shikijs/types": "4.0.2",
"@shikijs/vscode-textmate": "^10.0.2", "@shikijs/vscode-textmate": "^10.0.2",
"@types/hast": "^3.0.4", "@types/hast": "^3.0.4",
"hast-util-to-html": "^9.0.5" "hast-util-to-html": "^9.0.5"
@@ -491,28 +495,28 @@
} }
}, },
"node_modules/@shikijs/engine-javascript": { "node_modules/@shikijs/engine-javascript": {
"version": "4.1.0", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.1.0.tgz", "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-4.0.2.tgz",
"integrity": "sha512-YquhawCUgaBfhsS72e2Y/dI59gCBNPHu3fEO/tvLaXrTssxZrY5ddjtNLTwndrMgPo8b3IscE+xoICDzpTmlFQ==", "integrity": "sha512-7PW0Nm49DcoUIQEXlJhNNBHyoGMjalRETTCcjMqEaMoJRLljy1Bi/EGV3/qLBgLKQejdspiiYuHGQW6dX94Nag==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "4.1.0", "@shikijs/types": "4.0.2",
"@shikijs/vscode-textmate": "^10.0.2", "@shikijs/vscode-textmate": "^10.0.2",
"oniguruma-to-es": "^4.3.6" "oniguruma-to-es": "^4.3.4"
}, },
"engines": { "engines": {
"node": ">=20" "node": ">=20"
} }
}, },
"node_modules/@shikijs/engine-oniguruma": { "node_modules/@shikijs/engine-oniguruma": {
"version": "4.1.0", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-4.1.0.tgz", "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-4.0.2.tgz",
"integrity": "sha512-axLpjVs45YBvvINa+dJF+NPW+KtFkNXsFr4SDw2BMj9GdeMnGxVB9PQb2xXlJYovslt/nz6giedAyOANkfc7hg==", "integrity": "sha512-UpCB9Y2sUKlS9z8juFSKz7ZtysmeXCgnRF0dlhXBkmQnek7lAToPte8DkxmEYGNTMii72zU/lyXiCB6StuZeJg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "4.1.0", "@shikijs/types": "4.0.2",
"@shikijs/vscode-textmate": "^10.0.2" "@shikijs/vscode-textmate": "^10.0.2"
}, },
"engines": { "engines": {
@@ -520,26 +524,26 @@
} }
}, },
"node_modules/@shikijs/langs": { "node_modules/@shikijs/langs": {
"version": "4.1.0", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.1.0.tgz", "resolved": "https://registry.npmjs.org/@shikijs/langs/-/langs-4.0.2.tgz",
"integrity": "sha512-nwOMruEkbgdZfQ/b8CgpNBVOpvG1k0N5tbmgiFeqsan401+x3ILqlzZJowSla4Agmq4hG2Uf2wh5jLTEhR8VSg==", "integrity": "sha512-KaXby5dvoeuZzN0rYQiPMjFoUrz4hgwIE+D6Du9owcHcl6/g16/yT5BQxSW5cGt2MZBz6Hl0YuRqf12omRfUUg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "4.1.0" "@shikijs/types": "4.0.2"
}, },
"engines": { "engines": {
"node": ">=20" "node": ">=20"
} }
}, },
"node_modules/@shikijs/primitive": { "node_modules/@shikijs/primitive": {
"version": "4.1.0", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/@shikijs/primitive/-/primitive-4.1.0.tgz", "resolved": "https://registry.npmjs.org/@shikijs/primitive/-/primitive-4.0.2.tgz",
"integrity": "sha512-zx2/2Uwj2q9X3KSyYREEhXO23xBw5WUhP4orK2lE4r+t9JGITmEe0JH+wPmJhqHpOT2bRRs6lAL945+LDvOAGw==", "integrity": "sha512-M6UMPrSa3fN5ayeJwFVl9qWofl273wtK1VG8ySDZ1mQBfhCpdd8nEx7nPZ/tk7k+TYcpqBZzj/AnwxT9lO+HJw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "4.1.0", "@shikijs/types": "4.0.2",
"@shikijs/vscode-textmate": "^10.0.2", "@shikijs/vscode-textmate": "^10.0.2",
"@types/hast": "^3.0.4" "@types/hast": "^3.0.4"
}, },
@@ -548,16 +552,16 @@
} }
}, },
"node_modules/@shikijs/rehype": { "node_modules/@shikijs/rehype": {
"version": "4.1.0", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/@shikijs/rehype/-/rehype-4.1.0.tgz", "resolved": "https://registry.npmjs.org/@shikijs/rehype/-/rehype-4.0.2.tgz",
"integrity": "sha512-HQwltCcO2/UiFz44/8whyji4rP1VghLu++MgvQn+lQA8/gvuycGkay8DH8o8VAOvLBDKGOkBEw7cC1Cm33GObQ==", "integrity": "sha512-cmPlKLD8JeojasNFoY64162ScpEdEdQUMuVodPCrv1nx1z3bjmGwoKWDruQWa/ejSznImlaeB0Ty6Q3zPaVQAA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "4.1.0", "@shikijs/types": "4.0.2",
"@types/hast": "^3.0.4", "@types/hast": "^3.0.4",
"hast-util-to-string": "^3.0.1", "hast-util-to-string": "^3.0.1",
"shiki": "4.1.0", "shiki": "4.0.2",
"unified": "^11.0.5", "unified": "^11.0.5",
"unist-util-visit": "^5.1.0" "unist-util-visit": "^5.1.0"
}, },
@@ -566,22 +570,22 @@
} }
}, },
"node_modules/@shikijs/themes": { "node_modules/@shikijs/themes": {
"version": "4.1.0", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-4.1.0.tgz", "resolved": "https://registry.npmjs.org/@shikijs/themes/-/themes-4.0.2.tgz",
"integrity": "sha512-emCcTnUM7yO2wltYbaxm+yLvcCI4+h8XBKc4KmJ7EZUXoSGjcCHifkI//R4OFit9ewpg7H2/9tjOuXrT2v/Knw==", "integrity": "sha512-mjCafwt8lJJaVSsQvNVrJumbnnj1RI8jbUKrPKgE6E3OvQKxnuRoBaYC51H4IGHePsGN/QtALglWBU7DoKDFnA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/types": "4.1.0" "@shikijs/types": "4.0.2"
}, },
"engines": { "engines": {
"node": ">=20" "node": ">=20"
} }
}, },
"node_modules/@shikijs/types": { "node_modules/@shikijs/types": {
"version": "4.1.0", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/@shikijs/types/-/types-4.1.0.tgz", "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-4.0.2.tgz",
"integrity": "sha512-3EQWX54fMpniOrDblzAhiwiJwpiTMW6+B9DWyUd9ska483tbayFYuw47UxwuPknI31bKnySfVQ/QW+jFL4rFdA==", "integrity": "sha512-qzbeRooUTPnLE+sHD/Z8DStmaDgnbbc/pMrU203950aRqjX/6AFHeDYT+j00y2lPdz0ywJKx7o/7qnqTivtlXg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -610,9 +614,9 @@
} }
}, },
"node_modules/@tybys/wasm-util": { "node_modules/@tybys/wasm-util": {
"version": "0.10.2", "version": "0.10.1",
"resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.2.tgz", "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz",
"integrity": "sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==", "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
@@ -631,9 +635,9 @@
} }
}, },
"node_modules/@types/estree": { "node_modules/@types/estree": {
"version": "1.0.9", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
"integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
@@ -682,9 +686,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@types/react": { "node_modules/@types/react": {
"version": "19.2.15", "version": "19.2.14",
"resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.15.tgz", "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz",
"integrity": "sha512-eRwcGNHve+E8qtEQSSRl6urh+rFop4v8gm6O8rGv25CodbvFdLjA1vVQ1KkiFE0w0UPOnb8tDiFKL5lp0rtY5Q==", "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"peer": true, "peer": true,
@@ -700,20 +704,20 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/@ungap/structured-clone": { "node_modules/@ungap/structured-clone": {
"version": "1.3.1", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.1.tgz", "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.3.0.tgz",
"integrity": "sha512-mUFwbeTqrVgDQxFveS+df2yfap6iuP20NAKAsBt5jDEoOTDew+zwLAOilHCeQJOVSvmgCX4ogqIrA0mnyr08yQ==", "integrity": "sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==",
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
"node_modules/@unhead/react": { "node_modules/@unhead/react": {
"version": "2.1.15", "version": "2.1.13",
"resolved": "https://registry.npmjs.org/@unhead/react/-/react-2.1.15.tgz", "resolved": "https://registry.npmjs.org/@unhead/react/-/react-2.1.13.tgz",
"integrity": "sha512-5hfAaZ3XJq9JkspRzZdSPsMrXXA8v/SKiEOxZcN9L40o44byF/50bcQuOLgSSCAx8802mI5VG32KZXWTtsLu9Q==", "integrity": "sha512-gC48tNJ0UtbithkiKCc2WUlxbVVk5o171EtruS2w2hQUblfYFHzCPu2hljjT1e0tUHXXqN8EMv7mpxHddMB2sg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"unhead": "2.1.15" "unhead": "2.1.13"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/harlan-zw" "url": "https://github.com/sponsors/harlan-zw"
@@ -968,6 +972,16 @@
"url": "https://github.com/fb55/entities?sponsor=1" "url": "https://github.com/fb55/entities?sponsor=1"
} }
}, },
"node_modules/error-stack-parser": {
"version": "2.1.4",
"resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz",
"integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"stackframe": "^1.3.4"
}
},
"node_modules/esast-util-from-estree": { "node_modules/esast-util-from-estree": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/esast-util-from-estree/-/esast-util-from-estree-2.0.0.tgz", "resolved": "https://registry.npmjs.org/esast-util-from-estree/-/esast-util-from-estree-2.0.0.tgz",
@@ -1150,9 +1164,9 @@
"license": "Apache-2.0" "license": "Apache-2.0"
}, },
"node_modules/get-east-asian-width": { "node_modules/get-east-asian-width": {
"version": "1.6.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.6.0.tgz", "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.5.0.tgz",
"integrity": "sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==", "integrity": "sha512-CQ+bEO+Tva/qlmw24dCejulK5pMzVnUOFOijVogd3KQs07HnRIgp8TGipvCCRT06xeYEbpbgwaCxglFyiuIcmA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -1399,9 +1413,9 @@
} }
}, },
"node_modules/hookable": { "node_modules/hookable": {
"version": "6.1.1", "version": "6.1.0",
"resolved": "https://registry.npmjs.org/hookable/-/hookable-6.1.1.tgz", "resolved": "https://registry.npmjs.org/hookable/-/hookable-6.1.0.tgz",
"integrity": "sha512-U9LYDy1CwhMCnprUfeAZWZGByVbhd54hwepegYTK7Pi5NvqEj63ifz5z+xukznehT7i6NIZRu89Ay1AZmRsLEQ==", "integrity": "sha512-ZoKZSJgu8voGK2geJS+6YtYjvIzu9AOM/KZXsBxr83uhLL++e9pEv/dlgwgy3dvHg06kTz6JOh1hk3C8Ceiymw==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
@@ -2683,20 +2697,20 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/oniguruma-parser": { "node_modules/oniguruma-parser": {
"version": "0.12.2", "version": "0.12.1",
"resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.2.tgz", "resolved": "https://registry.npmjs.org/oniguruma-parser/-/oniguruma-parser-0.12.1.tgz",
"integrity": "sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==", "integrity": "sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==",
"dev": true, "dev": true,
"license": "MIT" "license": "MIT"
}, },
"node_modules/oniguruma-to-es": { "node_modules/oniguruma-to-es": {
"version": "4.3.6", "version": "4.3.5",
"resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.6.tgz", "resolved": "https://registry.npmjs.org/oniguruma-to-es/-/oniguruma-to-es-4.3.5.tgz",
"integrity": "sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==", "integrity": "sha512-Zjygswjpsewa0NLTsiizVuMQZbp0MDyM6lIt66OxsF21npUDlzpHi1Mgb/qhQdkb+dWFTzJmFbEWdvZgRho8eQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"oniguruma-parser": "^0.12.2", "oniguruma-parser": "^0.12.1",
"regex": "^6.1.0", "regex": "^6.1.0",
"regex-recursion": "^6.0.2" "regex-recursion": "^6.0.2"
} }
@@ -2753,9 +2767,9 @@
} }
}, },
"node_modules/react": { "node_modules/react": {
"version": "19.2.6", "version": "19.2.5",
"resolved": "https://registry.npmjs.org/react/-/react-19.2.6.tgz", "resolved": "https://registry.npmjs.org/react/-/react-19.2.5.tgz",
"integrity": "sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q==", "integrity": "sha512-llUJLzz1zTUBrskt2pwZgLq59AemifIftw4aB7JxOqf1HY2FDaGDxgwpAPVzHU1kdWabH7FauP4i1oEeer2WCA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -2763,16 +2777,16 @@
} }
}, },
"node_modules/react-dom": { "node_modules/react-dom": {
"version": "19.2.6", "version": "19.2.5",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.6.tgz", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.5.tgz",
"integrity": "sha512-0prMI+hvBbPjsWnxDLxlCGyM8PN6UuWjEUCYmZhO67xIV9Xasa/r/vDnq+Xyq4Lo27g8QSbO5YzARu0D1Sps3g==", "integrity": "sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"scheduler": "^0.27.0" "scheduler": "^0.27.0"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^19.2.6" "react": "^19.2.5"
} }
}, },
"node_modules/react-lazy-with-preload": { "node_modules/react-lazy-with-preload": {
@@ -2809,9 +2823,9 @@
} }
}, },
"node_modules/react-render-to-markdown": { "node_modules/react-render-to-markdown": {
"version": "19.1.0", "version": "19.0.1",
"resolved": "https://registry.npmjs.org/react-render-to-markdown/-/react-render-to-markdown-19.1.0.tgz", "resolved": "https://registry.npmjs.org/react-render-to-markdown/-/react-render-to-markdown-19.0.1.tgz",
"integrity": "sha512-dF9b3tO41ezqdmHP8X92kbHbMexJ6iC7iHw4ykC8fwiO7DgpFc9PhMoKlI+BcPzRxGcWgQSdrixVB9RykhjJpQ==", "integrity": "sha512-BPv48o+ubcu2JyUDIktvJXFqLIZqR7hA4mvGu1eFIofz9fogT2me9UvXwRvqvGs9jEtNaJkxZIUKUX0oiK4hDA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -2822,9 +2836,9 @@
} }
}, },
"node_modules/react-router": { "node_modules/react-router": {
"version": "7.15.1", "version": "7.14.0",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-7.15.1.tgz", "resolved": "https://registry.npmjs.org/react-router/-/react-router-7.14.0.tgz",
"integrity": "sha512-R8rl9HhgikFYoPJymnUtPXWbnDb3oget6lQnfIoupbt61aT9aOhRkDsY2XRhZRyX1Z/8a5sL74fXmFNm3NRK5A==", "integrity": "sha512-m/xR9N4LQLmAS0ZhkY2nkPA1N7gQ5TUVa5n8TgANuDTARbn1gt+zLPXEm7W0XDTbrQ2AJSJKhoa6yx1D8BcpxQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -2845,13 +2859,13 @@
} }
}, },
"node_modules/react-router-dom": { "node_modules/react-router-dom": {
"version": "7.15.1", "version": "7.14.0",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.15.1.tgz", "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-7.14.0.tgz",
"integrity": "sha512-AzF62gjY6U9rkMq4RfP/r2EVtQ7DMfNMjyOp/flLTCrtRylLiK4wT4pSq6O8rOXZ2eXdZYJPEYe+ifomiv+Igg==", "integrity": "sha512-2G3ajSVSZMEtmTjIklRWlNvo8wICEpLihfD/0YMDxbWK2UyP5EGfnoIn9AIQGnF3G/FX0MRbHXdFcD+rL1ZreQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"react-router": "7.15.1" "react-router": "7.14.0"
}, },
"engines": { "engines": {
"node": ">=20.0.0" "node": ">=20.0.0"
@@ -3164,18 +3178,18 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/shiki": { "node_modules/shiki": {
"version": "4.1.0", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/shiki/-/shiki-4.1.0.tgz", "resolved": "https://registry.npmjs.org/shiki/-/shiki-4.0.2.tgz",
"integrity": "sha512-l/ABZPUR5v70jI10EzqfMS/I96vjSGv2y0ihUV+WYFzv0EfvW4s54m0Lg8wCrrL+2IkwBzFTuxkZjPf8b2NX9Q==", "integrity": "sha512-eAVKTMedR5ckPo4xne/PjYQYrU3qx78gtJZ+sHlXEg5IHhhoQhMfZVzetTYuaJS0L2Ef3AcCRzCHV8T0WI6nIQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@shikijs/core": "4.1.0", "@shikijs/core": "4.0.2",
"@shikijs/engine-javascript": "4.1.0", "@shikijs/engine-javascript": "4.0.2",
"@shikijs/engine-oniguruma": "4.1.0", "@shikijs/engine-oniguruma": "4.0.2",
"@shikijs/langs": "4.1.0", "@shikijs/langs": "4.0.2",
"@shikijs/themes": "4.1.0", "@shikijs/themes": "4.0.2",
"@shikijs/types": "4.1.0", "@shikijs/types": "4.0.2",
"@shikijs/vscode-textmate": "^10.0.2", "@shikijs/vscode-textmate": "^10.0.2",
"@types/hast": "^3.0.4" "@types/hast": "^3.0.4"
}, },
@@ -3204,6 +3218,13 @@
"url": "https://github.com/sponsors/wooorm" "url": "https://github.com/sponsors/wooorm"
} }
}, },
"node_modules/stackframe": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.3.4.tgz",
"integrity": "sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==",
"dev": true,
"license": "MIT"
},
"node_modules/stringify-entities": { "node_modules/stringify-entities": {
"version": "4.0.4", "version": "4.0.4",
"resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz",
@@ -3290,9 +3311,9 @@
} }
}, },
"node_modules/unhead": { "node_modules/unhead": {
"version": "2.1.15", "version": "2.1.13",
"resolved": "https://registry.npmjs.org/unhead/-/unhead-2.1.15.tgz", "resolved": "https://registry.npmjs.org/unhead/-/unhead-2.1.13.tgz",
"integrity": "sha512-MCt5T90mCWyr3Z6pUCdM9lVRXoMoVBlL7z7U4CYVIiaDiuzad/UCfLuMqz5MeNmpZUgoBCQnrucJimU7EZR+XA==", "integrity": "sha512-jO9M1sI6b2h/1KpIu4Jeu+ptumLmUKboRRLxys5pYHFeT+lqTzfNHbYUX9bxVDhC1FBszAGuWcUVlmvIPsah8Q==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
+3 -19
View File
@@ -5,7 +5,7 @@
"osvVulnerabilityAlerts": true, "osvVulnerabilityAlerts": true,
"lockFileMaintenance": { "lockFileMaintenance": {
"enabled": true, "enabled": true,
"schedule": ["* * * * 0,6"] "schedule": ["at any time"]
}, },
"platformAutomerge": true, "platformAutomerge": true,
"nix": { "nix": {
@@ -66,17 +66,6 @@
"matchUpdateTypes": ["minor", "patch"], "matchUpdateTypes": ["minor", "patch"],
"groupName": "github-actions-non-major" "groupName": "github-actions-non-major"
}, },
{
"description": "Batch GitHub Actions digest updates",
"matchManagers": ["github-actions"],
"matchUpdateTypes": ["digest"],
"groupName": "github-actions-digest",
"automerge": true,
"automergeStrategy": "fast-forward",
"schedule": [
"* 0-7 * * 2"
]
},
{ {
"description": "Batch patch-level Node.js dependency updates", "description": "Batch patch-level Node.js dependency updates",
"matchManagers": ["npm"], "matchManagers": ["npm"],
@@ -94,10 +83,7 @@
"matchPackageNames": ["crate-ci/typos"], "matchPackageNames": ["crate-ci/typos"],
"matchUpdateTypes": ["minor", "patch"], "matchUpdateTypes": ["minor", "patch"],
"automerge": true, "automerge": true,
"automergeStrategy": "fast-forward", "automergeStrategy": "fast-forward"
"schedule": [
"* 0-7 * * 3"
]
}, },
{ {
"description": "Auto-merge renovatebot docker image updates", "description": "Auto-merge renovatebot docker image updates",
@@ -105,9 +91,7 @@
"matchPackageNames": ["ghcr.io/renovatebot/renovate"], "matchPackageNames": ["ghcr.io/renovatebot/renovate"],
"automerge": true, "automerge": true,
"automergeStrategy": "fast-forward", "automergeStrategy": "fast-forward",
"schedule": [ "extends": ["schedule:earlyMondays"]
"* 0-7 * * 1"
]
} }
], ],
"customManagers": [ "customManagers": [
+1 -5
View File
@@ -20,11 +20,7 @@ export default defineConfig({
'/deploying/docker-compose.for-traefik.yml', '/deploying/docker-compose.for-traefik.yml',
'/deploying/docker-compose.with-traefik.yml', '/deploying/docker-compose.with-traefik.yml',
`/deploying/docker-compose.override.yml`, `/deploying/docker-compose.override.yml`,
`/deploying/docker-compose.yml`, `/deploying/docker-compose.yml`
'/advanced/delegated.docker-compose.with-caddy.yml',
'/advanced/delegated.docker-compose.with-caddy-labels.yml',
'/advanced/delegated.docker-compose.for-traefik.yml',
'/advanced/delegated.docker-compose.with-traefik.yml',
] ]
}, },
}, },
+1 -1
View File
@@ -10,7 +10,7 @@
[toolchain] [toolchain]
profile = "minimal" profile = "minimal"
channel = "1.95.0" channel = "1.92.0"
components = [ components = [
# For rust-analyzer # For rust-analyzer
"rust-src", "rust-src",
-1
View File
@@ -81,7 +81,6 @@ conduwuit-macros.workspace = true
conduwuit-service.workspace = true conduwuit-service.workspace = true
const-str.workspace = true const-str.workspace = true
ctor.workspace = true ctor.workspace = true
dtor.workspace = true
futures.workspace = true futures.workspace = true
lettre.workspace = true lettre.workspace = true
log.workspace = true log.workspace = true
+9 -229
View File
@@ -1,5 +1,5 @@
use std::{ use std::{
collections::{HashMap, HashSet}, collections::HashMap,
fmt::Write, fmt::Write,
iter::once, iter::once,
time::{Instant, SystemTime}, time::{Instant, SystemTime},
@@ -22,7 +22,7 @@ use futures::{FutureExt, StreamExt, TryStreamExt};
use lettre::message::Mailbox; use lettre::message::Mailbox;
use ruma::{ use ruma::{
CanonicalJsonObject, CanonicalJsonValue, EventId, OwnedEventId, OwnedRoomId, CanonicalJsonObject, CanonicalJsonValue, EventId, OwnedEventId, OwnedRoomId,
OwnedRoomOrAliasId, OwnedServerName, RoomId, RoomVersionId, UInt, OwnedRoomOrAliasId, OwnedServerName, RoomId, RoomVersionId,
api::federation::event::get_room_state, events::AnyStateEvent, serde::Raw, api::federation::event::get_room_state, events::AnyStateEvent, serde::Raw,
}; };
use service::rooms::{ use service::rooms::{
@@ -69,205 +69,6 @@ pub(super) async fn get_auth_chain(&self, event_id: OwnedEventId) -> Result {
self.write_str(&out).await self.write_str(&out).await
} }
#[derive(Clone, Copy, Eq, PartialEq)]
enum NodeStatus {
Normal(bool),
SoftFailed(bool),
Rejected(bool),
}
struct AuthChild {
node_id: String,
event_id: OwnedEventId,
depth: UInt,
ts: UInt,
first_seen: bool,
pdu: Option<PduEvent>,
}
fn render_node(
graph: &mut String,
node_id: &str,
event_id: &EventId,
name: &str,
status: NodeStatus,
) -> Result {
let evt_str = event_id.to_string();
let status_label = match status {
| NodeStatus::Normal(false) => format!("{evt_str}: {name}"),
| NodeStatus::Normal(true) => format!("{evt_str}: {name} (missing locally)"),
| NodeStatus::SoftFailed(false) => format!("{evt_str}: {name} (soft-failed)"),
| NodeStatus::SoftFailed(true) =>
format!("{evt_str}: {name} (soft-failed & missing locally)"),
| NodeStatus::Rejected(false) => format!("{evt_str}: {name} (rejected)"),
| NodeStatus::Rejected(true) => format!("{evt_str}: {name} (rejected & missing locally)"),
};
writeln!(graph, "{node_id}[\"{}\"]", status_label.as_str())?;
match status {
| NodeStatus::Rejected(_) => writeln!(graph, "class {node_id} rejected;")?,
| NodeStatus::SoftFailed(_) => writeln!(graph, "class {node_id} soft_failed;")?,
| NodeStatus::Normal(_) => {},
}
Ok(())
}
#[admin_command]
pub(super) async fn show_auth_chain(&self, event_id: OwnedEventId) -> Result {
let node_status = async |event_id: &EventId, missing: bool| -> NodeStatus {
if self
.services
.rooms
.pdu_metadata
.is_event_rejected(event_id)
.await
{
NodeStatus::Rejected(missing)
} else if self
.services
.rooms
.pdu_metadata
.is_event_soft_failed(event_id)
.await
{
NodeStatus::SoftFailed(missing)
} else {
NodeStatus::Normal(missing)
}
};
let Ok(root) = self.services.rooms.timeline.get_pdu(&event_id).await else {
return Err!("Event not found.");
};
let mut graph = String::from(
"```mermaid\n%% This is a mermaid graph. You can plug this output into\n\
%% https://mermaid.live/edit to visualise it on-the-fly.\nflowchart TD\n\
classDef rejected fill:#ffe5e5,stroke:#cc0000,stroke-width:2px,color:#000;\n\
classDef soft_failed fill:#fff6cc,stroke:#c9a400,stroke-width:2px,color:#000;\n"
);
let mut node_ids: HashMap<OwnedEventId, String> = HashMap::new();
let mut cached_events: HashMap<OwnedEventId, PduEvent> =
HashMap::from([(event_id.clone(), root.clone())]);
let mut scheduled: HashSet<OwnedEventId> = HashSet::from([event_id.clone()]);
let mut visited: HashSet<OwnedEventId> = HashSet::new();
let mut stack = vec![root];
let mut next_node_id = 0_usize;
let node_id_for = |event_id: &OwnedEventId,
node_ids: &mut HashMap<OwnedEventId, String>,
next_node_id: &mut usize| {
node_ids
.entry(event_id.clone())
.or_insert_with(|| {
let id = format!("n{}", *next_node_id);
*next_node_id = next_node_id.saturating_add(1);
id
})
.clone()
};
let node_name = |e: &PduEvent| {
if let Some(state_key) = e.state_key() {
format!("{},'{}'", e.event_type(), state_key)
} else {
format!("{}", e.event_type())
}
};
while let Some(event) = stack.pop() {
let current_event_id = event.event_id().to_owned();
if !visited.insert(current_event_id.clone()) {
continue;
}
let current_node_id = node_id_for(&current_event_id, &mut node_ids, &mut next_node_id);
let current_status = node_status(&current_event_id, false).await;
render_node(
&mut graph,
&current_node_id,
&current_event_id,
&node_name(&event),
current_status,
)?;
let mut children = Vec::with_capacity(event.auth_events.len());
for auth_event_id in event.auth_events().rev() {
let auth_event_id = auth_event_id.to_owned();
let auth_node_id = node_id_for(&auth_event_id, &mut node_ids, &mut next_node_id);
writeln!(graph, "{current_node_id} --> {auth_node_id}")?;
let first_seen = scheduled.insert(auth_event_id.clone());
let auth_pdu = if let Some(auth_pdu) = cached_events.get(&auth_event_id) {
// NOTE: events might be referenced multiple times (like the create event)
// so this saves some cheeky db lookup time
Some(auth_pdu.clone())
} else if first_seen {
match self.services.rooms.timeline.get_pdu(&auth_event_id).await {
| Ok(auth_event) => {
cached_events.insert(auth_event_id.clone(), auth_event.clone());
Some(auth_event)
},
| Err(_) => None,
}
} else {
None
};
// NOTE: Depth is used as the primary sorting key here, even though it has no
// bearing on state resolution or anything. Timestamp is used as a
// tiebreaker, failing back to lexicographical comparison.
let (depth, ts) = auth_pdu
.as_ref()
.map_or((UInt::MAX, UInt::MAX), |pdu| (pdu.depth, pdu.origin_server_ts));
children.push(AuthChild {
node_id: auth_node_id,
event_id: auth_event_id,
depth,
ts,
first_seen,
pdu: auth_pdu,
});
}
children.sort_by(|a, b| {
a.depth
.cmp(&b.depth)
.then(a.ts.cmp(&b.ts))
.then(a.event_id.as_str().cmp(b.event_id.as_str()))
});
for child in children.into_iter().rev() {
if !child.first_seen {
continue;
}
if let Some(child_pdu) = child.pdu {
// We have this PDU so will want to traverse it.
stack.push(child_pdu);
} else {
// We don't have this PDU locally so we can't traverse its auth events,
// but we can still render it as a node.
render_node(
&mut graph,
&child.node_id,
&child.event_id,
"",
node_status(&child.event_id, true).await,
)?;
}
}
}
graph.push_str("```\n");
self.write_str(&graph).await
}
#[admin_command] #[admin_command]
pub(super) async fn parse_pdu(&self) -> Result { pub(super) async fn parse_pdu(&self) -> Result {
if self.body.len() < 2 if self.body.len() < 2
@@ -310,31 +111,15 @@ pub(super) async fn get_pdu(&self, event_id: OwnedEventId) -> Result {
outlier = true; outlier = true;
pdu_json = self.services.rooms.timeline.get_pdu_json(&event_id).await; pdu_json = self.services.rooms.timeline.get_pdu_json(&event_id).await;
} }
let rejected = self
.services
.rooms
.pdu_metadata
.is_event_rejected(&event_id)
.await;
let soft_failed = self
.services
.rooms
.pdu_metadata
.is_event_soft_failed(&event_id)
.await;
match pdu_json { match pdu_json {
| Err(_) => return Err!("PDU not found locally."), | Err(_) => return Err!("PDU not found locally."),
| Ok(json) => { | Ok(json) => {
let text = serde_json::to_string_pretty(&json)?; let text = serde_json::to_string_pretty(&json)?;
let msg = if rejected { let msg = if outlier {
"Rejected PDU:" "Outlier (Rejected / Soft Failed) PDU found in our database"
} else if soft_failed {
"Soft-failed PDU:"
} else if outlier {
"Outlier PDU:"
} else { } else {
"PDU:" "PDU found in our database"
}; };
write!(self, "{msg}\n```json\n{text}\n```") write!(self, "{msg}\n```json\n{text}\n```")
}, },
@@ -829,10 +614,6 @@ pub(super) async fn force_set_room_state_from_server(
.await; .await;
state.insert(shortstatekey, pdu.event_id.clone()); state.insert(shortstatekey, pdu.event_id.clone());
self.services
.rooms
.pdu_metadata
.clear_pdu_markers(pdu.event_id());
} }
} }
@@ -850,10 +631,6 @@ pub(super) async fn force_set_room_state_from_server(
.rooms .rooms
.outlier .outlier
.add_pdu_outlier(&event_id, &value); .add_pdu_outlier(&event_id, &value);
self.services
.rooms
.pdu_metadata
.clear_pdu_markers(&event_id);
} }
info!("Resolving new room state"); info!("Resolving new room state");
@@ -885,7 +662,10 @@ pub(super) async fn force_set_room_state_from_server(
.force_state(room_id.clone().as_ref(), short_state_hash, added, removed, &state_lock) .force_state(room_id.clone().as_ref(), short_state_hash, added, removed, &state_lock)
.await?; .await?;
info!("Updating joined counts for room"); info!(
"Updating joined counts for room just in case (e.g. we may have found a difference in \
the room's m.room.member state"
);
self.services self.services
.rooms .rooms
.state_cache .state_cache
+1 -10
View File
@@ -17,21 +17,12 @@ pub enum DebugCommand {
message: Vec<String>, message: Vec<String>,
}, },
/// Loads the auth_chain of a PDU, reporting how long it took. /// Get the auth_chain of a PDU
GetAuthChain { GetAuthChain {
/// An event ID (the $ character followed by the base64 reference hash) /// An event ID (the $ character followed by the base64 reference hash)
event_id: OwnedEventId, event_id: OwnedEventId,
}, },
/// Walks & displays the auth_chain of a PDU in a mermaid graph format.
///
/// This is useless to basically anyone but developers, and is also probably
/// slow and memory hungry.
ShowAuthChain {
/// The root event ID to start walking back from.
event_id: OwnedEventId,
},
/// Parse and print a PDU from a JSON /// Parse and print a PDU from a JSON
/// ///
/// The PDU event is only checked for validity and is not added to the /// The PDU event is only checked for validity and is not added to the
+4
View File
@@ -102,6 +102,10 @@ pub(super) async fn remote_user_in_rooms(&self, user_id: OwnedUserId) -> Result
); );
} }
if !self.services.users.exists(&user_id).await {
return Err!("Remote user does not exist in our database.",);
}
let mut rooms: Vec<(OwnedRoomId, u64, String)> = self let mut rooms: Vec<(OwnedRoomId, u64, String)> = self
.services .services
.rooms .rooms
+3 -13
View File
@@ -1,8 +1,7 @@
use clap::Subcommand; use clap::Subcommand;
use conduwuit::Result; use conduwuit::Result;
use conduwuit_database::Deserialized as _;
use futures::StreamExt; use futures::StreamExt;
use ruma::{OwnedRoomId, OwnedUserId, exports::serde::Serialize}; use ruma::{OwnedRoomId, OwnedUserId};
use crate::{admin_command, admin_command_dispatch}; use crate::{admin_command, admin_command_dispatch};
@@ -59,22 +58,13 @@ async fn account_data_get(
room_id: Option<OwnedRoomId>, room_id: Option<OwnedRoomId>,
) -> Result { ) -> Result {
let timer = tokio::time::Instant::now(); let timer = tokio::time::Instant::now();
let result = self let results = self
.services .services
.account_data .account_data
.get_raw(room_id.as_deref(), &user_id, &kind) .get_raw(room_id.as_deref(), &user_id, &kind)
.await; .await;
let query_time = timer.elapsed(); let query_time = timer.elapsed();
let json = serde_json::to_string_pretty(&match room_id { self.write_str(&format!("Query completed in {query_time:?}:\n\n```rs\n{results:#?}\n```"))
| None => result
.deserialized::<ruma::serde::Raw<ruma::events::AnyGlobalAccountDataEvent>>()?
.serialize(serde_json::value::Serializer)?,
| Some(_) => result
.deserialized::<ruma::serde::Raw<ruma::events::AnyRoomAccountDataEvent>>()?
.serialize(serde_json::value::Serializer)?,
})?;
self.write_str(&format!("Query completed in {query_time:?}:\n\n```rs\n{json}\n```"))
.await .await
} }
+14
View File
@@ -15,6 +15,10 @@ pub enum UsersCommand {
IterUsers2, IterUsers2,
PasswordHash {
user_id: OwnedUserId,
},
ListDevices { ListDevices {
user_id: OwnedUserId, user_id: OwnedUserId,
}, },
@@ -231,6 +235,16 @@ async fn count_users(&self) -> Result {
.await .await
} }
#[admin_command]
async fn password_hash(&self, user_id: OwnedUserId) -> Result {
let timer = tokio::time::Instant::now();
let result = self.services.users.password_hash(&user_id).await;
let query_time = timer.elapsed();
self.write_str(&format!("Query completed in {query_time:?}:\n\n```rs\n{result:#?}\n```"))
.await
}
#[admin_command] #[admin_command]
async fn list_devices(&self, user_id: OwnedUserId) -> Result { async fn list_devices(&self, user_id: OwnedUserId) -> Result {
let timer = tokio::time::Instant::now(); let timer = tokio::time::Instant::now();
+45 -122
View File
@@ -4,7 +4,8 @@ use std::{
}; };
use api::client::{ use api::client::{
full_user_deactivate, leave_room, recreate_push_rules_and_return, remote_leave_room, full_user_deactivate, join_room_by_id_helper, leave_room, recreate_push_rules_and_return,
remote_leave_room,
}; };
use conduwuit::{ use conduwuit::{
Err, Result, debug_warn, error, info, Err, Result, debug_warn, error, info,
@@ -23,7 +24,6 @@ use ruma::{
tag::{TagEvent, TagEventContent, TagInfo}, tag::{TagEvent, TagEventContent, TagInfo},
}, },
}; };
use service::users::HashedPassword;
use crate::{ use crate::{
admin_command, get_room_info, admin_command, get_room_info,
@@ -70,7 +70,7 @@ pub(super) async fn create_user(&self, username: String, password: Option<String
// Create user // Create user
self.services self.services
.users .users
.create(&user_id, Some(HashedPassword::new(&password)?)) .create(&user_id, Some(password.as_str()), None)
.await?; .await?;
// Default to pretty displayname // Default to pretty displayname
@@ -134,20 +134,18 @@ pub(super) async fn create_user(&self, username: String, password: Option<String
} }
if let Some(room_server_name) = room.server_name() { if let Some(room_server_name) = room.server_name() {
match self match join_room_by_id_helper(
.services self.services,
.rooms &user_id,
.membership &room_id,
.join_room( Some("Automatically joining this room upon registration".to_owned()),
&user_id, &[
&room_id, self.services.globals.server_name().to_owned(),
Some("Automatically joining this room upon registration".to_owned()), room_server_name.to_owned(),
&[ ],
self.services.globals.server_name().to_owned(), &None,
room_server_name.to_owned(), )
], .await
)
.await
{ {
| Ok(_response) => { | Ok(_response) => {
info!("Automatically joined room {room} for user {user_id}"); info!("Automatically joined room {room} for user {user_id}");
@@ -276,13 +274,17 @@ pub(super) async fn reset_password(
let new_password = password.unwrap_or_else(|| utils::random_string(AUTO_GEN_PASSWORD_LENGTH)); let new_password = password.unwrap_or_else(|| utils::random_string(AUTO_GEN_PASSWORD_LENGTH));
self.services match self
.services
.users .users
.set_password(&user_id, Some(HashedPassword::new(&new_password)?)); .set_password(&user_id, Some(new_password.as_str()))
.await
self.write_str(&format!( {
"Successfully reset the password for user {user_id}: `{new_password}`" | Err(e) => return Err!("Couldn't reset the password for user {user_id}: {e}"),
)) | Ok(()) => {
write!(self, "Successfully reset the password for user {user_id}: `{new_password}`")
},
}
.await?; .await?;
if logout { if logout {
@@ -429,82 +431,6 @@ pub(super) async fn deactivate_all(&self, no_leave_rooms: bool, force: bool) ->
.await .await
} }
#[admin_command]
pub(super) async fn list_invited_rooms(&self, user_id: String) -> Result {
// Validate user id
let user_id = parse_local_user_id(self.services, &user_id)?;
let mut rooms: Vec<((OwnedRoomId, u64, String), Result<OwnedUserId>)> = self
.services
.rooms
.state_cache
.rooms_invited(&user_id)
.then(async |(room_id, _)| {
let sender = self
.services
.rooms
.state_cache
.invite_sender(&user_id, &room_id)
.await;
(get_room_info(self.services, &room_id).await, sender)
})
.collect()
.await;
if rooms.is_empty() {
return Err!("User is not invited to any rooms.");
}
rooms.sort_by_key(|r| r.0.1);
rooms.reverse();
let body = rooms
.iter()
.map(|((id, members, name), sender)| match sender {
| Ok(user_id) =>
format!("{id}\tInviter: {user_id}\tMembers: {members}\tName: {name}"),
| Err(_) => format!("{id}\tMembers: {members}\tName: {name}"),
})
.collect::<Vec<_>>()
.join("\n");
self.write_str(&format!("Rooms {user_id} is Invited to ({}):\n```\n{body}\n```", rooms.len()))
.await
}
#[admin_command]
pub(super) async fn reject_all_invites(&self, user_id: String) -> Result {
let user_id = parse_local_user_id(self.services, &user_id)?;
assert!(
self.services.globals.user_is_local(&user_id),
"Parsed user_id must be a local user"
);
let fails = self
.services
.rooms
.state_cache
.rooms_invited(&user_id)
.filter_map(async |(room_id, _)| {
match leave_room(self.services, &user_id, &room_id, None).await {
| Err(ref e) => {
warn!(%user_id, "Failed to leave {room_id}: {e}");
Some(())
},
| Ok(()) => None,
}
})
.count()
.await;
if fails > 0 {
return Err!("{fails} invites could not be rejected");
}
self.write_str("Successfully rejected all invites.").await
}
#[admin_command] #[admin_command]
pub(super) async fn list_joined_rooms(&self, user_id: String) -> Result { pub(super) async fn list_joined_rooms(&self, user_id: String) -> Result {
// Validate user id // Validate user id
@@ -630,12 +556,15 @@ pub(super) async fn force_join_list_of_local_users(
let mut successful_joins: usize = 0; let mut successful_joins: usize = 0;
for user_id in user_ids { for user_id in user_ids {
match self match join_room_by_id_helper(
.services self.services,
.rooms &user_id,
.membership &room_id,
.join_room(&user_id, &room_id, Some(String::from(BULK_JOIN_REASON)), &servers) Some(String::from(BULK_JOIN_REASON)),
.await &servers,
&None,
)
.await
{ {
| Ok(_res) => { | Ok(_res) => {
successful_joins = successful_joins.saturating_add(1); successful_joins = successful_joins.saturating_add(1);
@@ -711,12 +640,15 @@ pub(super) async fn force_join_all_local_users(
.collect::<Vec<_>>() .collect::<Vec<_>>()
.await .await
{ {
match self match join_room_by_id_helper(
.services self.services,
.rooms user_id,
.membership &room_id,
.join_room(user_id, &room_id, Some(String::from(BULK_JOIN_REASON)), &servers) Some(String::from(BULK_JOIN_REASON)),
.await &servers,
&None,
)
.await
{ {
| Ok(_res) => { | Ok(_res) => {
successful_joins = successful_joins.saturating_add(1); successful_joins = successful_joins.saturating_add(1);
@@ -740,29 +672,20 @@ pub(super) async fn force_join_room(
&self, &self,
user_id: String, user_id: String,
room_id: OwnedRoomOrAliasId, room_id: OwnedRoomOrAliasId,
via: Option<String>,
) -> Result { ) -> Result {
let user_id = parse_local_user_id(self.services, &user_id)?; let user_id = parse_local_user_id(self.services, &user_id)?;
let (room_id, mut servers) = self let (room_id, servers) = self
.services .services
.rooms .rooms
.alias .alias
.resolve_with_servers(&room_id, None) .resolve_with_servers(&room_id, None)
.await?; .await?;
if let Some(via) = via.map(ServerName::parse).transpose()? {
servers.retain(|n| *n != via);
servers.insert(0, via);
}
assert!( assert!(
self.services.globals.user_is_local(&user_id), self.services.globals.user_is_local(&user_id),
"Parsed user_id must be a local user" "Parsed user_id must be a local user"
); );
self.services join_room_by_id_helper(self.services, &user_id, &room_id, None, &servers, &None).await?;
.rooms
.membership
.join_room(&user_id, &room_id, None, &servers)
.await?;
self.write_str(&format!("{user_id} has been joined to {room_id}.")) self.write_str(&format!("{user_id} has been joined to {room_id}."))
.await .await
-18
View File
@@ -160,17 +160,6 @@ pub enum UserCommand {
#[clap(alias = "list")] #[clap(alias = "list")]
ListUsers, ListUsers,
/// Lists all the rooms (local and remote) that the specified user is
/// invited to
ListInvitedRooms {
user_id: String,
},
/// Manually make a user reject all current invites
RejectAllInvites {
user_id: String,
},
/// Lists all the rooms (local and remote) that the specified user is /// Lists all the rooms (local and remote) that the specified user is
/// joined in /// joined in
ListJoinedRooms { ListJoinedRooms {
@@ -179,15 +168,8 @@ pub enum UserCommand {
/// Manually join a local user to a room. /// Manually join a local user to a room.
ForceJoinRoom { ForceJoinRoom {
/// The user to join
user_id: String, user_id: String,
/// The room to join
room_id: OwnedRoomOrAliasId, room_id: OwnedRoomOrAliasId,
/// The server name to join via.
///
/// This server will always be tried first, however if more are
/// available, they may be tried after.
via: Option<String>,
}, },
/// Manually leave a local user from a room. /// Manually leave a local user from a room.
+1 -1
View File
@@ -48,7 +48,7 @@ pub(crate) fn parse_local_user_id(services: &Services, user_id: &str) -> Result<
Ok(user_id) Ok(user_id)
} }
/// Parses user ID that is an active (not deactivated) local user /// Parses user ID that is an active (not guest or deactivated) local user
pub(crate) async fn parse_active_local_user_id( pub(crate) async fn parse_active_local_user_id(
services: &Services, services: &Services,
user_id: &str, user_id: &str,
+7 -1
View File
@@ -29,6 +29,10 @@ gzip_compression = [
"conduwuit-service/gzip_compression", "conduwuit-service/gzip_compression",
"reqwest/gzip", "reqwest/gzip",
] ]
http3 = [
"conduwuit-core/http3",
"conduwuit-service/http3",
]
io_uring = [ io_uring = [
"conduwuit-service/io_uring", "conduwuit-service/io_uring",
] ]
@@ -48,6 +52,9 @@ jemalloc_stats = [
"conduwuit-core/jemalloc_stats", "conduwuit-core/jemalloc_stats",
"conduwuit-service/jemalloc_stats", "conduwuit-service/jemalloc_stats",
] ]
ldap = [
"conduwuit-service/ldap"
]
release_max_log_level = [ release_max_log_level = [
"conduwuit-core/release_max_log_level", "conduwuit-core/release_max_log_level",
"conduwuit-service/release_max_log_level", "conduwuit-service/release_max_log_level",
@@ -74,7 +81,6 @@ conduwuit-macros.workspace = true
conduwuit-service.workspace = true conduwuit-service.workspace = true
const-str.workspace = true const-str.workspace = true
ctor.workspace = true ctor.workspace = true
dtor.workspace = true
futures.workspace = true futures.workspace = true
hmac.workspace = true hmac.workspace = true
http.workspace = true http.workspace = true
+1 -1
View File
@@ -13,7 +13,7 @@ pub(crate) async fn ban_room(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<rooms::ban::v1::Request>, body: Ruma<rooms::ban::v1::Request>,
) -> Result<rooms::ban::v1::Response> { ) -> Result<rooms::ban::v1::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
if !services.users.is_admin(sender_user).await { if !services.users.is_admin(sender_user).await {
return Err!(Request(Forbidden("Only server administrators can use this endpoint"))); return Err!(Request(Forbidden("Only server administrators can use this endpoint")));
} }
+1 -1
View File
@@ -13,7 +13,7 @@ pub(crate) async fn list_rooms(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<rooms::list::v1::Request>, body: Ruma<rooms::list::v1::Request>,
) -> Result<rooms::list::v1::Response> { ) -> Result<rooms::list::v1::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
if !services.users.is_admin(sender_user).await { if !services.users.is_admin(sender_user).await {
return Err!(Request(Forbidden("Only server administrators can use this endpoint"))); return Err!(Request(Forbidden("Only server administrators can use this endpoint")));
} }
+35 -36
View File
@@ -1,5 +1,5 @@
use axum::extract::State; use axum::extract::State;
use axum_client_ip::ClientIp; use axum_client_ip::InsecureClientIp;
use conduwuit::{ use conduwuit::{
Err, Result, err, info, Err, Result, err, info,
pdu::PartialPdu, pdu::PartialPdu,
@@ -24,10 +24,10 @@ use ruma::{
power_levels::RoomPowerLevelsEventContent, power_levels::RoomPowerLevelsEventContent,
}, },
}; };
use service::{mailer::messages, uiaa::Identity, users::HashedPassword}; use service::{mailer::messages, uiaa::Identity};
use super::{DEVICE_ID_LENGTH, TOKEN_LENGTH}; use super::{DEVICE_ID_LENGTH, TOKEN_LENGTH, join_room_by_id_helper};
use crate::{Ruma, router::ClientIdentity}; use crate::Ruma;
pub(crate) mod register; pub(crate) mod register;
pub(crate) mod threepid; pub(crate) mod threepid;
@@ -46,7 +46,7 @@ pub(crate) mod threepid;
#[tracing::instrument(skip_all, fields(%client), name = "register_available", level = "info")] #[tracing::instrument(skip_all, fields(%client), name = "register_available", level = "info")]
pub(crate) async fn get_register_available_route( pub(crate) async fn get_register_available_route(
State(services): State<crate::State>, State(services): State<crate::State>,
ClientIp(client): ClientIp, InsecureClientIp(client): InsecureClientIp,
body: Ruma<get_username_availability::v3::Request>, body: Ruma<get_username_availability::v3::Request>,
) -> Result<get_username_availability::v3::Response> { ) -> Result<get_username_availability::v3::Response> {
// Validate user id // Validate user id
@@ -75,11 +75,13 @@ pub(crate) async fn get_register_available_route(
return Err!(Request(UserInUse("User ID is not available."))); return Err!(Request(UserInUse("User ID is not available.")));
} }
if let Some(ClientIdentity::Appservice { appservice_info, .. }) = &body.identity if let Some(ref info) = body.appservice_info {
&& !appservice_info.is_user_match(&user_id) if !info.is_user_match(&user_id) {
{ return Err!(Request(Exclusive("Username is not in an appservice namespace.")));
return Err!(Request(Exclusive("Username is not in an appservice namespace."))); }
} else if services.appservice.is_exclusive_user_id(&user_id).await { }
if services.appservice.is_exclusive_user_id(&user_id).await {
return Err!(Request(Exclusive("Username is reserved by an appservice."))); return Err!(Request(Exclusive("Username is reserved by an appservice.")));
} }
@@ -106,11 +108,10 @@ pub(crate) async fn get_register_available_route(
#[tracing::instrument(skip_all, fields(%client), name = "change_password", level = "info")] #[tracing::instrument(skip_all, fields(%client), name = "change_password", level = "info")]
pub(crate) async fn change_password_route( pub(crate) async fn change_password_route(
State(services): State<crate::State>, State(services): State<crate::State>,
ClientIp(client): ClientIp, InsecureClientIp(client): InsecureClientIp,
body: Ruma<change_password::v3::Request>, body: Ruma<change_password::v3::Request>,
) -> Result<change_password::v3::Response> { ) -> Result<change_password::v3::Response> {
let identity = if let Some(user_id) = body.identity.as_ref().map(ClientIdentity::sender_user) let identity = if let Some(ref user_id) = body.sender_user {
{
// A signed-in user is trying to change their password, prompt them for their // A signed-in user is trying to change their password, prompt them for their
// existing one // existing one
@@ -149,19 +150,15 @@ pub(crate) async fn change_password_route(
services services
.users .users
.set_password(&sender_user, Some(HashedPassword::new(&body.new_password)?)); .set_password(&sender_user, Some(&body.new_password))
.await?;
if body.logout_devices { if body.logout_devices {
// Logout all devices except the current one // Logout all devices except the current one
services services
.users .users
.all_device_ids(&sender_user) .all_device_ids(&sender_user)
.ready_filter(|id| { .ready_filter(|id| *id != body.sender_device())
body.identity
.as_ref()
.and_then(|identity| identity.sender_device())
.is_none_or(|sender_device| sender_device != *id)
})
.for_each(async |id| services.users.remove_device(&sender_user, &id).await) .for_each(async |id| services.users.remove_device(&sender_user, &id).await)
.await; .await;
@@ -177,12 +174,7 @@ pub(crate) async fn change_password_route(
.await .await
.ok() .ok()
.as_ref() .as_ref()
.is_some_and(|pusher_device| { .is_some_and(|pusher_device| pusher_device != body.sender_device())
body.identity
.as_ref()
.and_then(|identity| identity.sender_device())
.is_none_or(|sender_device| sender_device != *pusher_device)
})
.then_some(pushkey) .then_some(pushkey)
}) })
.for_each(async |pushkey| { .for_each(async |pushkey| {
@@ -196,7 +188,7 @@ pub(crate) async fn change_password_route(
if services.server.config.admin_room_notices { if services.server.config.admin_room_notices {
services services
.admin .admin
.notice(&format!("User {sender_user} changed their password.")) .notice(&format!("User {} changed their password.", &sender_user))
.await; .await;
} }
@@ -247,14 +239,20 @@ pub(crate) async fn request_password_change_token_via_email_route(
/// ///
/// Note: Also works for Application Services /// Note: Also works for Application Services
pub(crate) async fn whoami_route( pub(crate) async fn whoami_route(
State(_): State<crate::State>, State(services): State<crate::State>,
body: Ruma<whoami::v3::Request>, body: Ruma<whoami::v3::Request>,
) -> Result<whoami::v3::Response> { ) -> Result<whoami::v3::Response> {
Ok( let is_guest = services
assign!(whoami::v3::Response::new(body.identity.sender_user().to_owned(), false), { .users
device_id: body.identity.sender_device().map(ToOwned::to_owned), .is_deactivated(body.sender_user())
}), .await
) .map_err(|_| {
err!(Request(Forbidden("Application service has not registered this user.")))
})? && body.appservice_info.is_none();
Ok(assign!(whoami::v3::Response::new(body.sender_user().to_owned(), is_guest), {
device_id: body.sender_device.clone(),
}))
} }
/// # `POST /_matrix/client/r0/account/deactivate` /// # `POST /_matrix/client/r0/account/deactivate`
@@ -271,15 +269,14 @@ pub(crate) async fn whoami_route(
#[tracing::instrument(skip_all, fields(%client), name = "deactivate", level = "info")] #[tracing::instrument(skip_all, fields(%client), name = "deactivate", level = "info")]
pub(crate) async fn deactivate_route( pub(crate) async fn deactivate_route(
State(services): State<crate::State>, State(services): State<crate::State>,
ClientIp(client): ClientIp, InsecureClientIp(client): InsecureClientIp,
body: Ruma<deactivate::v3::Request>, body: Ruma<deactivate::v3::Request>,
) -> Result<deactivate::v3::Response> { ) -> Result<deactivate::v3::Response> {
// Authentication for this endpoint is technically optional, // Authentication for this endpoint is technically optional,
// but we require the user to be logged in // but we require the user to be logged in
let sender_user = body let sender_user = body
.identity .sender_user
.as_ref() .as_ref()
.map(ClientIdentity::sender_user)
.ok_or_else(|| err!(Request(MissingToken("Missing access token."))))?; .ok_or_else(|| err!(Request(MissingToken("Missing access token."))))?;
// Prompt the user to confirm with their password using UIAA // Prompt the user to confirm with their password using UIAA
@@ -334,6 +331,8 @@ pub(crate) async fn check_registration_token_validity(
/// Runs through all the deactivation steps: /// Runs through all the deactivation steps:
/// ///
/// - Mark as deactivated /// - Mark as deactivated
/// - Removing display name
/// - Removing avatar URL and blurhash
/// - Removing all profile data /// - Removing all profile data
/// - Leaving all rooms (and forgets all of them) /// - Leaving all rooms (and forgets all of them)
pub async fn full_user_deactivate( pub async fn full_user_deactivate(
+161 -69
View File
@@ -1,7 +1,7 @@
use std::{collections::HashMap, fmt::Write}; use std::{collections::HashMap, fmt::Write};
use axum::extract::State; use axum::extract::State;
use axum_client_ip::ClientIp; use axum_client_ip::InsecureClientIp;
use conduwuit::{ use conduwuit::{
Err, Result, debug_info, error, info, Err, Result, debug_info, error, info,
utils::{self}, utils::{self},
@@ -10,11 +10,12 @@ use conduwuit::{
use conduwuit_service::Services; use conduwuit_service::Services;
use futures::{FutureExt, StreamExt}; use futures::{FutureExt, StreamExt};
use lettre::{Address, message::Mailbox}; use lettre::{Address, message::Mailbox};
use register::RegistrationKind;
use ruma::{ use ruma::{
OwnedUserId, UserId, OwnedUserId, UserId,
api::client::{ api::client::{
account::{ account::{
register::{self, LoginType, RegistrationKind}, register::{self, LoginType},
request_registration_token_via_email, request_registration_token_via_email,
}, },
uiaa::{AuthFlow, AuthType}, uiaa::{AuthFlow, AuthType},
@@ -27,9 +28,9 @@ use ruma::{
push, push,
}; };
use serde_json::value::RawValue; use serde_json::value::RawValue;
use service::{mailer::messages, users::HashedPassword}; use service::mailer::messages;
use super::{DEVICE_ID_LENGTH, TOKEN_LENGTH}; use super::{DEVICE_ID_LENGTH, TOKEN_LENGTH, join_room_by_id_helper};
use crate::Ruma; use crate::Ruma;
const RANDOM_USER_ID_LENGTH: usize = 10; const RANDOM_USER_ID_LENGTH: usize = 10;
@@ -41,17 +42,24 @@ const RANDOM_USER_ID_LENGTH: usize = 10;
/// You can use [`GET /// You can use [`GET
/// /_matrix/client/v3/register/available`](fn.get_register_available_route. /// /_matrix/client/v3/register/available`](fn.get_register_available_route.
/// html) to check if the user id is valid and available. /// html) to check if the user id is valid and available.
///
/// - Only works if registration is enabled
/// - If type is guest: ignores all parameters except
/// initial_device_display_name
/// - If sender is not appservice: Requires UIAA (but we only use a dummy stage)
/// - If type is not guest and no username is given: Always fails after UIAA
/// check
/// - Creates a new account and populates it with default account data
/// - If `inhibit_login` is false: Creates a device and returns device id and
/// access_token
#[allow(clippy::doc_markdown)] #[allow(clippy::doc_markdown)]
#[tracing::instrument(skip_all, fields(%client), name = "register", level = "info")] #[tracing::instrument(skip_all, fields(%client), name = "register", level = "info")]
pub(crate) async fn register_route( pub(crate) async fn register_route(
State(services): State<crate::State>, State(services): State<crate::State>,
ClientIp(client): ClientIp, InsecureClientIp(client): InsecureClientIp,
body: Ruma<register::v3::Request>, body: Ruma<register::v3::Request>,
) -> Result<register::v3::Response> { ) -> Result<register::v3::Response> {
if body.kind != RegistrationKind::User { let is_guest = body.kind == RegistrationKind::Guest;
return Err!(Request(GuestAccessForbidden("Guests may not register on this server.")));
}
let emergency_mode_enabled = services.config.emergency_password.is_some(); let emergency_mode_enabled = services.config.emergency_password.is_some();
// Allow registration if it's enabled in the config file or if this is the first // Allow registration if it's enabled in the config file or if this is the first
@@ -59,20 +67,70 @@ pub(crate) async fn register_route(
let allow_registration = let allow_registration =
services.config.allow_registration || services.firstrun.is_first_run(); services.config.allow_registration || services.firstrun.is_first_run();
if !allow_registration && body.identity.is_none() { if !allow_registration && body.appservice_info.is_none() {
info!( match (body.username.as_ref(), body.initial_device_display_name.as_ref()) {
?body.username, | (Some(username), Some(device_display_name)) => {
?body.initial_device_display_name, info!(
"Rejecting registration attempt as registration is disabled" %is_guest,
); user = %username,
device_name = %device_display_name,
"Rejecting registration attempt as registration is disabled"
);
},
| (Some(username), _) => {
info!(
%is_guest,
user = %username,
"Rejecting registration attempt as registration is disabled"
);
},
| (_, Some(device_display_name)) => {
info!(
%is_guest,
device_name = %device_display_name,
"Rejecting registration attempt as registration is disabled"
);
},
| (None, _) => {
info!(
%is_guest,
"Rejecting registration attempt as registration is disabled"
);
},
}
return Err!(Request(Forbidden( return Err!(Request(Forbidden(
"This server is not accepting registrations at this time." "This server is not accepting registrations at this time."
))); )));
} }
let identity = if body.identity.is_some() { if is_guest && !services.config.allow_guest_registration {
// Appservices can skip auth info!(
"Guest registration disabled, rejecting guest registration attempt, initial device \
name: \"{}\"",
body.initial_device_display_name.as_deref().unwrap_or("")
);
return Err!(Request(GuestAccessForbidden("Guest registration is disabled.")));
}
// forbid guests from registering if there is not a real admin user yet. give
// generic user error.
if is_guest && services.firstrun.is_first_run() {
warn!(
"Guest account attempted to register before a real admin user has been registered, \
rejecting registration. Guest's initial device name: \"{}\"",
body.initial_device_display_name.as_deref().unwrap_or("")
);
return Err!(Request(Forbidden(
"This server is not accepting registrations at this time."
)));
}
// Appeservices and guests get to skip auth
let skip_auth = body.appservice_info.is_some() || is_guest;
let identity = if skip_auth {
// Appservices and guests have no identity
None None
} else { } else {
// Perform UIAA to determine the user's identity // Perform UIAA to determine the user's identity
@@ -99,15 +157,19 @@ pub(crate) async fn register_route(
} }
}); });
let user_id = let user_id = determine_registration_user_id(
determine_registration_user_id(&services, supplied_username, emergency_mode_enabled) &services,
.await?; supplied_username,
is_guest,
emergency_mode_enabled,
)
.await?;
if body.body.login_type == Some(LoginType::ApplicationService) { if body.body.login_type == Some(LoginType::ApplicationService) {
// For appservice logins, make sure that the user ID is in the appservice's // For appservice logins, make sure that the user ID is in the appservice's
// namespace // namespace
match body.identity { match body.appservice_info {
| Some(ref info) => | Some(ref info) =>
if !info.is_user_match(&user_id) && !emergency_mode_enabled { if !info.is_user_match(&user_id) && !emergency_mode_enabled {
return Err!(Request(Exclusive( return Err!(Request(Exclusive(
@@ -125,22 +187,18 @@ pub(crate) async fn register_route(
return Err!(Request(Exclusive("Username is reserved by an appservice."))); return Err!(Request(Exclusive("Username is reserved by an appservice.")));
} }
let password = if body.identity.is_some() { let password = if is_guest { None } else { body.password.as_deref() };
None
} else if let Some(password) = body.password.as_deref() {
Some(HashedPassword::new(password)?)
} else {
return Err!(Request(InvalidParam("A password must be provided")));
};
// Create user // Create user
services.users.create(&user_id, password).await?; services.users.create(&user_id, password, None).await?;
// Set an initial display name // Set an initial display name
let mut displayname = user_id.localpart().to_owned(); let mut displayname = user_id.localpart().to_owned();
// Apply the new user displayname suffix, if it's set // Apply the new user displayname suffix, if it's set
if !services.globals.new_user_displayname_suffix().is_empty() && body.identity.is_none() { if !services.globals.new_user_displayname_suffix().is_empty()
&& body.appservice_info.is_none()
{
write!(displayname, " {}", services.server.config.new_user_displayname_suffix)?; write!(displayname, " {}", services.server.config.new_user_displayname_suffix)?;
} }
@@ -164,9 +222,7 @@ pub(crate) async fn register_route(
// Generate new device id if the user didn't specify one // Generate new device id if the user didn't specify one
let (token, device) = if !body.inhibit_login { let (token, device) = if !body.inhibit_login {
let device_id = body let device_id = if is_guest { None } else { body.device_id.clone() }
.device_id
.clone()
.unwrap_or_else(|| utils::random_string(DEVICE_ID_LENGTH).into()); .unwrap_or_else(|| utils::random_string(DEVICE_ID_LENGTH).into());
// Generate new token for the device // Generate new token for the device
@@ -207,7 +263,8 @@ pub(crate) async fn register_route(
let device_display_name = body.initial_device_display_name.as_deref().unwrap_or(""); let device_display_name = body.initial_device_display_name.as_deref().unwrap_or("");
if body.identity.is_none() { // log in conduit admin channel if a non-guest user registered
if body.appservice_info.is_none() && !is_guest {
if !device_display_name.is_empty() { if !device_display_name.is_empty() {
let notice = format!( let notice = format!(
"New user \"{user_id}\" registered on this server from IP {client} and device \ "New user \"{user_id}\" registered on this server from IP {client} and device \
@@ -228,32 +285,65 @@ pub(crate) async fn register_route(
} }
} }
// Make the first user to register an administrator and disable first-run mode. // log in conduit admin channel if a guest registered
let was_first_user = services.firstrun.empower_first_user(&user_id).await?; if body.appservice_info.is_none() && is_guest && services.config.log_guest_registrations {
debug_info!("New guest user \"{user_id}\" registered on this server.");
// If the registering user was not the first and we're suspending users on if !device_display_name.is_empty() {
// register, suspend them. if services.server.config.admin_room_notices {
if !was_first_user && services.config.suspend_on_register { services
// Note that we can still do auto joins for suspended users .admin
services .notice(&format!(
.users "Guest user \"{user_id}\" with device display name \
.suspend_account(&user_id, &services.globals.server_user) \"{device_display_name}\" registered on this server from IP {client}"
.await; ))
// And send an @room notice to the admin room, to prompt admins to review the .await;
// new user and ideally unsuspend them if deemed appropriate. }
if services.server.config.admin_room_notices { } else {
services #[allow(clippy::collapsible_else_if)]
.admin if services.server.config.admin_room_notices {
.send_loud_message(RoomMessageEventContent::text_plain(format!( services
"User {user_id} has been suspended as they are not the first user on this \ .admin
server. Please review and unsuspend them if appropriate." .notice(&format!(
))) "Guest user \"{user_id}\" with no device display name registered on \
.await this server from IP {client}",
.ok(); ))
.await;
}
} }
} }
if body.identity.is_none() && !services.server.config.auto_join_rooms.is_empty() { if !is_guest {
// Make the first user to register an administrator and disable first-run mode.
let was_first_user = services.firstrun.empower_first_user(&user_id).await?;
// If the registering user was not the first and we're suspending users on
// register, suspend them.
if !was_first_user && services.config.suspend_on_register {
// Note that we can still do auto joins for suspended users
services
.users
.suspend_account(&user_id, &services.globals.server_user)
.await;
// And send an @room notice to the admin room, to prompt admins to review the
// new user and ideally unsuspend them if deemed appropriate.
if services.server.config.admin_room_notices {
services
.admin
.send_loud_message(RoomMessageEventContent::text_plain(format!(
"User {user_id} has been suspended as they are not the first user on \
this server. Please review and unsuspend them if appropriate."
)))
.await
.ok();
}
}
}
if body.appservice_info.is_none()
&& !services.server.config.auto_join_rooms.is_empty()
&& (services.config.allow_guests_auto_join_rooms || !is_guest)
{
for room in &services.server.config.auto_join_rooms { for room in &services.server.config.auto_join_rooms {
let Ok(room_id) = services.rooms.alias.resolve(room).await else { let Ok(room_id) = services.rooms.alias.resolve(room).await else {
error!( error!(
@@ -276,17 +366,16 @@ pub(crate) async fn register_route(
} }
if let Some(room_server_name) = room.server_name() { if let Some(room_server_name) = room.server_name() {
match services match join_room_by_id_helper(
.rooms &services,
.membership &user_id,
.join_room( &room_id,
&user_id, Some("Automatically joining this room upon registration".to_owned()),
&room_id, &[services.globals.server_name().to_owned(), room_server_name.to_owned()],
Some("Automatically joining this room upon registration".to_owned()), &body.appservice_info,
&[services.globals.server_name().to_owned(), room_server_name.to_owned()], )
) .boxed()
.boxed() .await
.await
{ {
| Err(e) => { | Err(e) => {
// don't return this error so we don't fail registrations // don't return this error so we don't fail registrations
@@ -422,9 +511,12 @@ async fn create_registration_uiaa_session(
async fn determine_registration_user_id( async fn determine_registration_user_id(
services: &Services, services: &Services,
supplied_username: Option<String>, supplied_username: Option<String>,
is_guest: bool,
emergency_mode_enabled: bool, emergency_mode_enabled: bool,
) -> Result<OwnedUserId> { ) -> Result<OwnedUserId> {
if let Some(supplied_username) = supplied_username { if let Some(supplied_username) = supplied_username
&& !is_guest
{
// The user gets to pick their username. Do some validation to make sure it's // The user gets to pick their username. Do some validation to make sure it's
// acceptable. // acceptable.
@@ -477,7 +569,7 @@ async fn determine_registration_user_id(
Ok(user_id) Ok(user_id)
} else { } else {
// The user didn't specify a username. Generate a username for // The user is a guest or didn't specify a username. Generate a username for
// them. // them.
loop { loop {
+9 -28
View File
@@ -13,7 +13,7 @@ use ruma::{
}; };
use service::{mailer::messages, uiaa::Identity}; use service::{mailer::messages, uiaa::Identity};
use crate::{Ruma, router::ClientIdentity}; use crate::Ruma;
/// # `GET _matrix/client/v3/account/3pid` /// # `GET _matrix/client/v3/account/3pid`
/// ///
@@ -22,7 +22,7 @@ pub(crate) async fn third_party_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<get_3pids::v3::Request>, body: Ruma<get_3pids::v3::Request>,
) -> Result<get_3pids::v3::Response> { ) -> Result<get_3pids::v3::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
let mut threepids = vec![]; let mut threepids = vec![];
if let Some(email) = services if let Some(email) = services
@@ -53,18 +53,6 @@ pub(crate) async fn request_3pid_management_token_via_email_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<request_3pid_management_token_via_email::v3::Request>, body: Ruma<request_3pid_management_token_via_email::v3::Request>,
) -> Result<request_3pid_management_token_via_email::v3::Response> { ) -> Result<request_3pid_management_token_via_email::v3::Response> {
// Authentication for this endpoint is technically optional,
// but we require the user to be logged in
let sender_user = body
.identity
.as_ref()
.map(ClientIdentity::sender_user)
.ok_or_else(|| err!(Request(MissingToken("Missing access token."))))?;
if !services.threepid.email_requirement().may_change() {
return Err!(Request(Forbidden("You may not change your email address.")));
}
let Ok(email) = Address::try_from(body.email.clone()) else { let Ok(email) = Address::try_from(body.email.clone()) else {
return Err!(Request(InvalidParam("Invalid email address."))); return Err!(Request(InvalidParam("Invalid email address.")));
}; };
@@ -84,7 +72,7 @@ pub(crate) async fn request_3pid_management_token_via_email_route(
Mailbox::new(None, email), Mailbox::new(None, email),
|verification_link| messages::ChangeEmail { |verification_link| messages::ChangeEmail {
server_name: services.config.server_name.as_str(), server_name: services.config.server_name.as_str(),
user_id: Some(sender_user), user_id: body.sender_user.as_deref(),
verification_link, verification_link,
}, },
&body.client_secret, &body.client_secret,
@@ -115,17 +103,12 @@ pub(crate) async fn add_3pid_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<add_3pid::v3::Request>, body: Ruma<add_3pid::v3::Request>,
) -> Result<add_3pid::v3::Response> { ) -> Result<add_3pid::v3::Response> {
if !services.threepid.email_requirement().may_change() { let sender_user = body.sender_user();
return Err!(Request(Forbidden("You may not change your email address.")));
}
// Require password auth to add an email // Require password auth to add an email
let _ = services let _ = services
.uiaa .uiaa
.authenticate_password( .authenticate_password(&body.auth, Some(Identity::from_user_id(sender_user)))
&body.auth,
Some(Identity::from_user_id(body.identity.sender_user())),
)
.await?; .await?;
let email = services let email = services
@@ -136,7 +119,7 @@ pub(crate) async fn add_3pid_route(
services services
.threepid .threepid
.associate_localpart_email(body.identity.sender_user().localpart(), &email) .associate_localpart_email(sender_user.localpart(), &email)
.await?; .await?;
Ok(add_3pid::v3::Response::new()) Ok(add_3pid::v3::Response::new())
@@ -147,17 +130,15 @@ pub(crate) async fn delete_3pid_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<delete_3pid::v3::Request>, body: Ruma<delete_3pid::v3::Request>,
) -> Result<delete_3pid::v3::Response> { ) -> Result<delete_3pid::v3::Response> {
let sender_user = body.sender_user();
if body.medium != Medium::Email { if body.medium != Medium::Email {
return Ok(delete_3pid::v3::Response::new(ThirdPartyIdRemovalStatus::NoSupport)); return Ok(delete_3pid::v3::Response::new(ThirdPartyIdRemovalStatus::NoSupport));
} }
if !services.threepid.email_requirement().may_remove() {
return Err!(Request(Forbidden("You may not remove your email address.")));
}
if services if services
.threepid .threepid
.disassociate_localpart_email(body.identity.sender_user().localpart()) .disassociate_localpart_email(sender_user.localpart())
.await .await
.is_none() .is_none()
{ {
+8 -8
View File
@@ -22,9 +22,9 @@ pub(crate) async fn set_global_account_data_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<set_global_account_data::v3::Request>, body: Ruma<set_global_account_data::v3::Request>,
) -> Result<set_global_account_data::v3::Response> { ) -> Result<set_global_account_data::v3::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
if sender_user != body.user_id && !body.identity.is_appservice() { if sender_user != body.user_id && body.appservice_info.is_none() {
return Err!(Request(Forbidden("You cannot set account data for other users."))); return Err!(Request(Forbidden("You cannot set account data for other users.")));
} }
@@ -47,9 +47,9 @@ pub(crate) async fn set_room_account_data_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<set_room_account_data::v3::Request>, body: Ruma<set_room_account_data::v3::Request>,
) -> Result<set_room_account_data::v3::Response> { ) -> Result<set_room_account_data::v3::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
if sender_user != body.user_id && !body.identity.is_appservice() { if sender_user != body.user_id && body.appservice_info.is_none() {
return Err!(Request(Forbidden("You cannot set account data for other users."))); return Err!(Request(Forbidden("You cannot set account data for other users.")));
} }
@@ -72,9 +72,9 @@ pub(crate) async fn get_global_account_data_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<get_global_account_data::v3::Request>, body: Ruma<get_global_account_data::v3::Request>,
) -> Result<get_global_account_data::v3::Response> { ) -> Result<get_global_account_data::v3::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
if sender_user != body.user_id && !body.identity.is_appservice() { if sender_user != body.user_id && body.appservice_info.is_none() {
return Err!(Request(Forbidden("You cannot get account data of other users."))); return Err!(Request(Forbidden("You cannot get account data of other users.")));
} }
@@ -94,9 +94,9 @@ pub(crate) async fn get_room_account_data_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<get_room_account_data::v3::Request>, body: Ruma<get_room_account_data::v3::Request>,
) -> Result<get_room_account_data::v3::Response> { ) -> Result<get_room_account_data::v3::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
if sender_user != body.user_id && !body.identity.is_appservice() { if sender_user != body.user_id && body.appservice_info.is_none() {
return Err!(Request(Forbidden("You cannot get account data of other users."))); return Err!(Request(Forbidden("You cannot get account data of other users.")));
} }
+5 -6
View File
@@ -12,11 +12,10 @@ pub(crate) async fn get_suspended_status(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<get_suspended::v1::Request>, body: Ruma<get_suspended::v1::Request>,
) -> Result<get_suspended::v1::Response> { ) -> Result<get_suspended::v1::Response> {
let (admin, active) = join( let sender_user = body.sender_user();
services.users.is_admin(body.identity.sender_user()),
services.users.is_active(&body.user_id), let (admin, active) =
) join(services.users.is_admin(sender_user), services.users.is_active(&body.user_id)).await;
.await;
if !admin { if !admin {
return Err!(Request(Forbidden("Only server administrators can use this endpoint"))); return Err!(Request(Forbidden("Only server administrators can use this endpoint")));
} }
@@ -38,7 +37,7 @@ pub(crate) async fn put_suspended_status(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<set_suspended::v1::Request>, body: Ruma<set_suspended::v1::Request>,
) -> Result<set_suspended::v1::Response> { ) -> Result<set_suspended::v1::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
let (sender_admin, active, target_admin) = join3( let (sender_admin, active, target_admin) = join3(
services.users.is_admin(sender_user), services.users.is_admin(sender_user),
+4 -4
View File
@@ -11,7 +11,7 @@ pub(crate) async fn create_alias_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<create_alias::v3::Request>, body: Ruma<create_alias::v3::Request>,
) -> Result<create_alias::v3::Response> { ) -> Result<create_alias::v3::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
if services.users.is_suspended(sender_user).await? { if services.users.is_suspended(sender_user).await? {
return Err!(Request(UserSuspended("You cannot perform this action while suspended."))); return Err!(Request(UserSuspended("You cannot perform this action while suspended.")));
} }
@@ -19,7 +19,7 @@ pub(crate) async fn create_alias_route(
services services
.rooms .rooms
.alias .alias
.appservice_checks(&body.room_alias, body.identity.appservice_info()) .appservice_checks(&body.room_alias, &body.appservice_info)
.await?; .await?;
// this isn't apart of alias_checks or delete alias route because we should // this isn't apart of alias_checks or delete alias route because we should
@@ -59,7 +59,7 @@ pub(crate) async fn delete_alias_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<delete_alias::v3::Request>, body: Ruma<delete_alias::v3::Request>,
) -> Result<delete_alias::v3::Response> { ) -> Result<delete_alias::v3::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
if services.users.is_suspended(sender_user).await? { if services.users.is_suspended(sender_user).await? {
return Err!(Request(UserSuspended("You cannot perform this action while suspended."))); return Err!(Request(UserSuspended("You cannot perform this action while suspended.")));
} }
@@ -67,7 +67,7 @@ pub(crate) async fn delete_alias_route(
services services
.rooms .rooms
.alias .alias
.appservice_checks(&body.room_alias, body.identity.appservice_info()) .appservice_checks(&body.room_alias, &body.appservice_info)
.await?; .await?;
services services
+4 -2
View File
@@ -1,5 +1,5 @@
use axum::extract::State; use axum::extract::State;
use conduwuit::{Err, Result}; use conduwuit::{Err, Result, err};
use ruma::{ use ruma::{
api::{appservice::ping, client::appservice::request_ping}, api::{appservice::ping, client::appservice::request_ping},
assign, assign,
@@ -15,7 +15,9 @@ pub(crate) async fn appservice_ping(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<request_ping::v1::Request>, body: Ruma<request_ping::v1::Request>,
) -> Result<request_ping::v1::Response> { ) -> Result<request_ping::v1::Response> {
let appservice_info = &body.identity; let appservice_info = body.appservice_info.as_ref().ok_or_else(|| {
err!(Request(Forbidden("This endpoint can only be called by appservices.")))
})?;
if body.appservice_id != appservice_info.registration.id { if body.appservice_id != appservice_info.registration.id {
return Err!(Request(Forbidden( return Err!(Request(Forbidden(
+26 -50
View File
@@ -25,7 +25,7 @@ pub(crate) async fn create_backup_version_route(
) -> Result<create_backup_version::v3::Response> { ) -> Result<create_backup_version::v3::Response> {
let version = services let version = services
.key_backups .key_backups
.create_backup(body.identity.sender_user(), &body.algorithm)?; .create_backup(body.sender_user(), &body.algorithm)?;
Ok(create_backup_version::v3::Response::new(version)) Ok(create_backup_version::v3::Response::new(version))
} }
@@ -40,7 +40,7 @@ pub(crate) async fn update_backup_version_route(
) -> Result<update_backup_version::v3::Response> { ) -> Result<update_backup_version::v3::Response> {
services services
.key_backups .key_backups
.update_backup(body.identity.sender_user(), &body.version, &body.algorithm) .update_backup(body.sender_user(), &body.version, &body.algorithm)
.await?; .await?;
Ok(update_backup_version::v3::Response::new()) Ok(update_backup_version::v3::Response::new())
@@ -55,11 +55,11 @@ pub(crate) async fn get_latest_backup_info_route(
) -> Result<get_latest_backup_info::v3::Response> { ) -> Result<get_latest_backup_info::v3::Response> {
let (version, algorithm) = services let (version, algorithm) = services
.key_backups .key_backups
.get_latest_backup(body.identity.sender_user()) .get_latest_backup(body.sender_user())
.await .await
.map_err(|_| err!(Request(NotFound("Key backup does not exist."))))?; .map_err(|_| err!(Request(NotFound("Key backup does not exist."))))?;
let (count, etag) = get_count_etag(&services, body.identity.sender_user(), &version).await; let (count, etag) = get_count_etag(&services, body.sender_user(), &version).await;
Ok(get_latest_backup_info::v3::Response::new(algorithm, count, etag, version)) Ok(get_latest_backup_info::v3::Response::new(algorithm, count, etag, version))
} }
@@ -73,14 +73,13 @@ pub(crate) async fn get_backup_info_route(
) -> Result<get_backup_info::v3::Response> { ) -> Result<get_backup_info::v3::Response> {
let algorithm = services let algorithm = services
.key_backups .key_backups
.get_backup(body.identity.sender_user(), &body.version) .get_backup(body.sender_user(), &body.version)
.await .await
.map_err(|_| { .map_err(|_| {
err!(Request(NotFound("Key backup does not exist at version {:?}", body.version))) err!(Request(NotFound("Key backup does not exist at version {:?}", body.version)))
})?; })?;
let (count, etag) = let (count, etag) = get_count_etag(&services, body.sender_user(), &body.version).await;
get_count_etag(&services, body.identity.sender_user(), &body.version).await;
Ok(get_backup_info::v3::Response::new(algorithm, count, etag, body.version.clone())) Ok(get_backup_info::v3::Response::new(algorithm, count, etag, body.version.clone()))
} }
@@ -97,7 +96,7 @@ pub(crate) async fn delete_backup_version_route(
) -> Result<delete_backup_version::v3::Response> { ) -> Result<delete_backup_version::v3::Response> {
services services
.key_backups .key_backups
.delete_backup(body.identity.sender_user(), &body.version) .delete_backup(body.sender_user(), &body.version)
.await; .await;
Ok(delete_backup_version::v3::Response::new()) Ok(delete_backup_version::v3::Response::new())
@@ -117,7 +116,7 @@ pub(crate) async fn add_backup_keys_route(
) -> Result<add_backup_keys::v3::Response> { ) -> Result<add_backup_keys::v3::Response> {
if services if services
.key_backups .key_backups
.get_latest_backup_version(body.identity.sender_user()) .get_latest_backup_version(body.sender_user())
.await .await
.is_ok_and(|version| version != body.version) .is_ok_and(|version| version != body.version)
{ {
@@ -130,19 +129,12 @@ pub(crate) async fn add_backup_keys_route(
for (session_id, key_data) in &room.sessions { for (session_id, key_data) in &room.sessions {
services services
.key_backups .key_backups
.add_key( .add_key(body.sender_user(), &body.version, room_id, session_id, key_data)
body.identity.sender_user(),
&body.version,
room_id,
session_id,
key_data,
)
.await?; .await?;
} }
} }
let (count, etag) = let (count, etag) = get_count_etag(&services, body.sender_user(), &body.version).await;
get_count_etag(&services, body.identity.sender_user(), &body.version).await;
Ok(add_backup_keys::v3::Response::new(etag, count)) Ok(add_backup_keys::v3::Response::new(etag, count))
} }
@@ -161,7 +153,7 @@ pub(crate) async fn add_backup_keys_for_room_route(
) -> Result<add_backup_keys_for_room::v3::Response> { ) -> Result<add_backup_keys_for_room::v3::Response> {
if services if services
.key_backups .key_backups
.get_latest_backup_version(body.identity.sender_user()) .get_latest_backup_version(body.sender_user())
.await .await
.is_ok_and(|version| version != body.version) .is_ok_and(|version| version != body.version)
{ {
@@ -173,18 +165,11 @@ pub(crate) async fn add_backup_keys_for_room_route(
for (session_id, key_data) in &body.sessions { for (session_id, key_data) in &body.sessions {
services services
.key_backups .key_backups
.add_key( .add_key(body.sender_user(), &body.version, &body.room_id, session_id, key_data)
body.identity.sender_user(),
&body.version,
&body.room_id,
session_id,
key_data,
)
.await?; .await?;
} }
let (count, etag) = let (count, etag) = get_count_etag(&services, body.sender_user(), &body.version).await;
get_count_etag(&services, body.identity.sender_user(), &body.version).await;
Ok(add_backup_keys_for_room::v3::Response::new(etag, count)) Ok(add_backup_keys_for_room::v3::Response::new(etag, count))
} }
@@ -203,7 +188,7 @@ pub(crate) async fn add_backup_keys_for_session_route(
) -> Result<add_backup_keys_for_session::v3::Response> { ) -> Result<add_backup_keys_for_session::v3::Response> {
if services if services
.key_backups .key_backups
.get_latest_backup_version(body.identity.sender_user()) .get_latest_backup_version(body.sender_user())
.await .await
.is_ok_and(|version| version != body.version) .is_ok_and(|version| version != body.version)
{ {
@@ -216,7 +201,7 @@ pub(crate) async fn add_backup_keys_for_session_route(
let mut ok_to_replace = true; let mut ok_to_replace = true;
if let Some(old_key) = &services if let Some(old_key) = &services
.key_backups .key_backups
.get_session(body.identity.sender_user(), &body.version, &body.room_id, &body.session_id) .get_session(body.sender_user(), &body.version, &body.room_id, &body.session_id)
.await .await
.ok() .ok()
{ {
@@ -275,7 +260,7 @@ pub(crate) async fn add_backup_keys_for_session_route(
services services
.key_backups .key_backups
.add_key( .add_key(
body.identity.sender_user(), body.sender_user(),
&body.version, &body.version,
&body.room_id, &body.room_id,
&body.session_id, &body.session_id,
@@ -284,8 +269,7 @@ pub(crate) async fn add_backup_keys_for_session_route(
.await?; .await?;
} }
let (count, etag) = let (count, etag) = get_count_etag(&services, body.sender_user(), &body.version).await;
get_count_etag(&services, body.identity.sender_user(), &body.version).await;
Ok(add_backup_keys_for_session::v3::Response::new(etag, count)) Ok(add_backup_keys_for_session::v3::Response::new(etag, count))
} }
@@ -299,7 +283,7 @@ pub(crate) async fn get_backup_keys_route(
) -> Result<get_backup_keys::v3::Response> { ) -> Result<get_backup_keys::v3::Response> {
let rooms = services let rooms = services
.key_backups .key_backups
.get_all(body.identity.sender_user(), &body.version) .get_all(body.sender_user(), &body.version)
.await; .await;
Ok(get_backup_keys::v3::Response::new(rooms)) Ok(get_backup_keys::v3::Response::new(rooms))
@@ -314,7 +298,7 @@ pub(crate) async fn get_backup_keys_for_room_route(
) -> Result<get_backup_keys_for_room::v3::Response> { ) -> Result<get_backup_keys_for_room::v3::Response> {
let sessions = services let sessions = services
.key_backups .key_backups
.get_room(body.identity.sender_user(), &body.version, &body.room_id) .get_room(body.sender_user(), &body.version, &body.room_id)
.await; .await;
Ok(get_backup_keys_for_room::v3::Response::new(sessions)) Ok(get_backup_keys_for_room::v3::Response::new(sessions))
@@ -329,7 +313,7 @@ pub(crate) async fn get_backup_keys_for_session_route(
) -> Result<get_backup_keys_for_session::v3::Response> { ) -> Result<get_backup_keys_for_session::v3::Response> {
let key_data = services let key_data = services
.key_backups .key_backups
.get_session(body.identity.sender_user(), &body.version, &body.room_id, &body.session_id) .get_session(body.sender_user(), &body.version, &body.room_id, &body.session_id)
.await .await
.map_err(|_| { .map_err(|_| {
err!(Request(NotFound(debug_error!("Backup key not found for this user's session.")))) err!(Request(NotFound(debug_error!("Backup key not found for this user's session."))))
@@ -347,11 +331,10 @@ pub(crate) async fn delete_backup_keys_route(
) -> Result<delete_backup_keys::v3::Response> { ) -> Result<delete_backup_keys::v3::Response> {
services services
.key_backups .key_backups
.delete_all_keys(body.identity.sender_user(), &body.version) .delete_all_keys(body.sender_user(), &body.version)
.await; .await;
let (count, etag) = let (count, etag) = get_count_etag(&services, body.sender_user(), &body.version).await;
get_count_etag(&services, body.identity.sender_user(), &body.version).await;
Ok(delete_backup_keys::v3::Response::new(etag, count)) Ok(delete_backup_keys::v3::Response::new(etag, count))
} }
@@ -365,11 +348,10 @@ pub(crate) async fn delete_backup_keys_for_room_route(
) -> Result<delete_backup_keys_for_room::v3::Response> { ) -> Result<delete_backup_keys_for_room::v3::Response> {
services services
.key_backups .key_backups
.delete_room_keys(body.identity.sender_user(), &body.version, &body.room_id) .delete_room_keys(body.sender_user(), &body.version, &body.room_id)
.await; .await;
let (count, etag) = let (count, etag) = get_count_etag(&services, body.sender_user(), &body.version).await;
get_count_etag(&services, body.identity.sender_user(), &body.version).await;
Ok(delete_backup_keys_for_room::v3::Response::new(etag, count)) Ok(delete_backup_keys_for_room::v3::Response::new(etag, count))
} }
@@ -383,16 +365,10 @@ pub(crate) async fn delete_backup_keys_for_session_route(
) -> Result<delete_backup_keys_for_session::v3::Response> { ) -> Result<delete_backup_keys_for_session::v3::Response> {
services services
.key_backups .key_backups
.delete_room_key( .delete_room_key(body.sender_user(), &body.version, &body.room_id, &body.session_id)
body.identity.sender_user(),
&body.version,
&body.room_id,
&body.session_id,
)
.await; .await;
let (count, etag) = let (count, etag) = get_count_etag(&services, body.sender_user(), &body.version).await;
get_count_etag(&services, body.identity.sender_user(), &body.version).await;
Ok(delete_backup_keys_for_session::v3::Response::new(etag, count)) Ok(delete_backup_keys_for_session::v3::Response::new(etag, count))
} }
+6 -2
View File
@@ -35,7 +35,7 @@ pub(crate) async fn get_capabilities_route(
// Only allow 3pid changes if SMTP is configured // Only allow 3pid changes if SMTP is configured
capabilities.thirdparty_id_changes = capabilities.thirdparty_id_changes =
ThirdPartyIdChangesCapability::new(services.threepid.email_requirement().may_change()); ThirdPartyIdChangesCapability::new(services.mailer.mailer().is_some());
capabilities.get_login_token = capabilities.get_login_token =
GetLoginTokenCapability::new(services.server.config.login_via_existing_session); GetLoginTokenCapability::new(services.server.config.login_via_existing_session);
@@ -48,7 +48,11 @@ pub(crate) async fn get_capabilities_route(
json!({"enabled": services.config.forget_forced_upon_leave}), json!({"enabled": services.config.forget_forced_upon_leave}),
)?; )?;
if services.users.is_admin(body.identity.sender_user()).await { if services
.users
.is_admin(body.sender_user.as_ref().unwrap())
.await
{
// Advertise suspension API // Advertise suspension API
capabilities.set("uk.timedout.msc4323", json!({"suspend": true, "lock": false}))?; capabilities.set("uk.timedout.msc4323", json!({"suspend": true, "lock": false}))?;
} }
+3 -3
View File
@@ -37,8 +37,8 @@ pub(crate) async fn get_context_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<get_context::v3::Request>, body: Ruma<get_context::v3::Request>,
) -> Result<get_context::v3::Response> { ) -> Result<get_context::v3::Response> {
let sender_user = body.identity.sender_user(); let sender = body.sender();
let sender_device = body.identity.sender_device(); let (sender_user, sender_device) = sender;
let room_id = &body.room_id; let room_id = &body.room_id;
let event_id = &body.event_id; let event_id = &body.event_id;
let filter = &body.filter; let filter = &body.filter;
@@ -143,7 +143,7 @@ pub(crate) async fn get_context_route(
let lazy_loading_context = lazy_loading::Context { let lazy_loading_context = lazy_loading::Context {
user_id: sender_user, user_id: sender_user,
device_id: sender_device, device_id: Some(sender_device),
room_id, room_id,
token: Some(base_count.into_unsigned()), token: Some(base_count.into_unsigned()),
options: Some(&filter.lazy_load_options), options: Some(&filter.lazy_load_options),
+15 -10
View File
@@ -1,5 +1,5 @@
use axum::extract::State; use axum::extract::State;
use axum_client_ip::ClientIp; use axum_client_ip::InsecureClientIp;
use conduwuit::{Err, Result, at}; use conduwuit::{Err, Result, at};
use futures::StreamExt; use futures::StreamExt;
use ruma::{ use ruma::{
@@ -22,14 +22,19 @@ const MAX_BATCH_EVENTS: usize = 50;
#[tracing::instrument(skip_all, fields(%client))] #[tracing::instrument(skip_all, fields(%client))]
pub(crate) async fn put_dehydrated_device_route( pub(crate) async fn put_dehydrated_device_route(
State(services): State<crate::State>, State(services): State<crate::State>,
ClientIp(client): ClientIp, InsecureClientIp(client): InsecureClientIp,
body: Ruma<put_dehydrated_device::Request>, body: Ruma<put_dehydrated_device::Request>,
) -> Result<put_dehydrated_device::Response> { ) -> Result<put_dehydrated_device::Response> {
let device_id = body.device_id.clone(); let sender_user = body
.sender_user
.as_deref()
.expect("AccessToken authentication required");
let device_id = body.body.device_id.clone();
services services
.users .users
.set_dehydrated_device(body.identity.sender_user(), body.body) .set_dehydrated_device(sender_user, body.body)
.await?; .await?;
Ok(put_dehydrated_device::Response::new(device_id)) Ok(put_dehydrated_device::Response::new(device_id))
@@ -41,10 +46,10 @@ pub(crate) async fn put_dehydrated_device_route(
#[tracing::instrument(skip_all, fields(%client))] #[tracing::instrument(skip_all, fields(%client))]
pub(crate) async fn delete_dehydrated_device_route( pub(crate) async fn delete_dehydrated_device_route(
State(services): State<crate::State>, State(services): State<crate::State>,
ClientIp(client): ClientIp, InsecureClientIp(client): InsecureClientIp,
body: Ruma<delete_dehydrated_device::Request>, body: Ruma<delete_dehydrated_device::Request>,
) -> Result<delete_dehydrated_device::Response> { ) -> Result<delete_dehydrated_device::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
let device_id = services.users.get_dehydrated_device_id(sender_user).await?; let device_id = services.users.get_dehydrated_device_id(sender_user).await?;
@@ -59,10 +64,10 @@ pub(crate) async fn delete_dehydrated_device_route(
#[tracing::instrument(skip_all, fields(%client))] #[tracing::instrument(skip_all, fields(%client))]
pub(crate) async fn get_dehydrated_device_route( pub(crate) async fn get_dehydrated_device_route(
State(services): State<crate::State>, State(services): State<crate::State>,
ClientIp(client): ClientIp, InsecureClientIp(client): InsecureClientIp,
body: Ruma<get_dehydrated_device::Request>, body: Ruma<get_dehydrated_device::Request>,
) -> Result<get_dehydrated_device::Response> { ) -> Result<get_dehydrated_device::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
let device = services.users.get_dehydrated_device(sender_user).await?; let device = services.users.get_dehydrated_device(sender_user).await?;
@@ -75,10 +80,10 @@ pub(crate) async fn get_dehydrated_device_route(
#[tracing::instrument(skip_all, fields(%client))] #[tracing::instrument(skip_all, fields(%client))]
pub(crate) async fn get_dehydrated_events_route( pub(crate) async fn get_dehydrated_events_route(
State(services): State<crate::State>, State(services): State<crate::State>,
ClientIp(client): ClientIp, InsecureClientIp(client): InsecureClientIp,
body: Ruma<get_events::Request>, body: Ruma<get_events::Request>,
) -> Result<get_events::Response> { ) -> Result<get_events::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
let device_id = &body.body.device_id; let device_id = &body.body.device_id;
let existing_id = services.users.get_dehydrated_device_id(sender_user).await; let existing_id = services.users.get_dehydrated_device_id(sender_user).await;
+10 -10
View File
@@ -1,5 +1,5 @@
use axum::extract::State; use axum::extract::State;
use axum_client_ip::ClientIp; use axum_client_ip::InsecureClientIp;
use conduwuit::{Err, Result, debug, err, utils}; use conduwuit::{Err, Result, debug, err, utils};
use futures::StreamExt; use futures::StreamExt;
use ruma::{ use ruma::{
@@ -21,7 +21,7 @@ pub(crate) async fn get_devices_route(
) -> Result<get_devices::v3::Response> { ) -> Result<get_devices::v3::Response> {
let devices: Vec<device::Device> = services let devices: Vec<device::Device> = services
.users .users
.all_devices_metadata(body.identity.sender_user()) .all_devices_metadata(body.sender_user())
.collect() .collect()
.await; .await;
@@ -37,7 +37,7 @@ pub(crate) async fn get_device_route(
) -> Result<get_device::v3::Response> { ) -> Result<get_device::v3::Response> {
let device = services let device = services
.users .users
.get_device_metadata(body.identity.sender_user(), &body.body.device_id) .get_device_metadata(body.sender_user(), &body.body.device_id)
.await .await
.map_err(|_| err!(Request(NotFound("Device not found."))))?; .map_err(|_| err!(Request(NotFound("Device not found."))))?;
@@ -50,11 +50,11 @@ pub(crate) async fn get_device_route(
#[tracing::instrument(skip_all, fields(%client), name = "update_device", level = "debug")] #[tracing::instrument(skip_all, fields(%client), name = "update_device", level = "debug")]
pub(crate) async fn update_device_route( pub(crate) async fn update_device_route(
State(services): State<crate::State>, State(services): State<crate::State>,
ClientIp(client): ClientIp, InsecureClientIp(client): InsecureClientIp,
body: Ruma<update_device::v3::Request>, body: Ruma<update_device::v3::Request>,
) -> Result<update_device::v3::Response> { ) -> Result<update_device::v3::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
let appservice = body.identity.appservice_info(); let appservice = body.appservice_info.as_ref();
match services match services
.users .users
@@ -118,8 +118,8 @@ pub(crate) async fn delete_device_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<delete_device::v3::Request>, body: Ruma<delete_device::v3::Request>,
) -> Result<delete_device::v3::Response> { ) -> Result<delete_device::v3::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
let appservice = body.identity.appservice_info(); let appservice = body.appservice_info.as_ref();
// Appservices get to skip UIAA for this endpoint // Appservices get to skip UIAA for this endpoint
if appservice.is_none() { if appservice.is_none() {
@@ -154,8 +154,8 @@ pub(crate) async fn delete_devices_route(
State(services): State<crate::State>, State(services): State<crate::State>,
body: Ruma<delete_devices::v3::Request>, body: Ruma<delete_devices::v3::Request>,
) -> Result<delete_devices::v3::Response> { ) -> Result<delete_devices::v3::Response> {
let sender_user = body.identity.sender_user(); let sender_user = body.sender_user();
let appservice = body.identity.appservice_info(); let appservice = body.appservice_info.as_ref();
// Appservices get to skip UIAA for this endpoint // Appservices get to skip UIAA for this endpoint
if appservice.is_none() { if appservice.is_none() {
Loaded 100 of 227 files, more files were not shown because too many files have changed in this diff. Show more