Compare commits

..

2382 Commits

Author SHA1 Message Date
strawberry a94bf2cf9f unfinished untested impl of room deletion
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 22:40:46 -05:00
strawberry 0593dce8a6 add missing feature to DIFFERENCES.md
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry 03d796e95e support room aliases for room blocking, argument to disable federation
and makes parsing the room more generic (room ID or room alias)

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
renovate[bot] 8fe42cb9e8 fix(deps): update rust crate serde to 1.0.197 2024-02-20 07:06:57 -05:00
renovate[bot] ac3a3a84e2 fix(deps): update rust crate serde_json to 1.0.114 2024-02-20 07:06:57 -05:00
strawberry 36bc21193c oops forgot import
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
renovate[bot] 54728ac440 chore(deps): update nixos/nix docker tag to v2.20.2 2024-02-20 07:06:57 -05:00
renovate[bot] a8574fdfd7 fix(deps): update rust crate serde_yaml to 0.9.32 2024-02-20 07:06:57 -05:00
strawberry 3d26210eac more useful database logging (compaction, time taken to load)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry ce1aae7abc update transitive png dependency
thanks to cargo audit, 0.17.12 was yanked due
to build breakage.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry 620206be91 update DIFFERENCES.md
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
renovate[bot] 856ea200ac fix(deps): update rust crate ring to 0.17.8 2024-02-20 07:06:57 -05:00
strawberry bdda875416 bump conduwuit version to 0.1.3
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry 9a6a77974b add support for bulk banning room IDs
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry e25d574208 move room moderation stuff to a subcommand
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry c9364dc077 dont evict admins from room, allow admins to join banned rooms
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry ed0c8e86f7 initial implementation of banning room IDs
takes a full room ID, evicts all our users from that room,
adds room ID to banned room IDs metadata db table, and
forbids any new local users from attempting to join it.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry a92f291bbf feat: query param to return full state event or event content
query parameter `?format=event|content`

defaults to normal behaviour which is the event's content.

ruma impl: https://github.com/girlbossceo/ruma/commit/788ea6b00fab49b04a17d88caa0c840b7d74aa13

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry b80be6c709 remove unused database function
i have no idea what this is for

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry a2f7f6fda4 prefix every admin room help cmd with -
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
strawberry a0205cd41d implement deprecated user field for login requests
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-20 07:06:57 -05:00
renovate[bot] 5f007d8117 chore(deps): lock file maintenance 2024-02-16 19:30:28 -05:00
renovate[bot] f2d4e626c0 fix(deps): update rust crate clap to 4.5.1 2024-02-16 17:40:29 -05:00
renovate[bot] 45698e310a chore(deps): lock file maintenance 2024-02-15 01:27:13 -05:00
strawberry b1d1f3a643 add my attic binary caches
conduit and conduwuit are the same

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-15 01:18:30 -05:00
strawberry bef1061a51 that was not a valid option
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-15 01:18:30 -05:00
strawberry adb2059ea2 make ATTIC_TOKEN available in environment
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-15 01:18:30 -05:00
strawberry bb3d5b5d9f add cargo audit as engage task
just in case trivy is useless

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-15 01:18:30 -05:00
strawberry 359a137d2e add trivy for code and vulnerability scanning
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-14 20:14:21 -05:00
renovate[bot] cf9d77d04e chore(deps): update nixos/nix docker tag to v2.20.1 2024-02-14 19:36:13 -05:00
renovate[bot] 3c675dd08e chore(deps): update docker docker tag to v25.0.3 2024-02-14 19:35:58 -05:00
renovate[bot] aa8e534293 fix(deps): update rust crate tikv-jemallocator to 0.5.4 2024-02-14 19:35:29 -05:00
renovate[bot] 9f5b823b3a fix(deps): update rust crate tikv-jemalloc-ctl to 0.5.4 2024-02-14 19:34:02 -05:00
strawberry 62603f2348 install nix-env engage for gitlab ci
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-14 19:31:30 -05:00
strawberry 3a72193c84 move nix config to NIX_CONFIG env variable
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-14 19:07:08 -05:00
strawberry 33e7dafc1a fix incorrect comment about db_cache_capacity_mb
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-14 19:07:08 -05:00
strawberry 5515d12edd make gitlab CI work for conduwuit
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-14 19:07:08 -05:00
strawberry 63bb00d902 error if using known placeholder server_name, log if using debug build
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-14 19:07:08 -05:00
strawberry d1f55b59cf fix wrong docker image in compose files
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-14 19:07:08 -05:00
strawberry e09b2598ee update attic URL, upload to conduwuit too
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-14 19:07:08 -05:00
strawberry 5d7b8cd309 think this is the correct way
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-14 19:07:08 -05:00
strawberry 0e7ec9f2dd update rocksdb to 8.10.0 in nix flake
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-14 19:07:08 -05:00
strawberry 4bcedf7f4b bump rocksdb (finally)
queue the CI errors

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-14 19:07:08 -05:00
renovate[bot] c66fa14002 fix(deps): update rust crate serde_yaml to 0.9.31 2024-02-14 17:34:16 -05:00
renovate[bot] 8c074d1cf9 fix(deps): update rust crate serde_json to 1.0.113 2024-02-14 17:27:48 -05:00
renovate[bot] 7a08f0754b fix(deps): update rust crate serde_html_form to 0.2.4 2024-02-14 17:23:53 -05:00
renovate[bot] 5ef46c63e6 fix(deps): update rust crate serde to 1.0.196 2024-02-14 17:22:57 -05:00
strawberry 5b31cdf1b5 ignore basically all the http dependencies we cant upgrade to
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-14 09:51:11 -05:00
Samuel Meenzen 8e03a79d35 feat: renovate all the way
Because dependabot is lazy on weekends.
2024-02-14 09:42:00 -05:00
dependabot[bot] c98c71eb7c Bump thiserror from 1.0.56 to 1.0.57
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.56 to 1.0.57.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.56...1.0.57)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 07:23:22 -05:00
strawberry 16d384271b CI expects default features of rocksdb?
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 9724fe7d70 go back to outdated rocksdb (the fork breaks CI in a weird way now)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 4ef6c8a01a does this commit work???
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 0052d7b669 use rust-rocksdb 8f65a73f0962edc4cc028f4012692043dc657a76
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry dac8b3db49 move these config checks to main.rs
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 0ea8657070 default to Undefined if room avatar URL was not found despite checking if its Some
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry bb1edc3f1a use zaidoon1's fork of rust-rocksdb
https://github.com/zaidoon1/rust-rocksdb

https://github.com/rust-rocksdb/rust-rocksdb/issues/855#issuecomment-1937412844

shame that this has resulted in yet another fork of software, but oh well...

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 244c1f7190 config option to check root domain with URL previews
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 54ade97f96 add expect message when failing to send oneshot channel shutdown transaction
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 6ee6217f95 update DIFFERENCES.md and debian postinst config
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 48e4b71dd1 remove hardcoded 300kb limit on spider size with config option of 1MB default
modern websites are sadly massive, 300kb is pretty low. 1MB should be enough.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 2ea895199a dont drop true error with url str parse, fix url contains logic order, clarify config comment
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 7786553cda doc+check if user does not have local presence enabled if using outgoing presence
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry d069379d77 (please) dont drop true error in presence timer creation failures
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 8e6d52e7dd dont follow more than 2 redirects for URL previews for security reasons
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry fb2eba722d fix media tests for URL previews
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
Reiner Herrmann c0dd5b1cc2 feat: URL preview support
from upstream MR https://gitlab.com/famedly/conduit/-/merge_requests/347
with the following changes (so far):
- remove hardcoded list of allowed hosts (strongly disagree with this,
even if it is desired, it should not be harcoded)
- add more allow config options for granularity via URL contains,
host contains, and domain is (explicit match) for security
- warn if a user is allowing all URLs to be previewed for security reasons
- replace an expect with proper error handling
- bump webpage to 2.0
- improved code style a tad

Co-authored-by: rooot <hey@rooot.gay>
Signed-off-by: rooot <hey@rooot.gay>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 6f26be1c6e eat less /ban endpoint fields, fix ban reason not consistently applied
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 9be73d341c update debian systemd unit to use notify and harden/update it more
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 3ff5bc5298 ask systemd for more time when shutting down if needed, raise axum shutdown timeout to 3 mins
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 0b171a2b9c bump default max_concurrent_requests to 500, update config comment
also raise 1024 bytes to 4096 bytes in minimum max_request_size check

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry da4b509940 update DIFFERENCES.md
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry b8ab4754a5 slight wording addition
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 7ddf08e8b7 filter out "config" as it's an expected config option
this seems to exist when using `CONDUIT_CONFIG`
environment variable, this is expected.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 6996d63a02 warn if a catchall config option (unknown config option) exists
a longer way of saying: warn if a config key is unknown

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry d4d8c6eb21 check if custom room ID is apart of forbidden room alias
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
Matthias Ahouansou fc93b29abe feat: forbid certain usernames & room aliases
squashed from https://gitlab.com/famedly/conduit/-/merge_requests/582

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
Matthias Ahouansou 784d307425 revamp appservice registration to ruma's Registration type
squashed from https://gitlab.com/famedly/conduit/-/merge_requests/583

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
Raito Bezarius 0e9eb22ee7 feat: support non-flake users
This uses flakes-compat to read the `flake.nix` and expose it
to non-flake users.

Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
strawberry 1f7ac6d112 update valid_until_ts comment
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-02-11 21:56:55 -05:00
dependabot[bot] e0cdcf66d3 Bump tokio from 1.35.1 to 1.36.0
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.35.1 to 1.36.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.35.1...tokio-1.36.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-06 21:08:17 -05:00
dependabot[bot] 3ac42129ac Bump reqwest from 0.11.23 to 0.11.24
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.23 to 0.11.24.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.23...v0.11.24)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 19:39:24 -05:00
strawberry 1157994b49 update docker README with our links
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 21:12:09 -05:00
strawberry 71d5361703 bit of repo cleanup
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 21:12:09 -05:00
strawberry ee90f66450 remove test branch, only publish if not PR
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 19:39:26 -05:00
strawberry 03080c5677 bump ruma
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 19:39:26 -05:00
strawberry 1b780fdbfa i think its docker.io
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 19:39:26 -05:00
strawberry c239ff5e42 make image_name variable work, OCI uses/expects conduit
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 19:39:26 -05:00
strawberry 2dd8d372de username is not secret, use conduwuit and main branch
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 19:39:26 -05:00
strawberry 4be2948afc fix syntax error, add test branch
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 19:39:26 -05:00
strawberry 29d7257a41 attempt to push OCI images to docker hub and ghcr
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 19:39:26 -05:00
strawberry 98b54caca5 remove test branch from CI
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:27:13 -05:00
strawberry ab22dc4bc8 update DIFFERENCES.md
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry 83f7ea54df update gh actions OCI image paths to match gitlab
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
Samuel Meenzen d8e7ea78ed Publish oci image to the gitlab registry
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
Charles Hall c33fd35c1c (upstream) update DEPLOY.md with new build links
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry 25d9cc28d6 remove removing rustup and default cargo, remove building aarch64 deb
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry 4cebb282ab (prob doesnt work) build aarch64 deb
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry fedbe0dc66 build deb, update deb metadata and files
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry 1581a3ca84 force copy
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry d11b03feab dont compress OCI images, copy result to tar.gz
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
Charles Hall 621c85fd3b run cargo update
`IndexMap::remove` was deprecated in favor of explicitly named methods.
I assume that we actually needed to be using `shift_remove`, otherwise
we probably wouldn't be bothering with `indexmap` here in the first
place. I wonder if this fixes any bugs lol

from: https://gitlab.com/famedly/conduit/-/merge_requests/580

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry 950d69eb66 build OCI images for x86_64 and aarch64 in CI
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry 468009fce5 fix wrong artifact path in gitlab ci
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry 1f3b91accd remove redundant copy and just use path
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
Charles Hall d68268da2e pass pkgsCrossStatic to mkOciImage, not pkgsHost
This fixes a bug where the aarch64 OCI image had metadata saying it was
an x86_64 OCI image. On top of that, I think the metadata was actually
right (aside from Conduit's binary): since all other packages were being
pulled from `pkgsHost`, an OCI image cross compiled for aarch64 from a
different architecture would result in unexecutable binaries (e.g. tini)
since they were compiled for the completely wrong architecture.

from: https://gitlab.com/famedly/conduit/-/merge_requests/579

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry fb1fa4364d downgrade rust-rocksdb back to latest stable
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
Charles Hall 8954243457 switch crane input back to upstream
Thanks to the crane maintainer to fixing my issue in a way that doesn't
suck, unlike my attempt in the fork we were briefly using.

from: https://gitlab.com/famedly/conduit/-/merge_requests/576

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
Charles Hall 79750b9685 make complement (mostly) work again
Well, kinda. It crashed on me after 10 minutes because the tests timed
out like in <https://github.com/matrix-org/complement/issues/394>.
Sounds like this means it's a them problem though.

I want to use Nix to build this image instead in the future but this
will at least make it work for now and give me a reference for while I'm
porting it. I also want to make Conduit natively understand Complement's
requirements instead of `sed`ing a bunch of stuff and needing a reverse
proxy in the container. Should be more reliable that way.

I'm not making this run in CI until the above stuff is addressed and
until I can decide on a way to pin the revision of Complement being
tested against.

from: https://gitlab.com/famedly/conduit/-/merge_requests/575

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry bc421ec96b add -L to nix build command
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry 33847b8b4b fix syntax error (both uses and run)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry 77e8a6e5ae port some of artifacts building to gh actions (attempt 1)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-31 16:20:26 -05:00
strawberry aa3fd6a47e switch cargo.toml pkg name back to conduit
we already make it clear this is a fork with
our version and such

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-27 16:47:33 -05:00
strawberry 24605e151d make allow_federation default to true
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-27 16:47:33 -05:00
Charles Hall c329eb197d add ca certificates to the OCI image
Without this, checking the authority of TLS certificates fails, making
Conduit (rightly) refuse to connect to anything.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-27 16:47:33 -05:00
strawberry 81a4f9e539 use main instead of latest for docker tag
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-27 16:47:33 -05:00
strawberry fd19d132eb make nix-build-and-cache executable
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-26 20:39:01 -05:00
strawberry 8793abf41f does this work
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-26 19:47:54 -05:00
strawberry 331b63ca40 upstream nix changes, make rocksdb git work
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-26 19:47:54 -05:00
strawberry 35ebc459fa add explicit_outlives_requirements rustc lint
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-26 19:47:54 -05:00
strawberry 5a8a3c742d s/15000/10000
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-26 19:47:54 -05:00
Charles Hall 620bfacc30 ci: cross compile static binaries for x86_64 and aarch64
from https://gitlab.com/famedly/conduit/-/merge_requests/569

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-26 19:47:54 -05:00
kubo6472 7588790c3b bump nix cache
Fix nodejs v16 incompatible/deprecation
2024-01-25 20:20:27 -05:00
strawberry 4ac568769b improvement: registration token now only works when registration is enabled
Co-authored-by: Timo Kösters <timo@koesters.xyz>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry ab0b52ef1e update DIFFERENCES.md
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 8b6bd8e89e add cargo clippy
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 2c51cdc23b update nix flake for gitlab CI building docker images
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 0e8267656f fix room ID messages, remove comments
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 08a183e8c7 assume well-known is None if text length exceeds 10000 chars
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
Charles Hall ec7aeb1096 move resolver logic into the resolver
Honestly not sure why it wasn't done like this before. This code is much
less awkward to follow and more compartmentalized.

These changes were mainly motivated by a clippy lint triggering on the
original code, which then made me wonder if I could get rid of some of
the `Box`ing. Turns out I could, and this is the result of that.

Co-authored-by: strawberry <strawberry@puppygock.gay>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 1536f08d81 use both is_ip_literal and IPAddress is_valid checks
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 9858b33b37 just remove double quotes if found instead
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry e0419d9c5d custom room ID checks, dont use format! macro due to quotes being added
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 7eff572e77 check if room ID already exists instead of erroring on auth check
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 8754f0e2a5 additional character check on room alias
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry e272f0f34f update DIFFERENCES.md
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 89d9cdeb3a IP range denylist logging, and fix logic error
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 382347353e add custom room ID support using room_id field
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 2980af6490 move room creation config check higher up
dont bother wasting resources if we know we
arent even allowed to make the room to begin with

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry ead9a58dce dont crash failing to deserialise room creation content
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 3453dcc344 add error checking to room aliases
length, colon, and spaces. also dont crash.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry b51d148899 remove random space
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 6c1358d0c8 send home_server on login response again
a 6+ year old deprecated field that isnt even spelled
right, and no clients use it must still be sent
according to spec

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 9d1ca3e84a update deps
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 114369bcf6 delete Dockerfile
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry fa0c083555 don't send requests to specified list of IP CIDRs
this can most definitely be improved but this is a decent attempt.
the only annoying this is i couldn't just use a Vec<IPAddress> which
would have significantly simplified all of this, but serde can't
deserialise it on the config side i guess.

i may find a better way to do this in the future, but this should cover
most areas anyways.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 71d247232d oops forgot that endpoint too
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 6c75087863 eat less of client parameters for media requests
still cantt respect allow_redirect yet

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry ab6cb4ad2d switch back to expect for sender_user
as far as i can tell, it will return a normal
error in the auth token handling code so this is fine.
we also shouldnt assume all errors from this are
access_token related.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 02bc818633 match explicit URI to see if we should authenticate the user
first attempt at forcing an endpoint to be authenticated

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 1de7980143 update DIFFERENCES.md so far
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry dc9c86d3db bump ruma, rusqlite, and rocksdb
latest rocksdb now has WriteBufferManager support

i hope no one is using sqlite with conduwuit, but if they are let's
bump it to latest git too for the latest sqlite version available.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 9d0c85ab17 use ruma JsOption, bump figment
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 4e8823dedb add warning about outgoing presence PDU/EDU relationship
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 1460a82f54 use engage for gitlab CI
from https://gitlab.com/famedly/conduit/-/merge_requests/564

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 11bc725268 return joined member count of room for pushrules instead of hardcoded 10
im not sure what the TODO is trying to say here,
but since it's many years old and conduwuit is
fast, i dont see an issue with this.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry b50c47e1c2 silence loud tower_http errors (move to info)
these are benign errors that are from things like
conduwuit fetching remote media from dead servers

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 34bac4d1d9 support sending well_known client response in /login using well_known_client
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry cf62cb0d0a send avatar_url on invite member events like synapse
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry f275a0dfbe fix obvious copy-paste error
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 982eec178b add conduwuit-example.toml (new example config)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry fb1ade551a revamp example config, document lots of config options
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry a7aa91739f make warning and slight changes to DEPLOY.md for conduwuit
this is not finished yet

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry fae00e5136 remove rocksdb_max_open_files option
default for RocksDB is -1 and conduwuit already raises the
soft and hard nofile limits at startup.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-25 19:28:33 -05:00
strawberry 6ffc54e241 support blocking servers from fetching remote media from
akin to synapse's `prevent_media_downloads_from`

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 23:57:45 -05:00
strawberry 1a06c8c9d3 more error checking for deserialising events and canonical JSON
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 23:57:45 -05:00
strawberry c83acabfb0 return proper error if we fail to convert to canonical JSON
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 23:57:45 -05:00
strawberry 3d6b499b88 log error and PDU for failed auth checks
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 23:57:45 -05:00
strawberry 3ffca25f6f update few endpoint docs versions
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 23:57:45 -05:00
strawberry 2bbc75d68e why did i have to run cargo fmt twice
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry de303d9480 update rust toolchain in flake
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry 40f5345586 fix formatting and links of user reports more
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry 6063a671c3 bump MSRV to 1.75.0 for latest ruma
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry 632276ae99 bump ruma to aa3acd88d21dfbb7595f54e619f52761bcb0259e
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry e944ed5eb4 fix /report endpoint a lot
in short, the `/report` endpoint now checks if:
- the reporting room in the URI matches the PDU/event reported
- sender user is in the room reported
- raises report reasoning to 750 characters (spec doesn't say to limit
these, but thorough and informative reports for server admins are not
a bad thing)
- (hopefully) fixes some broken formatting
- add a random short delay before sending a successful response to the
client to make it more annoying to enumerate for events on our server
(security by obscurity but spec suggests it)

basically, secure reports better lol

see https://spec.matrix.org/v1.9/client-server-api/#post_matrixclientv3roomsroomidreporteventid

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry 7eb57a9fd5 explicitly fallback to None for invalid/empty room topics
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry 1f117582ca update all transitive dependencies (cargo update)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry 9a3866afff return M_INVALID_PARAM instead of M_BAD_JSON for bad room aliases
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry 92641d0628 first of many small code documentation
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry ad1d272e2a fix blocks_in_conditions clippy lint
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry 8d42351e34 add presence options to show-config admin cmd
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry 0252e9c2c7 split max build optimisations into release-high-perf build profile
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry a85ebdeaa0 require sender_user being in the reporting room for /report events
Matrix 1.8 change:
https://spec.matrix.org/v1.9/client-server-api/#post_matrixclientv3roomsroomidreporteventid

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry efa6308172 actually we can remove loole (for now) and crossbeam
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry bfc738d80e default to None for room topic event in spaces or /publicRooms
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry ef10a2df36 add more lints, bump image and crossbeam
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
strawberry 59c7f93656 fix more clippy lints (part 1)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-17 14:26:26 -05:00
renovate[bot] 44440f745f chore(deps): update actions/cache action to v4 2024-01-17 12:04:47 -05:00
strawberry 2074e36aa4 add missing ban reason to ban events
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 2f16726bac raise generated passwords to 25 chars
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 2b031e40a2 partially revert keeping track of remote user profiles
this seems to require some more work to properly ignore
dead server errors without breaking the entire room join

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 149d22eef7 make set avatar, displayname, and blurhash async and forgot another let _
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 9ec1532580 ignore potential errors when updating user profiles
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 4d410d7304 update DIFFERENCES.md
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 0297cfe307 remove cached destination for a destination if request fails
this can help if users change their well-known or such and we don't want
to keep on hitting the old destination.

from https://gitlab.com/Aranjedeath/conduit/-/commit/11357d1f1af27b0cbd06ee2d8431bd965bc6d95e

Co-authored-by: Jacob Taylor <jacob@explodie.org>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry ad792f4565 oops dedup only works on consecutive elements
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 52884abff6 don't validate or add signature if room is not v8 or above or not using restricted joins
should resolve https://github.com/matrix-org/matrix-spec/issues/1708 on
for conduwuit until spec clarifies.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 5c4b8ad7a3 replace panics on unknown room versions with errors
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry c70ce49ec0 don't allow non-local users to have their creds modified in Deactivate admin cmds
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry edd74efbf2 dedup servers in get_alias_helper
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry da539efb98 only follow up to 6 redirects in default reqwest ClientBuilder
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry ae11e378d2 debug log well-known response body and text
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 14a0d12002 declare support for Matrix 1.5 in our federation requests
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry acc0bdad1a update rocksdb to 8.10.0
https://github.com/rust-rocksdb/rust-rocksdb/pull/852

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 424f02466c DIFFERENCES.md: suggest servers to join via at room directory
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 0b0b52c33b add all possible workspace clippy lints (with commenting out most for now)
this will be a major pain to work through. for now, let's
just add them and overtime work through these.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 49b6f338fd feat: suggest servers to join at /_matrix/client/v3/directory/room/{roomAlias}
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry da3ac7a2f1 deps updates again
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 15ffc4951e oops forgot to bump 1.70.0 in flake and gitlab dockerfile
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 8e569b8d29 we also support webp images
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 6ea07da24d nix: update flake
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 468e5a48f3 add more stuff to DIFFERENCES.md
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry ee2f1c3084 the great persy, sled, and heed purge (and bump MSRV to 1.74.1)
these database backends are either unmaintained, broken in conduit, or
incredibly niche for something like conduwuit.

also i want to bump the MSRV.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry b28a2fad97 feat: keep track of remote profiles for user directory and local requests
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry ef8dcdfe3c declare explicit support for room filtering (MSC3827)
conduit has supported this for a while now and is a Matrix 1.4 feature

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry c75674faf5 bump default_presence_offline_timeout to 30 minutes (too low imo)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 966cca25f1 bump conduwuit version as we've made a lot of changes
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 85b2c6681b allow HEAD HTTP requests in CORS
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 20aa2cfca6 update device lists for user upon logout
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-14 20:55:56 -05:00
strawberry 830cd0e6d7 document we shutdown cleaner and safer
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-09 12:24:42 -05:00
strawberry 7021c52c9b send a User-Agent on all requests
amazing that this wasn't done in the first place. a lack of a UA is
suspicious and some providers may block our requests just for the sake
of no UA.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-07 22:26:27 -05:00
strawberry aa40e07d2d add some new things/fixes to DIFFERENCES.md
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-07 22:26:27 -05:00
strawberry 8586b15e1a add support for serving client+server well-known and /client/server.json endpoints from conduwuit
the last endpoint is a non-standard health check endpoint used by at
least Element Web as a weird way to determine if syncv3 is available

there can also be some valid use-cases for serving well-knowns from the
application itself

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-07 22:26:27 -05:00
strawberry bb2f213ac3 more helpful panic msg on failing to increase soft/hard FD limits
this can be caused by security policies, hardening, etc

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-07 22:26:27 -05:00
strawberry 1308574db0 bump ruma to latest commit (syncv3 JsOption and push optional power levels)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-07 22:26:27 -05:00
strawberry 5422d0cedd declare support for various missing matrix versions
this is another one of those things that upstream has neglected

Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-07 22:26:27 -05:00
dependabot[bot] bead35d460 Bump clap from 4.4.12 to 4.4.13
Bumps [clap](https://github.com/clap-rs/clap) from 4.4.12 to 4.4.13.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.4.12...v4.4.13)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-06 16:17:14 -05:00
dependabot[bot] 8b57ebe9a2 Bump opentelemetry_sdk from 0.21.1 to 0.21.2
Bumps [opentelemetry_sdk](https://github.com/open-telemetry/opentelemetry-rust) from 0.21.1 to 0.21.2.
- [Release notes](https://github.com/open-telemetry/opentelemetry-rust/releases)
- [Commits](https://github.com/open-telemetry/opentelemetry-rust/compare/v0.21.1...v0.21.2)

---
updated-dependencies:
- dependency-name: opentelemetry_sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-06 16:17:07 -05:00
dependabot[bot] 16a0cd4ed4 Bump loole from 0.1.13 to 0.3.0
Bumps [loole](https://github.com/mahdi-shojaee/loole) from 0.1.13 to 0.3.0.
- [Commits](https://github.com/mahdi-shojaee/loole/commits)

---
updated-dependencies:
- dependency-name: loole
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-06 16:17:00 -05:00
dependabot[bot] 673febe9a4 Bump serde from 1.0.193 to 1.0.194
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.193 to 1.0.194.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.193...v1.0.194)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-06 16:16:53 -05:00
strawberry 2161630b54 raise reqwest client timeout to 300 seconds
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-06 16:16:44 -05:00
strawberry 3ba129e80c remove unnecessary else logic in sha256_media db migration
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-06 16:16:44 -05:00
strawberry 3723d37b14 raise report reason limit to 500 (though spec doesnt say to limit these)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-06 16:16:44 -05:00
strawberry d56e76c23e raise various timeouts, make exp backoff consistent
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-06 16:16:44 -05:00
strawberry 8c04dffbbd add DIFFERENCES.md (changes conduwuit makes from upstream)
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-06 14:51:08 -05:00
strawberry c534027fa4 revamp README.md to conduwuit
Signed-off-by: strawberry <strawberry@puppygock.gay>
2024-01-06 14:51:08 -05:00
dependabot[bot] 7a8aa969fa Bump thiserror from 1.0.52 to 1.0.56
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.52 to 1.0.56.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.52...1.0.56)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-02 19:36:40 -05:00
dependabot[bot] c82f662e0e Bump async-trait from 0.1.75 to 0.1.77
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.75 to 0.1.77.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/commits)

---
updated-dependencies:
- dependency-name: async-trait
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-02 19:27:21 -05:00
dependabot[bot] 4ed6de2919 Bump figment from 0.10.12 to 0.10.13
Bumps [figment](https://github.com/SergioBenitez/Figment) from 0.10.12 to 0.10.13.
- [Commits](https://github.com/SergioBenitez/Figment/commits)

---
updated-dependencies:
- dependency-name: figment
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-02 19:21:23 -05:00
dependabot[bot] 796dea43cb Bump serde_json from 1.0.108 to 1.0.109
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.108 to 1.0.109.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.108...v1.0.109)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-02 19:21:15 -05:00
dependabot[bot] 712da2b354 Bump clap from 4.4.11 to 4.4.12
Bumps [clap](https://github.com/clap-rs/clap) from 4.4.11 to 4.4.12.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.4.11...v4.4.12)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-29 19:18:17 -05:00
dependabot[bot] e38c595a6d Bump tokio from 1.34.0 to 1.35.1
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.34.0 to 1.35.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.34.0...tokio-1.35.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-27 13:20:33 -05:00
dependabot[bot] 14a880257e Bump thiserror from 1.0.51 to 1.0.52
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.51 to 1.0.52.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.51...1.0.52)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-26 18:11:29 -05:00
dependabot[bot] 56282414fe Bump serde_yaml from 0.9.27 to 0.9.29
Bumps [serde_yaml](https://github.com/dtolnay/serde-yaml) from 0.9.27 to 0.9.29.
- [Release notes](https://github.com/dtolnay/serde-yaml/releases)
- [Commits](https://github.com/dtolnay/serde-yaml/compare/0.9.27...0.9.29)

---
updated-dependencies:
- dependency-name: serde_yaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-26 17:53:56 -05:00
dependabot[bot] 06685874b7 Bump reqwest from 0.11.22 to 0.11.23
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.22 to 0.11.23.
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.22...v0.11.23)

---
updated-dependencies:
- dependency-name: reqwest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-26 17:53:49 -05:00
strawberry 06e0360142 change welcome message
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-25 17:07:24 -05:00
strawberry 91c7c15bb3 log where we are listening at/on
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-25 17:07:24 -05:00
strawberry 7e447765fe remove warning in error message, drop 2nd error down to warn
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-25 17:07:24 -05:00
strawberry 09d0c13d6f remove unused config global function
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-25 17:07:24 -05:00
strawberry d4c360c135 replace run_server() unwrap just to be safe
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-25 17:07:24 -05:00
strawberry 757ba60ff9 add comment about the blocking await above this config check
comment saying this would have been nice. moved the config checks above
that blocking call.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-25 17:07:24 -05:00
strawberry 071f9959a6 remove false_fn as just default alone always evaluates to false
ideally we could just do true/false but it is almost 2024 and this is
not possible in serde.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-25 17:07:24 -05:00
strawberry d214371423 add option for explicit opt-in allow open registration and make it clear
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-25 17:07:24 -05:00
strawberry 5e641e2886 move default rocksdb logging from info to warn
info is still logging useless database statistics and metrics that will
accumulate, less I/O activity.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-25 17:07:24 -05:00
dependabot[bot] b7cfca5e7b Bump futures-util from 0.3.29 to 0.3.30
Bumps [futures-util](https://github.com/rust-lang/futures-rs) from 0.3.29 to 0.3.30.
- [Release notes](https://github.com/rust-lang/futures-rs/releases)
- [Changelog](https://github.com/rust-lang/futures-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/futures-rs/compare/0.3.29...0.3.30)

---
updated-dependencies:
- dependency-name: futures-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 16:02:19 -05:00
dependabot[bot] f1d978f139 Bump tracing from 0.1.37 to 0.1.40
Bumps [tracing](https://github.com/tokio-rs/tracing) from 0.1.37 to 0.1.40.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.37...tracing-0.1.40)

---
updated-dependencies:
- dependency-name: tracing
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 16:02:12 -05:00
dependabot[bot] 49a92f08d6 Bump crossbeam from 0.8.2 to 0.8.3
Bumps [crossbeam](https://github.com/crossbeam-rs/crossbeam) from 0.8.2 to 0.8.3.
- [Release notes](https://github.com/crossbeam-rs/crossbeam/releases)
- [Changelog](https://github.com/crossbeam-rs/crossbeam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/crossbeam-rs/crossbeam/compare/crossbeam-0.8.2...crossbeam-0.8.3)

---
updated-dependencies:
- dependency-name: crossbeam
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 15:46:09 -05:00
dependabot[bot] cb23dba67d Bump persy from 1.4.4 to 1.4.7
Bumps [persy](https://gitlab.com/tglman/persy) from 1.4.4 to 1.4.7.
- [Changelog](https://gitlab.com/tglman/persy/blob/master/release-checklist.md)
- [Commits](https://gitlab.com/tglman/persy/compare/1.4.4...1.4.7)

---
updated-dependencies:
- dependency-name: persy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-25 15:45:59 -05:00
strawberry 14fc20e31e cargo fmt
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-25 11:09:19 -05:00
Val Lorentz 89c3679e9a Add missing pub key in send_join handling 2023-12-25 11:09:19 -05:00
Val Lorentz 33cae7eaab Explicitly match RoomVersionId::V11 2023-12-25 11:09:19 -05:00
Val Lorentz f3045be622 Reuse existing get_room_version 2023-12-25 11:09:19 -05:00
Nineko fdc3e07be6 feat: replaced flaky argon2 with better argon2 crate (#37)
* feat: replaced flaky argon2 with better argon2 crate

* fix: applied cargo fmt nightly

* docs: added comment specifying what the settings for Argon2 mean

* fix: made hashing error a bit more descriptive

* fix: fixed incorrect value for Kib
2023-12-25 10:28:56 -05:00
Charles Hall 6a9f8dfa6f add shebang to .envrc
All this really does is make syntax highlighting and shellcheck work by
default in more editors.
2023-12-24 01:56:56 -05:00
Charles Hall 629efaa910 use constructor to avoid deprecation warnings 2023-12-24 01:05:13 -05:00
Charles Hall 827af38cc9 comment out heed backend; code doesn't compile 2023-12-24 01:05:13 -05:00
strawberry 5bb6128149 remove wrong else logic
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-23 11:49:14 -05:00
strawberry dd8a6ede09 dont allow guest registration if registration disabled with token configured
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-23 11:49:14 -05:00
strawberry 6664259e64 forbid guest users from registering if no real admin user exists
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-23 11:49:14 -05:00
strawberry 01a8f6323d log next steps if a guest account registered and attempted to get admin
this might be an unreachable state with the next commit, but let's be
extra sure here just in case a guest still managed to register before
a real admin was created.

Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-23 11:49:14 -05:00
strawberry c026ef77fb document allow_guest_registration in conduit-example.toml
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-23 11:49:14 -05:00
strawberry dc73df763a don't grant guest users admin, slight user + guest logging improvements
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-23 11:49:14 -05:00
strawberry b0fdc1351b add config option for guest registration, make guest registration respect allow_registration
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-23 11:49:14 -05:00
dependabot[bot] f20beae8dc Bump nix from 0.26.4 to 0.27.1
Bumps [nix](https://github.com/nix-rust/nix) from 0.26.4 to 0.27.1.
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.26.4...v0.27.1)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-22 18:56:36 -05:00
dependabot[bot] 09f68f9f78 Bump serde_html_form from 0.2.2 to 0.2.3
Bumps [serde_html_form](https://github.com/jplatte/serde_html_form) from 0.2.2 to 0.2.3.
- [Changelog](https://github.com/jplatte/serde_html_form/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jplatte/serde_html_form/compare/v0.2.2...v0.2.3)

---
updated-dependencies:
- dependency-name: serde_html_form
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-22 18:39:35 -05:00
dependabot[bot] ba40582412 Bump ring from 0.17.5 to 0.17.7
Bumps [ring](https://github.com/briansmith/ring) from 0.17.5 to 0.17.7.
- [Commits](https://github.com/briansmith/ring/commits)

---
updated-dependencies:
- dependency-name: ring
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-22 18:32:38 -05:00
dependabot[bot] d502357a0f Bump tracing-subscriber from 0.3.17 to 0.3.18
Bumps [tracing-subscriber](https://github.com/tokio-rs/tracing) from 0.3.17 to 0.3.18.
- [Release notes](https://github.com/tokio-rs/tracing/releases)
- [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.17...tracing-subscriber-0.3.18)

---
updated-dependencies:
- dependency-name: tracing-subscriber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-22 18:32:28 -05:00
Charles Hall d76ea86909 update opentelemetry things
Upstream's changelogs are unhelpful :/
2023-12-22 18:24:03 -05:00
strawberry a3336902a0 bump rust-rockdb to latest git for 8.9.1
Co-authored-by: Charles Hall <charles@computer.surgery>
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-21 22:47:28 -05:00
dependabot[bot] b977d94261 Bump thiserror from 1.0.48 to 1.0.51
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.48 to 1.0.51.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.48...1.0.51)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-21 19:17:27 -05:00
dependabot[bot] 65c9b1721f Bump jsonwebtoken from 9.1.0 to 9.2.0
Bumps [jsonwebtoken](https://github.com/Keats/jsonwebtoken) from 9.1.0 to 9.2.0.
- [Changelog](https://github.com/Keats/jsonwebtoken/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Keats/jsonwebtoken/compare/v9.1.0...v9.2.0)

---
updated-dependencies:
- dependency-name: jsonwebtoken
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-21 19:17:06 -05:00
strawberry b239de551d remove deprecated recommended vscode extension
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-20 23:03:18 -05:00
dependabot[bot] b49e43d8bb Bump clap from 4.4.8 to 4.4.11
Bumps [clap](https://github.com/clap-rs/clap) from 4.4.8 to 4.4.11.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/v4.4.8...v4.4.11)

---
updated-dependencies:
- dependency-name: clap
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-20 22:37:04 -05:00
dependabot[bot] f5d2df5483 Bump async-trait from 0.1.74 to 0.1.75
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.74 to 0.1.75.
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.74...0.1.75)

---
updated-dependencies:
- dependency-name: async-trait
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-20 22:32:46 -05:00
renovate[bot] 4db66496a8 chore: Configure Renovate (#15)
* Add renovate.json

* remove default preset, add nix, allow non-office hours

Signed-off-by: strawberry <strawberry@puppygock.gay>

* enable lockfile maintenance

Signed-off-by: strawberry <strawberry@puppygock.gay>

* will this make nix work

Signed-off-by: strawberry <strawberry@puppygock.gay>

---------

Signed-off-by: strawberry <strawberry@puppygock.gay>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: strawberry <strawberry@puppygock.gay>
2023-12-20 22:26:36 -05:00
Jakub Kubík cc4e6e213f fix(sync): correctly update presence properties 2023-12-20 21:50:18 -05:00
Jakub Kubík 69025d30f7 style(presence): use flat_map instead of matching Results in filter 2023-12-20 21:50:13 -05:00
strawberry e93b4aa08e fix typo
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-20 21:46:54 -05:00
dependabot[bot] a4afe2111b Bump actions/checkout from 3 to 4
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-20 21:46:54 -05:00
strawberry 0927754d37 add dependabot
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-20 21:46:54 -05:00
strawberry b3252dd1d4 remove old gitlab stuff and issue templates
not really important enough for us to have these right now

Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-20 21:46:54 -05:00
Charles Hall 216d83ea1d run engage in github actions 2023-12-20 21:46:54 -05:00
Charles Hall 6910a68699 use engage for ci 2023-12-20 21:46:54 -05:00
Charles Hall 311c7d83ca fix rustdoc warnings
Also removed all instances of `#[command(verbatim_doc_comment)]` because
I'm pretty sure it's not necessary anymore. The `[commandbody]` things
were making rustdoc upset about broken link syntax. I also normalized
"code-block" to "code block" in that file since the latter appears more
often.
2023-12-20 21:46:54 -05:00
Charles Hall f54dd1c0fb improve the nix flake
It's pretty much the same as it was before but now it's more better.
2023-12-20 21:46:54 -05:00
nat 118a061ac9 nix: bump inputs and update rocksdb
otherwise bindings are too new and it doesn't build
2023-12-06 22:30:08 +01:00
strawberry 8454773275 log rejected sendjoin, remove unnecessary clone
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-03 20:20:25 -05:00
strawberry 0ed891b3a1 bump version
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-03 01:16:08 -05:00
strawberry d9d1ce3cb5 fix refering uninit static, use upstream rocksdb again, don't compile debug info
even rust-analyzer themselves don't compile with debug info because it
makes cargo checks and builds in general a lot longer. helps speed
things up and we mainly care about panics/stacktraces and compiler
errors.

https://github.com/rust-lang/rust-analyzer/blob/master/Cargo.toml#L12-L15

upstream rust-rocksdb is active again finally

Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-03 01:00:23 -05:00
strawberry 4d52dd2f44 use puppy check for updates endpoint
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-02 21:45:09 -05:00
strawberry f62f641545 add rocksdb configurable options and tweaks, logging improvements, exp. room v11 support
split out the spinning disk focused options into a configurable option, current
conduwuit users are NVMe/SSDs anyways so those options are just hindering performance.

rocksdb logging builds up overtime with no cleanup or anything, adds support for
configuring the amount of logging, size of files, log rotate, etc.
fixes https://gitlab.com/girlbossceo/conduwuit/-/issues/1

misc conduit logging improvements for help debugging issues and maybe a future feature

experimental Room V11 support from https://gitlab.com/famedly/conduit/-/merge_requests/562

Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-12-02 21:30:06 -05:00
strawberry 56e4166ee8 never let clippy fail, use CARGO_PKG_NAME, allow issues on gh, simplify regex a tad
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-11-29 23:19:53 -05:00
strawberry 1a3051eb4a remove nightly only feature, small housekeeping stuff
Signed-off-by: strawberry <strawberry@puppygock.gay>
2023-11-29 21:59:18 -05:00
strawberry 150364b07d rename to conduwuit and use proper version number
Signed-off-by: strawberry <june@girlboss.ceo>
2023-11-29 21:37:12 -05:00
strawberry 87d6a17f0a fix all the warnings!!!! (0 clippy and rustc warnings now)
too many changes to list, codebase significantly better than it was a few weeks ago though

Signed-off-by: strawberry <june@girlboss.ceo>
2023-11-29 21:36:02 -05:00
strawberry 20b686cac5 add some ruma features, fix futures warning
Signed-off-by: strawberry <june@girlboss.ceo>
2023-11-27 21:34:45 -05:00
strawberry b06ed1b92f remove # from internal room ID list
internal room IDs do not have #, they start with !

Signed-off-by: strawberry <june@girlboss.ceo>
2023-11-27 01:35:30 -05:00
strawberry e2ec2a98ba make rooms alias list command more nicer
room IDs in conduit have a server name attached to them already
outputting the server name again just makes it look incorrect

also add codeblock to the internal room ID portion

Signed-off-by: strawberry <june@girlboss.ceo>
2023-11-27 01:25:20 -05:00
strawberry 54a3f47851 fix every clippy warning possible, remove io_uring as default feature
this project's codebase is so horrendous, im shocked that no one has ran
clippy at all. it had ~200 total lint warnings, some with performance
issues and unsoundness, and the rest just very ugly codebase. i have sat
down and fixed as many of these as possible and i am exhausted.
i haven't fixed some extremely complex ones, but i brought it down from
~200 to ~30.

i have also removed io_uring as a default feature due to it falling
under the same category as linux eBPF: major kernel attack surface for
minimal performance gains. this also makes it impossible to cross-compile
from macOS to Linux because io_uring does not exist in Darwin land.
there are far better ways to achieve better performance than io_uring on
the codebase level.

Signed-off-by: strawberry <june@girlboss.ceo>
2023-11-27 00:50:55 -05:00
tezlm 19d1b484e0 split out room info into its own function 2023-11-26 22:16:38 -05:00
tezlm c2b103514b Make commands plural 2023-11-26 22:16:38 -05:00
tezlm 5fc5076517 Room directory admin commands 2023-11-26 22:16:32 -05:00
tezlm b30884c7ac reply to messages 2023-11-26 22:14:59 -05:00
tezlm ebb94341c8 Admin room alias commands
- room alias set
- room alias remove
- room alias which
- room alias list
2023-11-26 22:14:59 -05:00
tezlm 6fdeec1108 Add appservice show command to show config 2023-11-26 22:14:59 -05:00
tezlm 562eaa1dea Allow using languages in code blocks.
```yaml
This works now
```
2023-11-26 22:14:59 -05:00
tezlm 3e9c564209 Rework admin commands to use subcommands.
This commit doesn't add, remove, or change any
commands, it only organizes them
2023-11-26 22:14:59 -05:00
strawberry 5106203d67 drop iouring, add 2 info logs, silence clippy warning
iouring falls into the same category as eBPF and is a major source of kernel vulnerabilities. the benefits gained here are too minimal to bother keeping this enabled, and makes cross-compiling from macOS impossible

Signed-off-by: strawberry <june@girlboss.ceo>
2023-11-26 22:14:59 -05:00
strawberry dd544fad29 use cache_capacity_modifier for spaces/hierarchy cache
Signed-off-by: strawberry <strawberry@pupbrain.dev>
2023-11-26 22:14:59 -05:00
strawberry 2dc1c1fdcb fix clippy performance and sus warnings, remove 1 unwrap, forgot to increment db version
Signed-off-by: strawberry <strawberry@pupbrain.dev>
2023-11-26 22:14:43 -05:00
strawberry b4e2f7ca37 log error for invalid room member events in db
Signed-off-by: strawberry <strawberry@pupbrain.dev>
2023-11-25 20:42:38 -05:00
AndSDev d13e3827ce feat: send push notification on invite to invited user and etc 2023-11-25 20:28:25 -05:00
strawberry 6958c720d0 make pdu stuff async, remove unnecessary db version check
Signed-off-by: strawberry <strawberry@pupbrain.dev>
2023-11-25 18:29:38 -05:00
strawberry 4d7b5eb759 add version argument, move import to test body
Signed-off-by: strawberry <strawberry@pupbrain.dev>
2023-11-25 15:53:33 -05:00
strawberry 8fffb6ea04 fix compilation with no zstd, use correct key, bump 2 deps
Signed-off-by: strawberry <strawberry@pupbrain.dev>
2023-11-25 15:46:03 -05:00
strawberry 0c4604b482 bump ruma, add wrong room keys error code, tiny logging change
can't update ruma to very latest commit because of the weird JsOption thing for syncv4 that i can't wrap my head around how to use, not important anyways

Signed-off-by: strawberry <strawberry@pupbrain.dev>
2023-11-25 12:42:05 -05:00
strawberry e9cd8caaed add feature flagged support for migrating from base64 file name keys to sha256 ones
core implementation and tests from https://gitlab.com/famedly/conduit/-/merge_requests/467
feature flag, base64 encode update, and tweaks were me

Signed-off-by: strawberry <strawberry@pupbrain.dev>
2023-11-25 11:38:28 -05:00
Val Lorentz d092820699 Fetch server keys concurrently
This speeds up handling of /_matrix/federation/v1/send/:transaction_id
when more than one event contains unknown keys.

In particular, when receiving multiple PDUs with dead servers in their
auth chain, timeouts of each server accumulate and can make handling of
incoming requests take several minutes, to the point the client closes
the connection (eg. matrix.org has a 2 minute timeout), causing new
events to be dropped eventually.
2023-11-25 11:38:28 -05:00
strawberry 87d1040386 bump various deps (except for the HTTP libs currently), use my
rust-rocksdb fork, add optional opt-in zstd response body compression
config, add webp support for images

cant upgrade things like axum, http, tower, hyper, etc due to the 1.0
release of http which are breaking all of these libs

Signed-off-by: strawberry <strawberry@pupbrain.dev>
2023-11-25 11:36:55 -05:00
girlbossceo 3533645959 bump rust-argon2
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-11-10 20:50:36 -05:00
girlbossceo 65b682c841 bump rocksdb
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-11-10 20:47:09 -05:00
girlbossceo af1f7404f1 add notification_push_path global
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-28 23:43:41 -04:00
girlbossceo 16c3a38761 remove another unnecessary unwrap/expect
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-28 23:43:08 -04:00
girlbossceo 6931f4b778 reduce more unnecessary logging and improve a tad
dead servers in rooms are not relevant to log, keep it as info/debug

Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-28 23:40:44 -04:00
girlbossceo 64084fb2d0 use a proper function for this instead of checking 200
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-28 22:36:47 -04:00
girlbossceo 9bb1dca5f1 mark unused variables as unusued
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-28 22:34:50 -04:00
girlbossceo 03af588efb don't unwrap reqwest requests for appservice and pushers too
this is another denial of service vector, but less severe than the federation one.

Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-28 22:34:09 -04:00
girlbossceo 8b95399387 add support for modifying the default notification pusher path
this is not officially in spec yet, but who cares? matrix team certainly doesn't care.

Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-28 22:31:11 -04:00
girlbossceo b8acacfb3e use light owasp defs instead of argon2 defs
the ones now used by default in rust-argon2 are extremely aggressive and
resource intensive. owasp's 2nd default is very reasonable with the same
security.

Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-28 22:15:36 -04:00
tezlm 23ec725923 remove unnecessary config overwrite
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-28 22:14:21 -04:00
girlbossceo 95187419f9 do not expect/unwrap requests
causes tokio runtime worker to panic as we attempt to convert an HTTP
Request from ruma (try_into_http_request) into a reqwest Request so the
reqwest http client on the server can execute said request. error
message is not ideal ("invalid port number") but core issue is fixed.

Co-authored-by: infamous <ehuff007@gmail.com>
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-28 09:05:23 -04:00
girlbossceo 8b28225af9 add lz4 to rocksdb features
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-23 22:22:42 -04:00
Rohan Kumar d08beada62 Stop using default features for rocksdb
We only need zstd and snappy
2023-10-21 21:18:45 -07:00
Jakub Kubík 58a83f06b1 feat(presence): add granular allow configuration 2023-10-21 22:31:16 -04:00
Jakub Kubík ba03edfae9 feat(presence): implement presence functionality 2023-10-21 22:31:06 -04:00
girlbossceo 22eff2d29c clean up few unnecessary warnings
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-21 16:15:42 -04:00
girlbossceo 05c08c8529 fix device name federation control
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-21 12:19:21 -04:00
girlbossceo 6e46f56929 error log thing
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-21 12:18:59 -04:00
girlbossceo a3d219e401 tweak rocksdb, use direct io
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-21 12:18:41 -04:00
girlbossceo c223f8284c bump deps, update rocksdb
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-10-21 12:18:07 -04:00
girlbossceo e486c35faa don't skip tracing for event_handler
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-24 13:01:54 -04:00
girlbossceo f72fd67a71 remove dbg's, update rocksdb, use iouring
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-24 10:17:26 -04:00
girlbossceo 0390d19b56 log state res error
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-24 10:17:06 -04:00
girlbossceo 28b63e913f unix sockets
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 21:49:53 -04:00
girlbossceo fda30f5602 fix: add destination field authorization handler (not my commit)
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 21:47:37 -04:00
girlbossceo ebd2ec45b1 fix: Do not allow fetching cached remote users' profiles over federation (nyaaori)
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 21:47:37 -04:00
girlbossceo 1b75d384d7 option to control federating device display names
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 21:47:35 -04:00
girlbossceo 81e8df3102 options to control public room directory visibility
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 21:46:43 -04:00
girlbossceo 76c00283de woof woof
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 21:46:41 -04:00
June 84338cc827 aggressive optimisations
Signed-off-by: June <june@girlboss.ceo>
2023-09-13 21:46:06 -04:00
June 100cae49b6 add my Cross config
Signed-off-by: June <june@girlboss.ceo>
2023-09-13 21:46:06 -04:00
Tobias Bucher 9c3b3daafc Use upstream reqwest instead of vendored one
This uses the `ClientBuilder::dns_resolver` function that was added in
reqwest 0.11.13, instead of the homebrew `ClientBuilder::resolve_fn`.
2023-09-13 21:46:06 -04:00
girlbossceo 42efc9deaf Implement UNIX sockets
Initial implementation done in https://gitlab.com/famedly/conduit/-/merge_requests/507,
*substantially* reworked, corrected, improved by infamous <ehuff007@gmail.com>,
and few parts done by me.

Co-authored-by: infamous <ehuff007@gmail.com>
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 20:49:02 -04:00
girlbossceo 81e68434d8 update few deps
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 20:39:03 -04:00
girlbossceo 618036dc31 support querying _matrix-fed and _matrix
_matrix-fed is the new IANA registered SRV record service name
per MSC4040. _matrix is now considered deprecated in Matrix 1.8.
see 3.3 and 3.4 of https://spec.matrix.org/v1.8/server-server-api/#resolving-server-names

Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 20:36:03 -04:00
girlbossceo 6695b8d8b6 mark room versions 1 and 2 as unstable
even though these rooms would be quite broken as they typically would be
super super old rooms, people seem to still complain about conduit not
"supporting" room versions 1 and 2. to make them happy, just make them
as unstable so they can at least join it.

Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 20:36:03 -04:00
girlbossceo 87c527ad79 remove unused trace
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 20:36:03 -04:00
girlbossceo 6e672a3592 mark room version 11 as unstable
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 20:36:03 -04:00
girlbossceo 40908b24e7 set default room version to 10
this has been the new default since Matrix 1.6, and V10 has been flagged
as stable for a while in Conduit

Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-09-13 20:36:03 -04:00
Timo Kösters 3bfdae795d Merge branch 'sliding' into 'next'
Sliding sync improvements and redaction fixes

See merge request famedly/conduit!549
2023-09-13 18:57:57 +00:00
Timo Kösters 75c80df271 Sliding sync improvements and redaction fixes 2023-09-13 20:54:53 +02:00
Timo Kösters 094cb888d4 Merge branch 'badacl' into 'next'
fix: ACL error shouldn't break the whole request

See merge request famedly/conduit!542
2023-09-13 18:46:03 +00:00
Timo Kösters fa725a14e2 Merge branch 'lukehmcc-next-patch-37096' into 'next'
Update README.md to fix typo & fix compatibility with new versions of docker compose

See merge request famedly/conduit!545
2023-09-11 18:34:06 +00:00
Luke McCarthy 9b3664aeeb Update README.md to fix typo & fix compatibility with new versions of docker compose 2023-08-27 02:14:03 +00:00
Jonas Zohren 90fea00dc7 Merge branch 'docs-docker-coturn' into 'next'
Docs: coturn instructions for docker

See merge request famedly/conduit!498
2023-08-23 14:18:42 +00:00
Jonas Zohren 20924a44f1 Suggestion on how to generate a secure key 2023-08-23 11:17:47 +02:00
purplemeteorite 38d6426b0e coturn setup instructions for docker 2023-08-23 11:09:21 +02:00
Timo Kösters 9b55ce933a Back off from more events, don't retry auth events 2023-08-12 09:53:32 +02:00
Timo Kösters f73a657a23 fix: ACL error shouldn't break the whole request 2023-08-11 20:29:22 +02:00
Timo Kösters 6dfb262ddf Merge branch 'patch-3' into 'next'
log handling previous event time as debug

See merge request famedly/conduit!540
2023-08-11 09:27:42 +00:00
Timo Kösters 75cdc3a1f6 Merge branch 'roomversionwarnings' into 'next'
Do not show "Invalid room version" errors when server is not in room

See merge request famedly/conduit!541
2023-08-11 09:27:23 +00:00
Timo Kösters 11103a92ed Do not show "Invalid room version" errors when server is not in room 2023-08-11 10:48:48 +02:00
girlbossceo ce2017a10e log handling previous event time as debug
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-08-10 23:12:37 +00:00
Timo Kösters 0c2cfda3ae Merge branch 'next' into 'master'
Merge remote-tracking branch 'origin/next'

See merge request famedly/conduit!538
2023-08-10 17:01:56 +00:00
Timo Kösters 4bf8ee1f74 Merge branch 'nextversion' into 'next'
Bump version to v0.6.0

See merge request famedly/conduit!537
2023-08-10 16:58:47 +00:00
Timo Kösters 5d16948030 Bump version to v0.6.0 2023-08-10 18:57:52 +02:00
Timo Kösters b7b2eb9d05 Merge branch 'trust' into 'next'
improvement: matrix.org is default trusted server if unspecified

See merge request famedly/conduit!536
2023-08-10 15:50:16 +00:00
Timo Kösters 19bfee1835 improvement: matrix.org is default trusted server if unspecified 2023-08-10 17:45:58 +02:00
Timo Kösters 9db87550fd Merge branch 'admincommands' into 'next'
improvement: more forgiving admin command syntax

See merge request famedly/conduit!535
2023-08-10 15:36:29 +00:00
Timo Kösters 606b25b9e7 improvement: more forgiving admin command syntax 2023-08-10 17:26:55 +02:00
Timo Kösters fd9e52a559 More sanity checks 2023-08-10 11:45:31 +02:00
Timo Kösters 0a0f227601 Merge branch 'registrationtokens' into 'next'
Registrationtokens

Closes #372

See merge request famedly/conduit!533
2023-08-09 20:27:19 +00:00
Timo Kösters 183558150d fix: don't show removed rooms in space 2023-08-09 22:21:21 +02:00
Timo Kösters c028e0553c feat: registration tokens 2023-08-09 18:27:30 +02:00
Timo Kösters 2581f7a10b Merge branch 'fix-broken-links' into 'next'
Docs: Fix broken links in docker documentation

See merge request famedly/conduit!520
2023-08-09 07:55:49 +00:00
Timo Kösters 3e518773e2 Merge branch 'improvements' into 'next'
cross signing fixes

See merge request famedly/conduit!532
2023-08-07 16:11:11 +00:00
Timo Kösters 888f7e4403 Merge branch 'more-logging-enrichment' into 'next'
Slightly more logging improvements

See merge request famedly/conduit!530
2023-08-07 16:04:12 +00:00
Timo Kösters d82c26f0a9 Avatars for sliding sync DMs 2023-08-07 17:54:08 +02:00
Timo Kösters c1e2ffc0cd improvement: maybe cross signing really works now 2023-08-07 13:55:44 +02:00
June 06fccbc340 debug log before and after nofile soft limit increases
Signed-off-by: June <june@girlboss.ceo>
2023-08-03 14:51:39 -10:00
girlbossceo fbd8090b0b log room ID for invalid room topic event errors
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-08-03 08:54:47 -10:00
Timo Kösters 06ab707c79 Merge branch 'rusqlite-update' into 'next'
bump rusqlite to 0.29.0

See merge request famedly/conduit!529
2023-08-02 05:06:54 +00:00
Timo Kösters 174a580319 Merge branch 'base64-update' into 'next'
update base64 to 0.21.2

See merge request famedly/conduit!528
2023-08-02 05:06:24 +00:00
June fbb256dd91 bump rusqlite to 0.29.0
Signed-off-by: June <june@girlboss.ceo>
2023-08-01 15:09:55 -10:00
June 5a7bade476 update base64 to 0.21.2
Signed-off-by: June <june@girlboss.ceo>
2023-08-01 14:48:50 -10:00
Timo Kösters d2bfcb018e Merge branch 'error-leak-fix' into 'next'
sanitise potentially sensitive errors

See merge request famedly/conduit!523
2023-08-01 11:25:06 +00:00
Timo Kösters 08f0f17ff7 Merge branch 'msteenhagen-next-patch-18830' into 'next'
Removed ambiguity in deploy.md

See merge request famedly/conduit!525
2023-08-01 11:23:47 +00:00
Timo Kösters 57b86f1130 Merge branch 'msteenhagen-next-patch-22350' into 'next'
Correct option error adduser in DEPLOY.md

See merge request famedly/conduit!526
2023-08-01 11:23:28 +00:00
Maarten Steenhagen 3a6eee7019 Correct option error adduser in DEPLOY.md 2023-08-01 11:03:31 +00:00
Maarten Steenhagen 9ce1cad983 Changed 'right' to 'appropriate' to avoid ambiguity (original could be read as right-hand-side) 2023-08-01 10:58:07 +00:00
Timo Kösters 10da9485a5 Merge branch 'threads' into 'next'
fix: threads get updated properly

See merge request famedly/conduit!524
2023-07-31 14:24:11 +00:00
Timo Kösters acfe381dd3 fix: threads get updated properly
Workaround for element web while waiting for https://github.com/matrix-org/matrix-js-sdk/pull/3635
2023-07-31 16:18:23 +02:00
girlbossceo 83805c66e5 sanitise potentially sensitive errors
prevents errors like DB or I/O errors from leaking filesystem paths

Co-authored-by: infamous <ehuff007@gmail.com>
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-07-30 17:30:16 +00:00
Timo Kösters afd8112e25 Merge branch 'spaces' into 'next'
Automatic update checker

See merge request famedly/conduit!522
2023-07-29 19:55:51 +00:00
Timo Kösters b8c164dc60 feat: version checker 2023-07-29 21:53:57 +02:00
Timo Kösters 0453a72890 Merge branch 'patch-1' into 'next'
fix: s/ok_or/ok_or_else in relevant places

See merge request famedly/conduit!521
2023-07-29 19:19:05 +00:00
girlbossceo e2c914cc11 fix: s/ok_or/ok_or_else in relevant places
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-07-29 19:17:12 +00:00
Timo Kösters da907451e7 Admin commands to sign and verify jsons 2023-07-29 20:00:12 +02:00
Timo Kösters 2b4a6c96ee Merge branch 'small-logging-improvements' into 'next'
Slight logging improvements

See merge request famedly/conduit!517
2023-07-29 15:00:42 +00:00
girlbossceo d7061e6984 cargo fmt
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-07-29 14:30:48 +00:00
girlbossceo 3494d7759e Return "Hello from Conduit!" on the / route
akin to Synapes's "It works!" page, removing an unnecessary warning
about / route being unknown

Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-07-29 14:29:26 +00:00
girlbossceo cc5dcceacc Log the room ID, event ID, PDU, and event type where possible
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-07-29 14:29:26 +00:00
girlbossceo 863103450c Log the unknown login type in warning level
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-07-29 14:29:26 +00:00
girlbossceo a0148a9996 Print relevant room ID and ACL'd server in informational level
These are room ACLs, not server ACLs. Causes confusion where people
think their Conduit homeserver was ACL'd. Print where these are coming from
in informational level.

Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-07-29 14:29:26 +00:00
girlbossceo 1f867a2c86 Only print raw malformed JSON body in debug level
Signed-off-by: girlbossceo <june@girlboss.ceo>
2023-07-29 14:29:26 +00:00
purplemeteorite c0a2acb869 Merge branch 'next' into 'fix-broken-links'
# Conflicts resolved:
#   docker/README.md
2023-07-29 08:02:56 +00:00
Timo Kösters 97835541ce Merge branch 'uak-next-patch-77212' into 'next'
Change link from docker-compose.override.traefik.yml to docker-compose.override.yml in README.md

See merge request famedly/conduit!514
2023-07-29 07:13:58 +00:00
purplemeteorite 081cc66eda fixed broken traefik links in docker README 2023-07-29 08:26:34 +02:00
purplemeteorite 7489e2c4f6 moved docker-compose.yml into the docker folder 2023-07-29 08:23:17 +02:00
Timo Kösters 1e675dbb68 Merge branch 'next' into 'next'
Docs: OCI image registries and tags

See merge request famedly/conduit!492
2023-07-28 19:34:42 +00:00
Timo Kösters f4c1748ab1 Merge branch 'bugfix/well-known-missing' into 'next'
It's ok not being able to find a .well-known response.

See merge request famedly/conduit!519
2023-07-28 15:45:59 +00:00
Tobias Tom 7990822f72 It's ok not being able to find a .well-known response. 2023-07-28 16:26:40 +01:00
Timo Kösters 2a100412fa Merge branch 'relax-rocksdb' into 'next'
relax recovery mode

See merge request famedly/conduit!516
2023-07-27 06:12:31 +00:00
Timo Kösters 3e7652909b Merge branch 'maximize-fd-limit' into 'next'
maximize fd limit

See merge request famedly/conduit!515
2023-07-27 06:11:05 +00:00
Charles Hall 9fb8498067 relax recovery mode 2023-07-26 15:32:36 -07:00
Charles Hall 291290db92 maximize fd limit 2023-07-26 13:24:44 -07:00
uak 54a115caf3 Change link from docker-compose.override.traefik.yml to docker-compose.override.yml in README.md 2023-07-26 18:53:19 +00:00
Timo Kösters 81866170f0 Merge branch 'spaces' into 'next'
fix: spaces with restricted rooms

See merge request famedly/conduit!513
2023-07-26 06:40:00 +00:00
Timo Kösters bf46829595 fix: spaces with restricted rooms 2023-07-26 08:34:12 +02:00
Timo Kösters 9f14ad7125 Merge branch 'sync-up-debian-packaging' into 'next'
Sync up Debian packaging

See merge request famedly/conduit!510
2023-07-24 17:10:45 +00:00
Timo Kösters 90a10c84ef Merge branch 'slidingfixes' into 'next'
Better sliding sync

See merge request famedly/conduit!511
2023-07-24 08:48:27 +00:00
Timo Kösters d220641d64 Sliding sync subscriptions, e2ee, to_device messages 2023-07-24 10:42:52 +02:00
Timo Kösters caddc656fb slightly better sliding sync 2023-07-24 10:42:47 +02:00
Paul van Tilburg b1a591a06c Also create the conduit (system) group
The `chown` command mentioned later in `DEPLOY.md` needs this group to
exist. Also make sure this account cannot be used to login with by
disabling its password and its shell.

This is similar to how the Debian `postinst` script does this.
2023-07-23 12:53:43 +02:00
Paul van Tilburg 3cd3d0e0ff Add section about how to download/install/deploy
This refers to `DEPLOY.md` as to not duplicate the information.
2023-07-23 12:53:36 +02:00
Paul van Tilburg 433dad6ac2 Turn README.Debian into a markdown file
It is common to have a markdown file per deployment subdirectory.
Still install it as `README.Debian` to `/usr/share/doc/matrix-conduit`
as per Debian policy.

Also update the link in the main `README.md` file.
2023-07-23 12:37:38 +02:00
Paul van Tilburg 8cf408e966 Fix up permissions of the database path
Also apply the database creation and ownership change on every
installation and upgrade.
2023-07-23 12:37:38 +02:00
Timo Kösters 1e560529d8 Merge branch 'nix-upkeep' into 'next'
Nix upkeep

See merge request famedly/conduit!505
2023-07-23 09:23:41 +00:00
Timo Kösters ff98444d03 Merge branch 'nogroup' into 'next'
[Security fix] Create dedicated user group

See merge request famedly/conduit!509
2023-07-23 09:22:39 +00:00
x4u 82f31d6b72 Replace nogroup with dedicated user group 2023-07-23 14:21:36 +08:00
Charles Hall 6ae5143ff5 only listen on IPv6 since that's what conduit does 2023-07-21 12:12:37 -07:00
purplemeteorite bd8fec3836 changed registry options
1. Recommended GitLab's own registry over Docker Hub. (Reason: https://gitlab.com/famedly/conduit/-/merge_requests/492#note_1457220261)
2. Added the development image :next to the list of options.
3. Displayed text for Docker Hub now contains "docker.io" as part of the link for easier copy-paste for podman users. Clicking on the link still takes to the website.
2023-07-21 20:33:32 +02:00
Charles Hall 742331e054 Revert "only use musl on x86_64"
This reverts commit 56f0f3dfa4.

This shouldn't be needed anymore since [this][0] reached nixos-unstable.

[0]: https://github.com/NixOS/nixpkgs/pull/242889
2023-07-16 13:48:05 -07:00
Charles Hall abd8e1bf54 nixpkgs' rocksdb is now new enough :)
This reverts commit abd0a014e8.
2023-07-16 13:47:42 -07:00
Charles Hall fa3b1fd9bd update flake.lock
Flake lock file updates:

• Updated input 'crane':
    'github:ipetkov/crane/75f7d715f8088f741be9981405f6444e2d49efdd' (2023-06-13)
  → 'github:ipetkov/crane/8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e' (2023-07-07)
• Updated input 'crane/rust-overlay':
    'github:oxalica/rust-overlay/c535b4f3327910c96dcf21851bbdd074d0760290' (2023-06-03)
  → 'github:oxalica/rust-overlay/f9b92316727af9e6c7fee4a761242f7f46880329' (2023-07-03)
• Updated input 'fenix':
    'github:nix-community/fenix/df0a6e4ec44b4a276acfa5a96d2a83cb2dfdc791' (2023-06-17)
  → 'github:nix-community/fenix/39096fe3f379036ff4a5fa198950b8e79defe939' (2023-07-16)
• Updated input 'fenix/rust-analyzer-src':
    'github:rust-lang/rust-analyzer/a5a71c75e62a0eaa1b42a376f7cf3d348cb5dec6' (2023-06-16)
  → 'github:rust-lang/rust-analyzer/996e054f1eb1dbfc8455ecabff0f6ff22ba7f7c8' (2023-07-15)
• Updated input 'flake-utils':
    'github:numtide/flake-utils/a1720a10a6cfe8234c0e93907ffe81be440f4cef' (2023-05-31)
  → 'github:numtide/flake-utils/919d646de7be200f3bf08cb76ae1f09402b6f9b4' (2023-07-11)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/04af42f3b31dba0ef742d254456dc4c14eedac86' (2023-06-17)
  → 'github:NixOS/nixpkgs/8acef304efe70152463a6399f73e636bcc363813' (2023-07-15)
2023-07-16 13:37:40 -07:00
Timo Kösters e9946f81a0 Merge branch 'e2eefed' into 'next'
fix: e2ee over federation

See merge request famedly/conduit!504
2023-07-16 14:54:44 +00:00
Timo Kösters a9ba067e77 fix: e2ee over federation 2023-07-16 16:50:03 +02:00
Timo Kösters 706148f941 Merge branch 'nhekobug' into 'next'
fix: nheko e2ee verification bug

See merge request famedly/conduit!503
2023-07-15 21:46:12 +00:00
Timo Kösters 24402312c5 fix: could not verify own events 2023-07-15 23:43:25 +02:00
Jonas Zohren 17180a3e08 capitalize names 2023-07-13 16:54:56 +00:00
Timo Kösters 3c6ffd88bf Merge branch 'unbreak-aarch64-nix' into 'next'
only use musl on x86_64

See merge request famedly/conduit!502
2023-07-11 14:11:45 +00:00
Timo Kösters c3966f501c fix: nheko e2ee verification bug 2023-07-10 23:10:27 +02:00
Charles Hall 56f0f3dfa4 only use musl on x86_64
Since that's all I've tested it on. Apparently this caused issues on
aarch64 even though it allegedly shouldn't.
2023-07-10 11:06:19 -07:00
Timo Kösters ad06d475de Merge branch 'sliding' into 'next'
Very basic Element X support and fixes

See merge request famedly/conduit!501
2023-07-10 14:35:35 +00:00
Timo Kösters 0b4e3de9c0 fix: spaces with restricted rooms 2023-07-10 16:28:08 +02:00
Timo Kösters edd4a3733f fix: actually clear memory in the admin commands 2023-07-10 16:27:42 +02:00
Timo Kösters c17187777f fix: never try federation with self 2023-07-10 16:26:36 +02:00
Timo Kösters 78e7b711df fix: better sliding sync 2023-07-10 16:25:33 +02:00
Timo Kösters 4b7d3e24dd bump ruma 2023-07-10 16:24:57 +02:00
Timo Kösters e4f769963f feat: very simple sliding sync implementation 2023-07-06 10:32:25 +02:00
Jonas Zohren eab5dac6e8 Merge branch 'fix-docker-build-image-size' into 'next'
ci: Fix "0 B" image size display

See merge request famedly/conduit!499
2023-07-04 21:18:25 +00:00
Jonas Zohren c4824a6ebc ci: Fix "0 B" image size display
works around gitlab issue https://gitlab.com/gitlab-org/gitlab/-/issues/388865#workaround
2023-07-04 21:13:11 +00:00
Timo Kösters f8a36e7554 Merge branch 'memory' into 'next'
improvement: better memory usage and admin commands to analyze it

See merge request famedly/conduit!497
2023-07-03 17:43:27 +00:00
Timo Kösters a2c3256ced improvement: better memory usage and admin commands to analyze it 2023-07-03 19:41:07 +02:00
Timo Kösters 833c1505f1 Merge branch 'hierarchy' into 'next'
feat: space hierarchies

See merge request famedly/conduit!495
2023-07-03 13:56:47 +00:00
Timo Kösters bac13d08ae fix: cache invalidation 2023-07-02 22:50:50 +02:00
Timo Kösters f0a27dcb00 Merge branch 'next' into 'next'
update example configurations in DEPLOY.md for Apache and Nginx which include...

See merge request famedly/conduit!493
2023-07-02 20:20:31 +00:00
Timo Kösters 9d49d599f3 feat: space hierarchies 2023-07-02 22:12:06 +02:00
Jacob Taylor 2640f67e4b remove comments 2023-07-02 18:00:30 +00:00
Timo Kösters eb8bc1af8d Merge branch 'jplatte/axum06' into 'next'
Upgrade axum to 0.6

See merge request famedly/conduit!494
2023-07-02 07:02:04 +00:00
Jonas Platte 0ded637b4a Upgrade axum to 0.6 2023-06-29 11:20:52 +02:00
Jacob Taylor dc50197a13 update example configurations in DEPLOY.md for Apache and Nginx which include upstream proxy timeouts of 5 minutes to allow for room joins which take a while 2023-06-29 02:42:32 +00:00
purplemeteorite 06a1321e56 easier-to-read docker setup instructions 2023-06-28 18:51:44 +02:00
Timo Kösters 6a6f8e80f1 Merge branch 'joinfix' into 'next'
improvement: randomize server order for alias joins

See merge request famedly/conduit!491
2023-06-28 15:47:36 +00:00
Timo Kösters fd1ccbd3ad improvement: randomize server order for alias joins 2023-06-28 17:44:30 +02:00
Timo Kösters 3a1a72df98 Merge branch 'stateres' into 'next'
Make state resolution more resistant and some sync performance improvements

See merge request famedly/conduit!490
2023-06-28 10:46:32 +00:00
Timo Kösters 84784970b2 Merge branch 'fix/docker-ci-pipeline' into 'next'
ci: Adjust to current docker

See merge request famedly/conduit!488
2023-06-27 18:54:40 +00:00
Timo Kösters d64a56d88b Do soft fail check before doing state res to allow leave events 2023-06-27 18:48:34 +02:00
Timo Kösters be877ef719 Improve sync performance with more caching and wrapping things in Arcs to avoid copies 2023-06-27 13:15:11 +02:00
Timo Kösters 7c6d25dcd1 Do state res even if the event soft fails 2023-06-27 13:13:33 +02:00
Timo Kösters b671238aa0 Merge branch 'rumafix' into 'next'
bump ruma

See merge request famedly/conduit!489
2023-06-26 21:11:20 +00:00
Timo Kösters 91180e011d bump ruma 2023-06-26 23:10:26 +02:00
Jonas Zohren 26b8605fa0 ci: Adjust to current docker 2023-06-26 22:26:33 +02:00
Timo Kösters dbd360ebb9 Merge branch 'unbreak' into 'next'
fix rustc version, nix upkeep

See merge request famedly/conduit!482
2023-06-26 19:12:46 +00:00
Timo Kösters 48e6e0659f Merge branch 'relations' into 'next'
Add relations endpoints, edits and threads work now

See merge request famedly/conduit!487
2023-06-26 19:11:57 +00:00
Timo Kösters 72eb1972c1 Add relations endpoints, edits and threads work now 2023-06-26 12:38:51 +02:00
Timo Kösters 63cbaedb79 Merge branch 'bearerfix' into 'next'
fix: send correct bearer token to appservices

Closes #358

See merge request famedly/conduit!486
2023-06-26 07:16:20 +00:00
Timo Kösters db6def8800 fix: send correct bearer token to appservices 2023-06-26 09:15:52 +02:00
Timo Kösters caa841c434 Merge branch 'contextfix' into 'next'
fix: /context for element android. start and end must be set even with limit=0

See merge request famedly/conduit!485
2023-06-26 06:34:10 +00:00
Timo Kösters 49a0f3a60d fix: /context for element android. start and end must be set even with limit=0 2023-06-26 08:33:31 +02:00
Timo Kösters bac82f43af Merge branch 'compressionoff' into 'next'
Disable compression, see https://en.wikipedia.org/wiki/BREACH

See merge request famedly/conduit!484
2023-06-25 21:46:34 +00:00
Timo Kösters 15cc801840 Disable compression, see https://en.wikipedia.org/wiki/BREACH 2023-06-25 23:43:54 +02:00
Timo Kösters 5f9ca8e458 Merge branch 'threads' into 'next'
feat: WIP relationships and threads

See merge request famedly/conduit!483
2023-06-25 20:59:53 +00:00
Timo Kösters c7e0ea525a feat: WIP relationships and threads 2023-06-25 19:40:33 +02:00
Charles Hall abd0a014e8 nixpkgs' rocksdb is too old :( 2023-06-17 17:04:57 -07:00
Charles Hall 4a7d3c7301 upgrade rust in Cargo.toml/flake.nix
Looks like this should've happened as part of !479.
2023-06-17 17:04:11 -07:00
Charles Hall 15e60818c9 pin nixos-unstable, update flake.lock
`nixos-unstable` is the rolling release channel of NixOS. The default is
the master branch, which doesn't always have a populated binary cache
and so may result in compiling a bunch of stuff unnecessarily.
2023-06-17 17:02:10 -07:00
Timo Kösters def079267d Merge branch 'adjust-to-rust-version-bumps' into 'next'
chore(ci): Adjust to rust version bumps

See merge request famedly/conduit!479
2023-06-10 15:35:22 +00:00
Jonas Zohren a3a9b60abc chore(ci): Adjust to rust version bumps 2023-06-10 15:35:22 +00:00
Timo Kösters 808b12f618 Merge branch 'restricted' into 'next'
fix: restricted room error is now FORBIDDEN

See merge request famedly/conduit!478
2023-06-08 18:52:03 +00:00
Timo Kösters faa9208a3e cargo fmt 2023-06-08 20:51:34 +02:00
Timo Kösters 1ea27c4f97 fix: restricted room error is now FORBIDDEN 2023-06-08 20:49:42 +02:00
Timo Kösters 422ee40107 Merge branch 'mr-conduit-appservice-login' into 'next'
feat: support end to bridge encryption

See merge request famedly/conduit!454
2023-05-26 12:48:23 +00:00
Timo Kösters 0280fa5793 Merge branch 'next' into 'next'
fix nix readme to work with ipv6

See merge request famedly/conduit!475
2023-05-26 12:30:02 +00:00
digital 664d6baace fix: make requested changes 2023-05-26 13:06:28 +02:00
Jade be9196430d fix nix readme to work with ipv6 2023-05-25 18:21:01 +00:00
Jonas Zohren 533bccad8f Merge branch '350-debian-package-from-docker-packager-result-doesn-t-seem-to-install-configuration-files' into 'next'
Fix CI + Debian packaging

Closes #350

See merge request famedly/conduit!474
2023-05-21 20:41:08 +00:00
Jonas Zohren a4261aac76 * Fix Debian builds by actually including the whole debian directory into deb creation
* Fix CI by explicitly setting hostname of docker in docker service
* Fix Docker build by bumping the Rust version to 1.69
* Fix cargo check in CI by bumping the Rust version to 1.69
2023-05-21 20:41:08 +00:00
Timo Kösters c38df57279 Merge branch 'deploymd' into 'next'
Minor DEPLOY.md changes

See merge request famedly/conduit!473
2023-05-21 13:17:29 +00:00
Timo Kösters 4e2bbf9d6a Minor DEPLOY.md changes 2023-05-21 15:16:23 +02:00
Timo Kösters 7a9ec851fc Merge branch 'bump' into 'next'
Bump dependencies

See merge request famedly/conduit!472
2023-05-21 11:45:20 +00:00
Timo Kösters d62cd2ae51 chore: bump dependencies 2023-05-21 13:42:59 +02:00
Timo Kösters 49b5af6d45 chore: bump rocksdb 2023-05-21 13:41:51 +02:00
Timo Kösters 1f1444da8c Merge branch 'pushrules' into 'next'
Improvements to pushrules endpoints

Closes #316

See merge request famedly/conduit!461
2023-05-21 10:41:31 +00:00
Timo Kösters 2a9a908343 Merge branch 'x4u/add-apache-cloudflare-deploy-info' into 'next'
X4u/add apache cloudflare deploy info

See merge request famedly/conduit!471
2023-05-21 07:04:59 +00:00
x4u 921b266d86 X4u/add apache cloudflare deploy info 2023-05-21 07:04:58 +00:00
Timo Kösters dbbd164e39 Merge branch 'admin-command-fix' into 'next'
Recognize admin commands without : after tag

See merge request famedly/conduit!470
2023-05-17 19:09:54 +00:00
Jonathan Flueren f5e3b0e2dd Recognize admin commands without : after tag
Very useful since many Matrix clients don't insert : after user tags
2023-05-15 19:25:57 +00:00
Timo Kösters 1b9e63f426 Merge branch 'unbreak-nix' into 'next'
Fix Nix builds (actually) (for real) (it seriously builds this time)

See merge request famedly/conduit!466
2023-04-05 09:59:09 +00:00
Charles Hall eb4323cc0f use mold on linux 2023-04-04 19:16:07 -07:00
Charles Hall a6712627e4 tiny refactor 2023-04-04 19:15:09 -07:00
Charles Hall 3be32c4dac factor out shared things 2023-04-04 17:52:15 -07:00
Charles Hall 55149e3336 use crane instead of naersk
I guess naersk still doesn't support git dependencies using workspace
inheritance, but crane does.
2023-04-04 17:42:24 -07:00
Charles Hall 2b63e46fc5 use system rocksdb
This mostly just improves build times.
2023-04-04 17:42:13 -07:00
Charles Hall a0c449e570 update flake.lock 2023-04-04 17:09:49 -07:00
Charles Hall c997311bea Revert "build(nix): fix flake builds"
This reverts commit 5d913f7010.

Sorry, I don't understand how any of this works, and it seems pretty
opaque/difficult to fine-tune.
2023-04-04 17:02:34 -07:00
Kévin Commaille 1929ca5d9d Add a database migration to fix and update the default pushrules 2023-03-18 15:03:57 +01:00
Kévin Commaille 88c6bf7595 Always return an error if a push rule is not found 2023-03-18 15:03:57 +01:00
Kévin Commaille 4635644e21 Use the ruma methods for managing rulesets 2023-03-18 15:03:57 +01:00
Kévin Commaille f53ecaa97d Bump Ruma 2023-03-18 15:03:56 +01:00
Timo Kösters f704169aeb Merge branch 'fixjoin' into 'next'
fix: let requests continue event if client disconnects

See merge request famedly/conduit!464
2023-03-18 07:59:36 +00:00
Timo Kösters 2a7c4693b8 fix: don't accept new requests when shutting down 2023-03-18 08:58:20 +01:00
Timo Kösters da3871f39a fix: let requests continue event if client disconnects 2023-03-17 22:45:13 +01:00
Timo Kösters 664ee7d89a Merge branch 'backfill' into 'next'
feat: handle backfill requests

See merge request famedly/conduit!459
2023-03-16 13:32:42 +00:00
Timo Kösters 42b12934e3 Don't crash when a room errors 2023-03-13 10:43:09 +01:00
Timo Kösters 63f787f635 Reduce logs from info to debug 2023-03-13 10:39:19 +01:00
Timo Kösters a1bd348977 fix: history visibility 2023-03-13 10:39:19 +01:00
Timo Kösters 27f29ba699 fix: SRV lookups should end with a period 2023-03-13 10:39:19 +01:00
Timo Kösters cb0ce5b08f Logs for server resolution 2023-03-13 10:39:18 +01:00
Timo Kösters b7c99788e4 All the logs 2023-03-13 10:39:18 +01:00
Timo Kösters 2316d89048 Even more logging 2023-03-13 10:39:18 +01:00
Timo Kösters bde4880c1d fix: don't unwrap server keys 2023-03-13 10:39:18 +01:00
Timo Kösters 8b648d0d3f fix: force abort federation requests after 2 minutes 2023-03-13 10:39:18 +01:00
Timo Kösters 4617ee2b6b More logging for remote joins 2023-03-13 10:39:18 +01:00
Timo Kösters 10fa686c77 feat: respect history visibility 2023-03-13 10:39:18 +01:00
Timo Kösters 2a16a5e967 fix: don't send nulls as unsigned content 2023-03-13 10:39:17 +01:00
Timo Kösters 2aa0a2474b fix: ignore unparsable pdus in /send 2023-03-13 10:39:17 +01:00
Timo Kösters d39003ffc0 Allow backfilling create event itself 2023-03-13 10:39:17 +01:00
Timo Kösters eae0989c40 fix: refactor backfill and add support for search 2023-03-13 10:39:17 +01:00
Timo Kösters 17a6431f5f fix: make backfilled events reachable 2023-03-13 10:39:17 +01:00
Timo Kösters fcfb06ffa6 fix: allow handling create event itself 2023-03-13 10:39:17 +01:00
Timo Kösters 7bdd9660aa feat: ask for backfill 2023-03-13 10:39:17 +01:00
Timo Kösters 23b18d71ee feat: handle backfill requests
Based on https://gitlab.com/famedly/conduit/-/merge_requests/421
2023-03-13 10:39:16 +01:00
Timo Kösters 84cfed5231 Merge branch 'fix-nix-build' into 'next'
Fix Nix flake build

See merge request famedly/conduit!456
2023-02-18 21:18:51 +00:00
Timo Kösters cdcf4a017d Merge branch 'fixreset' into 'next'
fix: allow reactivation of users using reset-password admin command

See merge request famedly/conduit!458
2023-02-11 11:49:54 +00:00
Timo Kösters fc0aff20cf fix: allow reactivation of users using reset-password admin command 2023-02-11 12:43:41 +01:00
Timo Kösters 4223288cdf Merge branch 'fixbadservernameusers' into 'next'
fix: ignore bad user ids in migration

See merge request famedly/conduit!457
2023-02-07 16:19:59 +00:00
Timo Kösters a4f18f99ad fix: ignore bad user ids 2023-02-07 16:29:41 +01:00
Jonas Zohren 06df04f61c Merge branch 'fix_docker_healthcheck_for_address' into 'next'
Add a dynamic address resolution to the Docker healthcheck

See merge request famedly/conduit!434
2023-01-27 22:43:04 +00:00
Moritz Heiber cfcc9086ff Add a dynamic address resolution to the Docker healthcheck 2023-01-27 22:43:04 +00:00
Yusuf Bera Ertan 11b9cfad5e docs: update nix comment for rust-version in Cargo.toml 2023-01-28 00:14:58 +03:00
Yusuf Bera Ertan 5d913f7010 build(nix): fix flake builds 2023-01-28 00:10:21 +03:00
Jonas Zohren d68dad580b Merge branch 'complement-improvements' into 'next'
Complement improvements

See merge request famedly/conduit!404
2023-01-27 16:41:34 +00:00
Jonathan de Jong e13dc7c14a add little readme 2023-01-26 18:28:33 +01:00
Jonathan de Jong b158896396 Merge remote-tracking branch 'origin/next' into complement-improvements 2023-01-26 18:19:39 +01:00
Timo Kösters f95dd4521c Merge branch 'validate-state-of-admins-room' into 'next'
Validate PDU in admins room

See merge request famedly/conduit!382
2023-01-24 13:46:49 +00:00
Timo Kösters 1e77373332 Merge branch 'braid/ci-magic' into 'next'
fix: adjust CI config to runner requirements

See merge request famedly/conduit!455
2023-01-19 07:46:36 +00:00
The one with the braid f01b96588d fix: adjust CI config to runner requirements
- make use of more stable BTRFS driver
- set default pull policy to `if-not-present`

Signed-off-by: The one with the braid <the-one@with-the-braid.cf>
2023-01-19 07:42:23 +01:00
digital 4d589d9788 feat: support end to bridge encryption
by implementing appservice logins
2023-01-18 23:34:18 +01:00
Timo Kösters 815db0d962 Merge branch 'joinfix' into 'next'
Maybe fix room joins

See merge request famedly/conduit!453
2023-01-14 20:22:55 +00:00
Timo Kösters 809c9b4481 Maybe fix room joins
This is a workaround for https://github.com/hyperium/hyper/issues/2312
2023-01-14 21:20:16 +01:00
Timo Kösters c6e3438e76 Merge branch 'trusted-servers-doc' into 'next'
document `trusted_servers` option

See merge request famedly/conduit!451
2023-01-09 16:35:54 +00:00
Charles Hall 844508bc48 document trusted_servers option 2023-01-09 08:14:13 -08:00
Timo Kösters b3aec63d67 Merge branch 'partial-nix-fix' into 'next'
partial nix fix

See merge request famedly/conduit!446
2023-01-09 15:58:40 +00:00
Timo Kösters 2da4ae6b3b Merge branch 'code-of-conduct' into 'next'
Add Contributor's Covenant Code of Conduct

See merge request famedly/conduit!448
2023-01-09 15:37:19 +00:00
Timo Kösters 5e6b498c22 Merge branch 'fix-nix-docs' into 'next'
fix nix docs

See merge request famedly/conduit!449
2023-01-09 15:35:39 +00:00
Charles Hall 391beddaf4 fix nix docs
I made some silly copy paste errors while writing this...
2023-01-08 12:44:59 -08:00
r3g_5z 112b76b1c1 Add Contributor's Covenant Code of Conduct
Signed-off-by: r3g_5z <june@girlboss.ceo>
2023-01-08 02:44:25 -05:00
Charles Hall 315944968b remind people to update the hash
And offer help since it's pretty easy but impossible if you don't have
Nix installed.
2022-12-23 00:30:36 -08:00
Charles Hall 9f74555c88 update flake.lock 2022-12-23 00:29:43 -08:00
Charles Hall 0a4e8e5909 update rust toolchain hash 2022-12-23 00:29:43 -08:00
Timo Kösters 19156c7bbf Update Cargo.lock 2022-12-21 16:16:07 +01:00
Timo Kösters 2a66ad4329 Bump version to 0.6.0-alpha 2022-12-21 16:08:05 +01:00
Timo Kösters 53f14a2c4c Merge remote-tracking branch 'origin/next' 2022-12-21 15:51:47 +01:00
Timo Kösters d20f21ae32 Merge branch 'nextversion' into 'next'
Preparing for v0.5.0 release

See merge request famedly/conduit!443
2022-12-21 13:12:18 +00:00
Timo Kösters f7db3490f6 Bump version to v0.5.0 2022-12-21 14:08:09 +01:00
Timo Kösters c7a7c913d4 Bump ruma 2022-12-21 14:08:08 +01:00
Timo Kösters 76a82339a2 tweak default rocksdb settings 2022-12-21 13:44:23 +01:00
Timo Kösters 94df9cdbba Merge branch 'Nyaaori/prev_events-config-option' into 'next'
Make prev_events fetch limit configurable

See merge request famedly/conduit!422
2022-12-21 11:06:42 +00:00
Timo Kösters b231d7f15c Merge branch 'Nyaaori/membership-events-reason' into 'next'
Implement membership ban/join/leave/invite reason

See merge request famedly/conduit!442
2022-12-21 10:58:05 +00:00
Nyaaori 7cc346bc18 feat: Implement membership ban/join/leave/invite reason support 2022-12-21 11:45:12 +01:00
Timo Kösters 48bc0db723 Merge branch 'Nyaaori/code-cleanup' into 'next'
Code Cleanup

See merge request famedly/conduit!441
2022-12-21 10:00:40 +00:00
Nyaaori 7c196f4e00 feat: Add max prev events config option, allowing adjusting limit for prev_events fetching 2022-12-21 10:55:32 +01:00
Nyaaori c86313d4fa chore: code cleanup
https://rust-lang.github.io/rust-clippy/master/index.html#op_ref

https://rust-lang.github.io/rust-clippy/master/index.html#str_to_string

https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
2022-12-21 10:42:12 +01:00
Timo Kösters 7b98741163 Merge branch 'restrictedjoinlocally' into 'next'
improvement: handle restricted joins locally

See merge request famedly/conduit!439
2022-12-18 08:51:31 +00:00
Timo Kösters 2a04c213f9 improvement: handle restricted joins locally 2022-12-18 09:44:46 +01:00
Timo Kösters d7eaa9c5cc Merge branch 'logging-cleanup' into 'next'
Replace println/dbg calls with corresponding macros from tracing crate

See merge request famedly/conduit!424
2022-12-18 06:57:23 +00:00
Timo Kösters 2a0515f528 Replace println/dbg calls with corresponding macros from tracing crate 2022-12-18 07:52:22 +01:00
Timo Kösters 3930fd08d7 Merge branch 'docs' into 'next'
Update README

See merge request famedly/conduit!438
2022-12-18 06:06:26 +00:00
Timo Kösters 683eefbd0b Update README 2022-12-18 07:02:07 +01:00
Timo Kösters d963ad8cc1 Merge branch 'jaegerfix' into 'next'
fix: jaeger support

See merge request famedly/conduit!437
2022-12-18 05:52:49 +00:00
Timo Kösters 6d5e54a66b fix: jaeger support 2022-12-18 06:37:03 +01:00
Timo Kösters 2b2bfb91c2 Merge branch 'up-ruma' into 'next'
Upgrade Ruma

See merge request famedly/conduit!435
2022-12-18 05:05:33 +00:00
Timo Kösters f1d2574651 finish upgrade ruma 2022-12-17 09:28:08 +01:00
Jonas Platte d39ce1401d WIP: Upgrade Ruma 2022-12-16 11:57:32 +01:00
Jonas Platte 7fd5b22e3b The procMacro option has long been on by default
… and it's good to let people have their own local configs that won't be
tracked by git.
2022-12-16 10:12:11 +01:00
Timo Kösters db7a7085f4 Merge branch 'fix/pushrules_database' into 'next'
Migrate database to use correct rule id in pushrules.

See merge request famedly/conduit!405
2022-12-16 08:38:49 +00:00
Timo Kösters 5894d35eb2 Merge branch 'fixrestrictedjoin' into 'next'
fix: rejoining restricted rooms over federation

See merge request famedly/conduit!431
2022-11-30 21:32:12 +00:00
Timo Kösters b9fd6127e2 fix: rejoining restricted rooms over federation 2022-11-30 22:30:55 +01:00
Jonas Zohren bb9bc0a001 Merge branch 'dockerdoc-nginx-content-type' into 'next'
Describe a better way to enforce Content-Type in nginx

See merge request famedly/conduit!415
2022-11-29 17:56:14 +00:00
Timo Kösters f4dd051a1d Merge branch 'sd-notify' into 'next'
call sd-notify after init and before exit

See merge request famedly/conduit!426
2022-11-28 15:50:12 +00:00
Vladan Popovic 06d3efc4d0 feat(systemd): call sd-notify after init and before exit 2022-11-27 22:17:15 +01:00
Vladan Popovic 66ad114e19 feat: add systemd feature flag 2022-11-27 22:17:15 +01:00
Jonas Zohren 4b737b46ac Merge branch 'cross-compiling' into 'next'
Added cross-compilation instructions

See merge request famedly/conduit!430
2022-11-27 20:15:48 +00:00
Orhideous bcd522e75f Added cross-compilation instructions to DEPLOY.md 2022-11-27 20:15:47 +00:00
Jonas Zohren 249960b111 Merge branch 'fix-lock' into 'next'
Update Cargo.lock

See merge request famedly/conduit!427
2022-11-25 21:44:31 +00:00
Andriy Kushnir (Orhideous) 583aea187b Update Cargo.lock 2022-11-25 23:13:58 +02:00
Timo Kösters 396dac6d82 Merge branch 'fixroomleave' into 'next'
fix: unable to leave room

See merge request famedly/conduit!419
2022-11-21 20:04:27 +00:00
Timo Kösters 9149be31af Merge branch 'logs-cleanup' into 'next'
Clean some noisy logs

See merge request famedly/conduit!423
2022-11-21 20:03:17 +00:00
Timo Kösters 32a4ded4a1 Merge branch 'Nyaaori/reduce-generated-token-length' into 'next'
Reduce length of generated access tokens and session ids

See merge request famedly/conduit!386
2022-11-21 20:02:20 +00:00
Timo Kösters e3dabdf525 Merge branch 'Nyaaori/cleanup' into 'next'
misc. cleanup

See merge request famedly/conduit!420
2022-11-21 19:59:45 +00:00
Nyaaori b59304a4df Reduce length of generated access tokens and session ids
Reduces generated tokens and session ids down to 32 characters (~190 bits of entropy) in length
2022-11-21 20:51:59 +01:00
Nyaaori 66bc41125c refactor: cleanup 2022-11-21 20:50:39 +01:00
Nyaaori 6786c44f4d chore: Fix MSRV
Ruma requires Rust 1.64
2022-11-21 20:50:30 +01:00
Andriy Kushnir (Orhideous) a3a1db124d Clean some noisy logs 2022-11-21 21:48:06 +02:00
Timo Kösters 3b3c451c83 fix: unable to leave room 2022-11-21 19:50:48 +01:00
Timo Kösters cf99316082 Merge branch 'dendritefix' into 'next'
Dendrite invite fix

See merge request famedly/conduit!416
2022-11-09 20:27:22 +00:00
Timo Kösters c063700255 fix: invite dendrite users 2022-11-09 21:14:17 +01:00
Timo Kösters 7540227388 chore: bump dependencies 2022-11-09 18:46:10 +01:00
Ticho 34782694 09015f113c Describe a better way to enforce Content-Type in nginx
add_header will not override the Content-Type header set by the server,
but will instead add another header below, which is obviously not ideal.

The proposed change will instead tell nginx to set the correct value for
this header straight away.
2022-11-08 15:56:24 +00:00
Paul Beziau a2d8aec1e3 Moving the unwraping of a variable
Moving the unwraping of the variable "rule" inside the condition instead of the if body, for the migration of the database from version 11 to 12.
2022-11-03 13:12:53 +00:00
Timo Kösters ccdaaceb33 Merge branch 'ci-revamp-2022-10' into 'next'
Fix CI

See merge request famedly/conduit!414
2022-11-02 16:47:48 +00:00
Jonas Zohren b37876f3b2 fix(ci): Only build in (remote host) docker and switch to glibc 2022-11-02 12:12:48 +01:00
Timo Kösters e8e0a4dcc5 Merge branch 'Nyaaori/fix-trusted-server-panic' into 'next'
Cleanly handle invalid response from trusted server instead of panicking

See merge request famedly/conduit!411
2022-10-31 11:35:55 +00:00
Nyaaori 23cf39c525 Cleanly handle invalid response from trusted server instead of panicking 2022-10-31 12:28:30 +01:00
Nyaaori 00996dd834 Cargo Clippy 2022-10-31 09:31:17 +01:00
Timo Kösters 2a52f666dc Merge branch 'fixtyping' into 'next'
Fix typing indicators and unencrypted messages in encrypted rooms

See merge request famedly/conduit!409
2022-10-30 20:25:45 +00:00
Timo Kösters 0cf6545116 fix: not sending enough state on join 2022-10-30 21:23:43 +01:00
Timo Kösters 5d691f405e fix: stuck typing indicators 2022-10-30 21:22:32 +01:00
Timo Kösters c61914c8e1 Merge branch 'fixhead' into 'next'
fix: HEAD requests should continue to produce METHOD_NOT_ALLOWED

See merge request famedly/conduit!402
2022-10-30 19:45:58 +00:00
Timo Kösters 9548c84d32 Merge branch 'fixnotifcount' into 'next'
fix: element android did not reset notification counts

See merge request famedly/conduit!408
2022-10-30 19:43:39 +00:00
Timo Kösters 02dd3d32f2 fix: element android did not reset notification counts 2022-10-30 20:41:32 +01:00
Timo Kösters 7c98ba64aa fix: HEAD requests should produce METHOD_NOT_ALLOWED 2022-10-30 19:53:05 +01:00
Jonathan de Jong 52018c3967 allow complement dockerfile to copy over target folder 2022-10-28 21:04:05 +02:00
Timo Kösters e86fb11512 Merge branch 'nabulator-next-patch-84388' into 'next'
Update nginx configuration to allow for larger uploads.

See merge request famedly/conduit!407
2022-10-28 13:32:02 +00:00
Timo Kösters 20e3c42456 Merge branch 'add-nix-flake' into 'next'
add nix flake

See merge request famedly/conduit!403
2022-10-28 13:31:21 +00:00
Nabulator 1aff2a54ef comment typo 2022-10-27 04:23:07 +00:00
Nabulator 238ebcfcac Update nginx configuration to allow for larger uploads. 2022-10-27 04:20:56 +00:00
Timo Kösters 876fdf480d Merge branch '3pid_403_next' into 'next'
Return 403 to 3pid token routes to signal not implemented

See merge request famedly/conduit!375
2022-10-25 20:47:41 +00:00
James Blachly 3bc0a1924b Return 403 to 3pid token routes to signal not implemented 2022-10-25 20:47:41 +00:00
Timo Kösters 4af998963b Merge branch 'fix-axum-request-size' into 'next'
fix(main): fix request size limit to max_request_size (axum defaults 2MB)

See merge request famedly/conduit!406
2022-10-25 20:34:33 +00:00
AndSDev 10d2da3009 fix(main): fix request size limit to max_request_size (axum defaults 2MB) 2022-10-25 12:53:58 +03:00
Paul Beziau d47c1a8ba6 Fix database version check & code formating 2022-10-21 12:27:11 +00:00
Paul Beziau 9c0c74f547 Migrate database to use correct rule id in pushrules.
it convert :
- ".m.rules.call" to ".m.rule.call"
- ".m.rules.room_one_to_one" to ".m.rule.room_one_to_one"
- ".m.rules.encrypted_room_one_to_one" to ".m.rule.encrypted_room_one_to_one"
- ".m.rules.message" to ".m.rule.message"
- ".m.rules.encrypted" to ".m.rule.encrypted"

related to issue #264
2022-10-18 09:15:07 +00:00
Jonathan de Jong 215d909e59 More debug info when try_from_http_request fails 2022-10-17 18:41:59 +02:00
Jonathan de Jong ada15ceacc Complement improvements 2022-10-17 18:41:45 +02:00
Charles Hall 716f82db6d add nix/nixos deployment documentation 2022-10-16 10:50:52 -07:00
Charles Hall fe7d8c4f12 add nix flake
Also add `.envrc` for direnv + Nix users. This makes developing locally
easier for us NixOS folks.

The flake itself will allow NixOS users to pull code directly from
Conduit's repository, making it completely trivial to stay up-to-date
with every commit.

I'd also like to add a NixOS module directly to this repository at some
point so that new configuration options will be available in the NixOS
module faster. But for now, NixOS users can simply override
`serivces.matrix-conduit.package` and get pretty much all the
functionality.

I've added myself to the `CODEOWNERS` file for the Nix files, since I am
willing to maintain this stuff. I use Conduit on NixOS so I'm personally
invested in having this work.

Lastly, `.gitignore` was updated to exclude symlinks created by `direnv`
and `nix build` and other such Nix commands.

This doesn't come without maintenance burden, however:

* The `sha256` in `flake.nix` will need to be updated whenever Conduit's
  MSRV is updated, but that should be pretty infrequent.

* `nix flake update` should be run every so often to pull in updates to
  `nixpkgs` and other flake inputs. I think downstream users can also
  override this themselves with `inputs.<name>.inputs.<name>.follows`.

* `nix flake check` should be run in CI to ensure Nix builds keep
  working.

* `nixpkgs-fmt --check $(fd '\.nix')` (or similar) should be run in CI
  to ensure style uniformity.
2022-10-15 19:26:53 -07:00
Timo Kösters cb2b5beea8 Merge branch 'fix_persy' into 'next'
fix: update persy implementation after refactor

See merge request famedly/conduit!396
2022-10-15 12:13:36 +00:00
Timo Kösters 2231a69b4c fix: make previous MR compile 2022-10-15 14:07:27 +02:00
Timo Kösters 13052388a7 Merge branch 'conduit-next' into next 2022-10-15 13:55:39 +02:00
Max Cohen 6fd39ae174 Raise 404 when room doesn't exist
Raise 404 "Room not found" when changing or accessing room visibility
settings (`GET` and `PUT
/_matrix/client/r0/directory/list/room/{roomId}`).
See issue #290
2022-10-15 13:52:58 +02:00
Timo Kösters 2627ca5e3d Merge branch 'update-rust' into 'next'
update rust to avoid a cargo problem

See merge request famedly/conduit!395
2022-10-15 11:50:55 +00:00
Timo Kösters ed5b8d6a46 Merge branch 'Nyaaori/fix-whoami-appservices' into 'next'
Fix is_guest value on whoami for appservice users

Closes #310

See merge request famedly/conduit!401
2022-10-15 11:32:49 +00:00
Nyaaori 2d0fdddd34 Do not return true for is_guest on whoami for appservice users 2022-10-15 13:17:58 +02:00
Timo Kösters 3054af41ba Merge branch 'Nyaaori/bump-default-room-version' into 'next'
Bump default room version to V9

See merge request famedly/conduit!400
2022-10-15 11:02:44 +00:00
Nyaaori 1e1a144dfa Move room version 10 out of experimental/unstable 2022-10-15 12:17:06 +02:00
Nyaaori cc3e1f58cc Bump default room version to V9; per matrix spec recommendation 2022-10-15 12:16:02 +02:00
Timo Kösters b1991c8f4f Merge branch 'Nyaaori/rejoin-fix' into 'next'
Rejoin over federation if we are not participating

See merge request famedly/conduit!399
2022-10-15 09:56:55 +00:00
Timo Kösters 6f7f2820ce Merge branch 'Nyaaori/restricted-join-fix' into 'next'
Fix doing restricted joins into rooms we are not participating in

See merge request famedly/conduit!398
2022-10-15 09:50:25 +00:00
Nyaaori e9697f13d6 Handle initiating restricted joins over federation
Allows Conduit users to join restricted rooms if we are not currently participating
2022-10-15 10:46:50 +02:00
Nyaaori 3b0aa23fdf Rejoin room over federation if we are not participating in it; do not include invited users in participating servers calculation 2022-10-15 10:38:30 +02:00
Timo Kösters aca6218c0a Merge branch 'unrecognizedmethods' into 'next'
fix: send unrecognized error on wrong http methods

See merge request famedly/conduit!397
2022-10-15 08:35:39 +00:00
Timo Kösters 3a45628e1d fix: send unrecognized error on wrong http methods 2022-10-15 00:28:43 +02:00
AndSDev e923f63c49 fix(service/rooms/timeline): fix validating for non-joined members 2022-10-14 14:45:05 +03:00
Tglman 842feabced fix: update persy implementation after refactor 2022-10-13 20:02:36 +01:00
Charles Hall 286936db32 msrv is 1.63 in Cargo.toml; use that 2022-10-13 08:26:46 -07:00
Charles Hall bf7c4b4001 update rust to avoid a cargo problem
We were hitting [this bug][0] when trying to select a version for clap
^4.

[0]: https://github.com/rust-lang/cargo/issues/10623
2022-10-13 08:06:49 -07:00
AndSDev d755a96c2c refactor(service/rooms/timeline): add cache for server_name 2022-10-13 11:19:51 +00:00
Timo Kösters c948324cf2 Merge branch 'fix-admin-help' into 'next'
fix `@conduit help` not working in the admin room

See merge request famedly/conduit!392
2022-10-13 11:15:49 +00:00
AndSDev 76f81ac201 feat(db/rooms): disable banning for last user and conduit user in admins room 2022-10-13 14:15:23 +03:00
Timo Kösters ce188daccb Merge branch 'conduit-lower-default-log-level' into HEAD 2022-10-13 13:13:03 +02:00
exin 98702da4e6 Lower default log level for docker 2022-10-13 13:11:15 +02:00
exin 92f7f0c849 Lower log level commented config options 2022-10-13 13:11:15 +02:00
exin 7451abe3ea Lower default log level for docker and debian 2022-10-13 13:11:14 +02:00
exin 3e6c66b899 Fix formatting 2022-10-13 13:11:14 +02:00
exin 3a40bf8ae0 Add error for invalid log config
Log config falls back to "warn"
2022-10-13 13:11:14 +02:00
exin 9c922db14b Lower default log level
Update config-example.toml to accordingly

Closes #281
2022-10-13 13:11:13 +02:00
Timo Kösters 175fba5739 Merge branch 'fix-login-token' into 'next'
fix(client/login): username in lowercase for login by token

See merge request famedly/conduit!380
2022-10-13 11:08:04 +00:00
AndSDev 912491cb28 style(db/rooms): refactor admin room pdu validating 2022-10-13 14:04:26 +03:00
AndSDev da2dbd2877 feat(db/rooms): disable leaving from admin room for last user 2022-10-13 13:09:26 +03:00
AndSDev c67f95ebff feat(db/rooms): disable leaving from admin room for conduit user 2022-10-13 13:01:18 +03:00
AndSDev 3a8321f9ad feat(db/rooms): encryption is not allowed in the admins room 2022-10-13 12:50:23 +03:00
Timo Kösters f46d64e52f Merge branch 'unstability' into 'next'
Mark unstable versions as unstable in /capabilities

See merge request famedly/conduit!394
2022-10-13 09:39:45 +00:00
Timo Kösters 8c6e75a0cd Mark unstable versions as unstable in /capabilities 2022-10-13 10:27:42 +02:00
Timo Kösters c23b4946c5 Merge branch 'fixallthebugs' into 'next'
fix: all the e2ee problems

See merge request famedly/conduit!393
2022-10-13 08:21:12 +00:00
Timo Kösters ac52b234fa fix: all the e2ee problems 2022-10-13 10:15:35 +02:00
AndSDev 9a47069f45 fix(client/login): username in lowercase for login by token 2022-10-13 06:40:17 +00:00
Charles Hall 7ef9fe3454 add regression tests
This way we don't regress on accident again in the future.
2022-10-12 17:58:43 -07:00
Charles Hall fc852f8be6 resolve cargo check --features clap/deprecated
This has no functional effects.
2022-10-12 17:55:12 -07:00
Charles Hall 4710f739c0 clap v4 turned more things into optional features
So we need to re-enable some things. See their changelog[0] for details.

[0]: https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#migrating
2022-10-12 17:55:12 -07:00
Charles Hall 3c20c1b72e fix cargo test 2022-10-12 17:55:12 -07:00
Timo Kösters 37eb686b5b Merge branch 'fixfluffy' into 'next'
fix: fluffychat login works again

See merge request famedly/conduit!391
2022-10-12 15:37:50 +00:00
Timo Kösters fdd64fc966 fix: fluffychat login works again 2022-10-12 17:18:01 +02:00
Timo Kösters 4d982d05af Merge branch 'claimfast' into 'next'
improvement: more efficient /claim

See merge request famedly/conduit!389
2022-10-12 09:09:23 +00:00
Timo Kösters 1e725bc548 Merge branch 'fixmakejoin' into 'next'
fix: make join should not send event id

See merge request famedly/conduit!390
2022-10-12 09:08:58 +00:00
Timo Kösters dd8f4681a2 fix: make join should not send event id 2022-10-12 10:57:54 +02:00
Timo Kösters 0290f1f355 improvement: more efficient /claim 2022-10-12 10:43:30 +02:00
Timo Kösters cd835fc7a8 Merge branch 'initialSyncFix' into 'next'
Initial sync fix

See merge request famedly/conduit!388
2022-10-11 21:24:19 +00:00
Timo Kösters 2b70d9604a fix: element gets stuck in /initialSync 2022-10-11 23:07:03 +02:00
Timo Kösters d3968c2fd1 fix: bump ruma again to fix state res problems 2022-10-11 21:51:20 +02:00
Timo Kösters 8105c5cc60 cargo fmt 2022-10-11 18:10:51 +02:00
Timo Kösters d1e5acd7b3 fix: don't panic on missing events in state 2022-10-11 17:59:49 +02:00
Timo Kösters 68227c06c3 fix: state for left rooms 2022-10-11 17:10:56 +02:00
Timo Kösters 31d1801912 fix: workaround for missing avatars on element and rooms becoming historical 2022-10-11 17:10:09 +02:00
Timo Kösters fb6bfa9753 fix: missing field origin error with synapse servers 2022-10-11 15:25:10 +02:00
Timo Kösters c30cc6120b fix: send right errors on make/send join in restricted rooms 2022-10-11 11:53:13 +02:00
Nyaaori 2b7c19835b Add room version 10 to experimental versions 2022-10-10 15:00:44 +02:00
Timo Kösters c2a5315e9f Merge branch 'm0dex/fix-signature-upload' into 'next'
fix(client/keys): ignore all but signed keys in signature upload route

See merge request famedly/conduit!378
2022-10-10 14:42:23 +02:00
Jakub Kubík 0ddc3c01ef style(client/keys): rename signature key to signed key 2022-10-10 14:41:43 +02:00
Jakub Kubík c15205fb46 fix(client/keys): ignore non-signature keys in signature upload route 2022-10-10 14:41:00 +02:00
Jonas Zohren cb837d5a1c Merge branch 'conduit-dockerfile-db-path' into 'next'
Dockerfile: changing DB path to be same as we are using in CI

See merge request famedly/conduit!371
2022-10-10 14:40:19 +02:00
majso 18ca2e4c29 Dockerfile: changing DB path to be same as we are using in CI 2022-10-10 14:39:36 +02:00
Timo Kösters a10dae38e2 Merge branch 'v4' into 'next'
Bump version to 0.4

See merge request famedly/conduit!368
2022-10-10 14:38:56 +02:00
Timo Kösters 7cf060ae5b Bump version to 0.4 2022-10-10 14:38:17 +02:00
Timo Kösters de9b0cec50 Merge branch 'lightning_bolt_option' into 'next'
Lightning bolt optional

See merge request famedly/conduit!366
2022-10-10 14:35:56 +02:00
Jonas Zohren 773eded0af Merge branch 'ci-split-cargo-test-and-clippy' into 'next'
Feat(ci): Split clippy into own fallible job

See merge request famedly/conduit!367
2022-10-10 14:35:15 +02:00
Jim df8703cc13 Lightning bolt optional 2022-10-10 14:34:28 +02:00
Jonas Zohren 71cffcd537 feat(ci): Split clippy into own fallible job
For some reason, the clippy build does not work.
This change allows the cargo:test job to still succeed
and the pipeline to pass
2022-10-10 14:13:18 +02:00
Nyaaori f430b87459 cargo clippy 2022-10-10 14:09:11 +02:00
Timo Kösters ca82b2940d fix: sending does not work
We were inserting one too many 0xff bytes
2022-10-10 14:02:05 +02:00
Timo Kösters 229444c932 Use ring-compat feature so out signing keys work again 2022-10-10 14:02:04 +02:00
Timo Kösters 076e9810ba cargo fix 2022-10-10 14:02:04 +02:00
Timo Kösters 6b131202b9 Bump ruma 2022-10-10 14:02:04 +02:00
Timo Kösters 275c6b447d Bump some dependencies 2022-10-10 14:02:04 +02:00
Timo Kösters 1a7893dbbd fix: update state_cache on join over federation 2022-10-10 14:02:03 +02:00
Timo Kösters 5a04559cb4 fix: maintain server list again 2022-10-10 14:02:03 +02:00
Timo Kösters 25c3d89f28 Bump rust version for const fn RwLock::new 2022-10-10 14:02:03 +02:00
Timo Kösters 8b5b7a1f63 fix: panic on launch
Now we start the admin and sending threads at a later time.
2022-10-10 14:02:02 +02:00
Timo Kösters 50b0eb9929 cargo fix 2022-10-10 14:02:02 +02:00
Timo Kösters 7822a385bb cargo fmt 2022-10-10 14:02:02 +02:00
Timo Kösters d5b4754cf4 0 errors left! 2022-10-10 14:02:02 +02:00
Timo Kösters f47a5cd5d5 cargo fix 2022-10-10 14:02:01 +02:00
Timo Kösters a4637e2ba1 cargo fmt 2022-10-10 14:02:01 +02:00
Timo Kösters 33a2b2b772 37 errors left 2022-10-10 14:02:01 +02:00
Timo Kösters 44fe6d1554 127 errors left 2022-10-10 14:02:00 +02:00
Timo Kösters cff52d7ebb messing around with arcs 2022-10-10 14:02:00 +02:00
Timo Kösters face766e0f messing with trait objects 2022-10-10 14:02:00 +02:00
Timo Kösters 8708cd3b63 431 errors left 2022-10-10 14:02:00 +02:00
Timo Kösters bd8b616ca0 Fixed more compile time errors 2022-10-10 13:54:00 +02:00
Nyaaori 785ddfc4aa refactor: prepare for more splits 2022-10-10 13:52:52 +02:00
Nyaaori 232978087a refactor: prepare database/key_value/media.rs from service/media.rs 2022-10-10 13:52:07 +02:00
Nyaaori 7946c5f29e refactor: prepare service/account_data/mod.rs from service/account_data.rs 2022-10-10 13:52:07 +02:00
Nyaaori efad401751 refactor: prepare service/account_data/data.rs from service/account_data.rs 2022-10-10 13:52:07 +02:00
Nyaaori e1e87b8d0c refactor: prepare service/admin/mod.rs from service/admin.rs 2022-10-10 13:52:07 +02:00
Nyaaori c6d1421e81 refactor: prepare service/key_backups/mod.rs from service/key_backups.rs 2022-10-10 13:52:06 +02:00
Nyaaori 5a29511d34 refactor: prepare service/key_backups/data.rs from service/key_backups.rs 2022-10-10 13:52:06 +02:00
Nyaaori d024d205c0 refactor: prepare service/media/mod.rs from service/media.rs 2022-10-10 13:52:06 +02:00
Nyaaori 4649cd82b5 refactor: prepare database/key_value/globals.rs from service/globals.rs 2022-10-10 13:52:05 +02:00
Timo Kösters 057f8364cc fix: some compile time errors
Only 174 errors left!
2022-10-10 13:25:01 +02:00
Timo Kösters 82e7f57b38 refactor state accessor, state cache, user, uiaa 2022-10-10 13:21:09 +02:00
Nyaaori 3e22bbeecd refactor: prepare for state accessor, state cache, user, and uiaa 2022-10-10 13:20:05 +02:00
Nyaaori 213579ee9d refactor: prepare database/key_value/uiaa.rs from service/uiaa/mod.rs 2022-10-10 13:19:31 +02:00
Nyaaori 810a6baf34 refactor: prepare service/uiaa/data.rs from service/uiaa/mod.rs 2022-10-10 13:19:31 +02:00
Nyaaori 61f6ac0d66 refactor: prepare service/rooms/state_accessor/data.rs from service/rooms/state_accessor/mod.rs 2022-10-10 13:19:31 +02:00
Nyaaori 6d981f37a2 refactor: prepare database/key_value/rooms/state_accessor.rs from service/rooms/state_accessor/mod.rs 2022-10-10 13:19:30 +02:00
Nyaaori 7e0b8ec0ac refactor: prepare database/key_value/rooms/user.rs from service/rooms/user/mod.rs 2022-10-10 13:19:30 +02:00
Nyaaori 19743ae195 refactor: prepare service/rooms/user/data.rs from service/rooms/user/mod.rs 2022-10-10 13:19:30 +02:00
Jakub Kubík fd0ea4bf71 feat(database/presence): add skeleton for presence maintenance 2022-10-10 13:00:55 +02:00
Timo Kösters f56424bc8d Refactor appservices, pusher, timeline, transactionids, users 2022-10-10 13:00:53 +02:00
Nyaaori 01bf348811 refactor: prepare for appservices, pusher, timeline, transactionids, and users 2022-10-10 13:00:06 +02:00
Nyaaori bea5d1e0d8 refactor: prepare database/key_value/rooms/timeline.rs from service/rooms/timeline/mod.rs 2022-10-10 12:56:13 +02:00
Nyaaori e8b33e8c5a refactor: prepare service/rooms/timeline/data.rs from service/rooms/timeline/mod.rs 2022-10-10 12:56:13 +02:00
Nyaaori dc7670f3a8 refactor: prepare service/users/mod.rs from service/users.rs 2022-10-10 12:56:12 +02:00
Nyaaori 94ce06bb76 refactor: prepare service/users/data.rs from service/users.rs 2022-10-10 12:56:12 +02:00
Nyaaori 70863260f6 refactor: prepare service/pusher/mod.rs from service/pusher.rs 2022-10-10 12:56:12 +02:00
Nyaaori cb9458122c refactor: prepare service/pusher/data.rs from service/pusher.rs 2022-10-10 12:56:12 +02:00
Nyaaori e62b0904ea refactor: prepare database/key_value/pusher.rs from service/pusher.rs 2022-10-10 12:56:11 +02:00
Nyaaori 306ff5ee4e refactor: prepare database/key_value/users.rs from service/users.rs 2022-10-10 12:56:11 +02:00
Timo Kösters e045abe961 refactor: work on auth chain and state compressor 2022-10-10 11:18:53 +02:00
Nyaaori 0daa3209db refactor: prepare for auth chain and state compressor 2022-10-10 11:17:43 +02:00
Nyaaori 8d0ed3ec51 refactor: prepare database/key_value/rooms/state_compressor.rs from service/rooms/state_compressor/mod.rs 2022-10-10 11:17:34 +02:00
Nyaaori 691e69847f refactor: prepare database/key_value/rooms/auth_chain.rs from service/rooms/state_compressor/mod.rs 2022-10-10 11:17:34 +02:00
Nyaaori c8f64844ab refactor: prepare service/rooms/auth_chain/mod.rs from service/rooms/state_compressor/mod.rs 2022-10-10 11:17:34 +02:00
Timo Kösters b0029c49b9 refactor: work on search 2022-10-10 10:46:39 +02:00
Nyaaori 91ad250177 refactor: prepare for search work 2022-10-10 10:43:52 +02:00
Nyaaori f6040ef2d7 refactor: prepare database/key_value/rooms/search.rs from service/rooms/timeline/mod.rs 2022-10-09 18:52:58 +02:00
Nyaaori 877ee48480 refactor: prepare database/key_value/rooms/search.rs from service/rooms/search/mod.rs 2022-10-09 18:52:58 +02:00
Timo Kösters 03e6e43ecd refactor: split up database/key_value.rs 2022-10-09 18:23:59 +02:00
Nyaaori 6ace16abf6 refactor: prepare to split up database/key_value.rs 2022-10-09 18:23:59 +02:00
Nyaaori 158de9ca08 refactor: prepare src/database/key_value/room/outlier.rs from src/database/key_value.rs 2022-10-09 18:23:58 +02:00
Nyaaori ea2dcf4ff0 refactor: prepare src/database/key_value/room/pdu_metadata.rs from src/database/key_value.rs 2022-10-09 18:23:58 +02:00
Nyaaori 332e7c9dba refactor: prepare src/database/key_value/room/state.rs from src/database/key_value.rs 2022-10-09 18:23:58 +02:00
Nyaaori 0213a32e6a refactor: prepare src/database/key_value/room/edus/typing.rs from src/database/key_value.rs 2022-10-09 18:23:57 +02:00
Nyaaori cd3a163816 refactor: prepare src/database/key_value/room/lazy_load.rs from src/database/key_value.rs 2022-10-09 18:23:57 +02:00
Nyaaori 2950349adf refactor: prepare src/database/key_value/room/metadata.rs from src/database/key_value.rs 2022-10-09 18:23:57 +02:00
Nyaaori 56cacf6f1c refactor: prepare src/database/key_value/room/alias.rs from src/database/key_value.rs 2022-10-09 18:23:56 +02:00
Nyaaori 0f77ae14e4 refactor: prepare src/database/key_value/room/directory.rs from src/database/key_value.rs 2022-10-09 18:23:56 +02:00
Nyaaori 8fa990330f refactor: prepare src/database/key_value/room/edus/presence.rs from src/database/key_value.rs 2022-10-09 18:23:56 +02:00
Nyaaori 84630f90b7 refactor: prepare src/database/key_value/room/edus/read_receipt.rs from src/database/key_value.rs 2022-10-09 18:23:56 +02:00
Jakub Kubík 1869a38b85 refactor(edus): split edus into separate modules 2022-10-09 18:23:55 +02:00
Nyaaori e39358d375 refactor: prepare to split edus into separate modules 2022-10-09 18:23:55 +02:00
Nyaaori c7e601eb0b refactor: prepare service/rooms/edus/typing/data.rs from service/rooms/edus/data.rs 2022-10-09 17:38:46 +02:00
Nyaaori ac4724e82c refactor: prepare service/rooms/edus/read_receipt/data.rs from service/rooms/edus/data.rs 2022-10-09 17:38:23 +02:00
Nyaaori 73217f238c refactor: prepare service/rooms/edus/presence/data.rs from service/rooms/edus/data.rs 2022-10-09 17:37:57 +02:00
Nyaaori d410f08642 refactor: prepare src/service/rooms/edus/typing/mod.rs from src/service/rooms/edus/mod.rs 2022-10-09 17:36:08 +02:00
Nyaaori bfccd4f136 refactor: prepare src/service/rooms/edus/presence/mod.rs from src/service/rooms/edus/mod.rs 2022-10-09 17:35:14 +02:00
Nyaaori c21820083b refactor: prepare src/service/rooms/edus/read_receipt/mod.rs from src/service/rooms/edus/mod.rs 2022-10-09 17:34:24 +02:00
Timo Kösters 865e35df17 Work on rooms/state, database, alias, directory, edus services, event_handler, lazy_loading, metadata, outlier, and pdu_metadata 2022-08-15 19:03:37 +02:00
Nyaaori 604b1a5cf1 refactor: Prepare src/database/key_value.rs 2022-08-15 18:58:03 +02:00
Nyaaori 81ac01c2f5 refactor: restore src/service/rooms/pdu_metadata/mod.rs 2022-08-15 18:47:01 +02:00
Nyaaori 1ccc226c6b refactor: prepare src/database/key_value.rs from src/service/rooms/pdu_metadata/mod.rs 2022-08-15 18:47:01 +02:00
Nyaaori 0ce4446b1a refactor: restore src/service/rooms/metadata/mod.rs 2022-08-15 18:47:00 +02:00
Nyaaori daa969508f refactor: restore src/service/rooms/outlier/mod.rs 2022-08-15 18:47:00 +02:00
Nyaaori 715b30a2b5 refactor: prepare src/database/key_value.rs from src/service/rooms/outlier/mod.rs 2022-08-15 18:47:00 +02:00
Nyaaori 42fe118cbe refactor: restore src/service/rooms/edus/mod.rs 2022-08-15 18:46:59 +02:00
Nyaaori 06bfddf0da refactor: restore src/service/rooms/lazy_loading/mod.rs 2022-08-15 18:46:59 +02:00
Nyaaori 931c8ece4a refactor: prepare src/database/key_value.rs from src/service/rooms/metadata/mod.rs 2022-08-15 18:46:59 +02:00
Nyaaori 85e571badd refactor: prepare src/database/key_value.rs from src/service/rooms/lazy_loading/mod.rs 2022-08-15 18:46:59 +02:00
Nyaaori 0071a9cbf4 refactor: restore src/service/rooms/directory/mod.rs 2022-08-15 18:46:58 +02:00
Nyaaori a563b1ba9a refactor: prepare src/database/key_value.rs from src/service/rooms/edus/mod.rs 2022-08-15 18:46:58 +02:00
Nyaaori 9e1ab74bb4 refactor: prepare src/database/key_value.rs from src/service/rooms/directory/mod.rs 2022-08-15 18:46:58 +02:00
Nyaaori adafb335ff refactor: restore src/service/rooms/state/mod.rs 2022-08-15 18:46:57 +02:00
Nyaaori 05487c7c15 refactor: restore src/service/rooms/alias/mod.rs 2022-08-15 18:46:57 +02:00
Nyaaori a2a327af7c refactor: prepare src/database/key_value.rs from src/service/rooms/state/mod.rs 2022-08-15 18:46:57 +02:00
Nyaaori 33c0e0f430 refactor: prepare src/database/key_value.rs from src/service/rooms/alias/mod.rs 2022-08-15 18:46:57 +02:00
Nyaaori 1442c64420 refactor: restore src/service/rooms/state/data.rs 2022-08-15 18:46:50 +02:00
Nyaaori 28644f236e refactor: prepare src/database/key_value.rs from src/service/rooms/state/data.rs 2022-08-15 18:46:50 +02:00
Timo Kösters cc80152889 refactor: split up force_state 2022-08-15 17:17:53 +02:00
Timo Kösters dcdbcc0851 refactor: event handling code 2022-08-15 17:12:22 +02:00
Nyaaori 1b0477d569 refactor: Preparation commit to split src/service/rooms/state.rs and src/api/server_server.rs 2022-08-15 17:09:41 +02:00
Nyaaori 57c92f8044 refactor: restore src/api/server_server.rs 2022-08-15 17:09:22 +02:00
Nyaaori e1d8c03e47 refactor: prepare splitting src/api/server_server.rs to src/service/rooms/event_handler/mod.rs 2022-08-15 17:09:15 +02:00
Nyaaori 7d2b22f58d refactor: prepare splitting src/service/rooms/state.rs to src/service/rooms/state_accessor/mod.rs 2022-08-15 17:08:33 +02:00
Nyaaori 9efd9f06c6 refactor: prepare splitting src/service/rooms/state.rs to src/service/rooms/state/data.rs 2022-08-15 17:07:33 +02:00
Nyaaori d0cbe46ff0 refactor: prepare splitting src/service/rooms/state.rs to src/service/rooms/state/mod.rs 2022-08-15 17:07:33 +02:00
Timo Kösters 025b64befc refactor: renames and split room.rs 2022-08-15 16:30:34 +02:00
Nyaaori 92e59f14e0 refactor: Preparation commit to split src/database/rooms.rs 2022-08-15 16:25:38 +02:00
Nyaaori 7989c7cdda refactor: prepare splitting src/database/rooms.rs to src/service/rooms/timeline.rs 2022-08-15 16:22:38 +02:00
Nyaaori e22f5fef1f refactor: prepare splitting src/database/rooms.rs to src/service/rooms/user.rs 2022-08-15 16:22:38 +02:00
Nyaaori 64a022a4d2 refactor: prepare splitting src/database/rooms.rs to src/service/rooms/state.rs 2022-08-15 16:22:37 +02:00
Nyaaori 751be39376 refactor: prepare splitting src/database/rooms.rs to src/service/rooms/state_cache.rs 2022-08-15 16:22:37 +02:00
Nyaaori d05b84d0f5 refactor: prepare splitting src/database/rooms.rs to src/service/rooms/state_compressor.rs 2022-08-15 16:22:37 +02:00
Nyaaori 54bf91b76e refactor: prepare splitting src/database/rooms.rs to src/service/rooms/outlier.rs 2022-08-15 16:22:36 +02:00
Nyaaori 8ed79a00fd refactor: prepare splitting src/database/rooms.rs to src/service/rooms/pdu_metadata.rs 2022-08-15 16:22:36 +02:00
Nyaaori 8dffdadfd3 refactor: prepare splitting src/database/rooms.rs to src/service/rooms/search.rs 2022-08-15 16:22:36 +02:00
Nyaaori 2dbfbd45a2 refactor: prepare splitting src/database/rooms.rs to src/service/rooms/short.rs 2022-08-15 16:22:36 +02:00
Nyaaori 249440115b refactor: prepare splitting src/database/rooms.rs to src/service/rooms/lazy_loading.rs 2022-08-15 16:22:35 +02:00
Nyaaori baa8224cce refactor: prepare splitting src/database/rooms.rs to src/service/rooms/metadata.rs 2022-08-15 16:22:35 +02:00
Nyaaori bd7b49b098 refactor: prepare splitting src/database/rooms.rs to src/service/rooms/mod.rs 2022-08-15 16:22:35 +02:00
Nyaaori 27e2f0d545 refactor: prepare splitting src/database/rooms.rs to src/service/rooms/alias.rs 2022-08-15 16:22:34 +02:00
Nyaaori 4dc14e1580 refactor: prepare splitting src/database/rooms.rs to src/service/rooms/directory.rs 2022-08-15 16:22:34 +02:00
Timo Kösters df16012661 Merge branch 'next' into 'master'
Release v0.4.0

See merge request famedly/conduit!369
2022-06-23 07:43:05 +00:00
Timo Kösters e8cd85fee4 Merge branch 'v4' into 'next'
Bump version to 0.4

See merge request famedly/conduit!368
2022-06-23 07:07:44 +00:00
Timo Kösters 35fd732b04 Bump version to 0.4 2022-06-23 09:06:39 +02:00
Timo Kösters 10b1557c0e Merge branch 'lightning_bolt_option' into 'next'
Lightning bolt optional

See merge request famedly/conduit!366
2022-06-23 06:58:34 +00:00
Jim 49bd75b856 Lightning bolt optional 2022-06-23 06:58:34 +00:00
Jonas Zohren 02f8218867 Merge branch 'ci-split-cargo-test-and-clippy' into 'next'
Feat(ci): Split clippy into own fallible job

See merge request famedly/conduit!367
2022-06-22 23:16:45 +00:00
Jonas Zohren 40eebbd9d8 feat(ci): Split clippy into own fallible job
For some reason, the clippy build does not work.
This change allows the cargo:test job to still succeed
and the pipeline to pass
2022-06-22 22:14:53 +00:00
Timo Kösters 9ee199b0c3 Merge branch 'deactivate-user-command' into 'next'
Deactivate user command

See merge request famedly/conduit!337
2022-06-19 19:38:07 +00:00
Zeyphros 1c31f7905f Update command comment to coincide with the default action 2022-06-19 18:59:49 +02:00
Zeyphros f6183e457d Implement command to deactivate user from admin channel
Use `leave_room` in `leave_all_rooms`

WIP: Add command to delete a list of users
also implements a flag to prevent the user from being removed from their joined rooms.

Report user deactivation failure reason

Don't send leave events by default when mass deactivating user accounts

Don't stop leaving rooms if an error was encountered

WIP: Rename command, make flags consistent, don't deactivate admin accounts.
Accounts should be deactivated as fast as possible and removing users from joined groups is completed afterwards.

Fix admin safety logic, improve command output

Continue leaving rooms if a room_id is invalid

Ignore errors from leave_room

Add notice to the list-local-users command
Output form list-local-users can be used directly without modification with the deactivate-all command

Only get mutex lock for admin room when sending message
2022-06-19 18:59:48 +02:00
Timo Kösters 2ecbcdda42 Merge branch 'upgrades' into 'next'
Upgrade dependencies

See merge request famedly/conduit!363
2022-06-19 15:11:21 +00:00
Timo Kösters 0c8e51e1b7 Upgrade dependencies 2022-06-19 15:40:14 +02:00
Timo Kösters 86b23338dd Merge branch 'password-length-consistency' into 'next'
Length of passwords consistently use the constant

See merge request famedly/conduit!361
2022-06-19 07:35:06 +00:00
Dietrich 7bee9c1c69 Length of passwords consistently use the constant 2022-06-19 07:10:47 +02:00
Timo Kösters 6ef1e8c4f9 Merge branch 'timo' into 'next'
More async

See merge request famedly/conduit!359
2022-06-18 20:56:26 +00:00
Timo Kösters 0bc03e90a1 improvement: make more things async 2022-06-18 22:55:37 +02:00
Timo Kösters 9b898248c7 feat: more admin commands, better logging 2022-06-18 22:55:34 +02:00
Timo Kösters 566dc0a6a2 Merge branch 'next' into 'next'
Remove outdated rust version info

See merge request famedly/conduit!360
2022-06-18 15:02:31 +00:00
Jim b4be087a46 Merge branch 'JimZAH-next-patch-83655' into 'next'
Remove rust version requirement from deploy.md

See merge request JimZAH/conduit!2
2022-06-18 14:57:30 +00:00
Jim 722e553c6e Remove rust version requirement from deploy.md 2022-06-18 14:47:32 +00:00
Timo Kösters f8547ecba4 Merge branch 'create-user-command' into 'next'
added a command to the admin bot to create a new user, even with registration disabled

See merge request famedly/conduit!354
2022-06-18 13:08:51 +00:00
Timo Kösters e70cff196b Merge branch 'fix-deb-postinst-config' into 'next'
Remove the address override in deb generated config

See merge request famedly/conduit!344
2022-06-18 11:21:31 +00:00
Timo Kösters 0286a804f4 Merge branch 'filter-users' into 'next'
Hide users from user directory if they are only in private rooms and they don't share a room

Closes #24

See merge request famedly/conduit!325
2022-06-18 11:17:09 +00:00
Radek Stępień 7239243163 Hide users from user directory if they are only in private rooms and they don't share a room 2022-06-18 11:17:09 +00:00
Timo Kösters 124471199c Merge branch 'registration-without-username' into 'next'
Allow registration without username

Closes #111

See merge request famedly/conduit!340
2022-06-18 11:13:37 +00:00
Radek Stępień 84ec057f6e Allow registration without username 2022-06-18 11:13:37 +00:00
Timo Kösters 8e08a72229 Merge branch 'bump-docker-image-to-alpine-3-16-0' into 'next'
chore(docker): Bump base image to alpine 3.16.0

See merge request famedly/conduit!355
2022-06-18 11:05:42 +00:00
Jonas Zohren e03a2b8636 chore(docker): Bump base image to alpine 3.16.0 2022-06-18 11:05:42 +00:00
Timo Kösters 83d3cbfa99 Merge branch 'rmsthebest-next-patch-62586' into 'next'
Added Caddy to the web proxy examples

See merge request famedly/conduit!352
2022-06-18 11:05:22 +00:00
Timo Kösters 84cb0667f3 Merge branch 'to_device-existing-txn-id' into 'next'
feat: if txn id exists in the db, skip the event

See merge request famedly/conduit!353
2022-06-18 11:04:16 +00:00
Jakub Kubík c3924b566b feat: if txn id exists in the db, skip the event 2022-06-18 11:04:16 +00:00
Timo Kösters 0f86506288 Merge branch 'Miepee-next-patch-24570' into 'next'
Mention different database backends in DEPLOY.md

See merge request famedly/conduit!358
2022-06-18 11:03:09 +00:00
Miepee b862283ed9 Mention different databse backends in DEPLOY.md 2022-06-16 13:23:45 +00:00
Timo Kösters ba682fa3b4 Merge branch 'kubo6472-next-patch-16934' into 'next'
Fix FluffyChat Compatibility

See merge request famedly/conduit!357
2022-06-15 20:42:40 +00:00
Jakub Doboš 8a63a2cc68 Fix FluffyChat Compatibility 2022-06-15 13:07:07 +00:00
Timo Kösters f6dc22127a Merge branch 'next' into 'next'
Add portforwarding + opening to the docs (+recommended extension fix)

See merge request famedly/conduit!356
2022-06-13 19:28:00 +00:00
Dietrich bd3f9e0dbe Fix spelling. 2022-06-13 20:45:12 +02:00
Dietrich 58d784aa29 Adding a hint to closed ports in the testing section 2022-06-13 20:23:08 +02:00
Dietrich ae8e143fe9 Add a section to Ports and forwarding 2022-06-13 20:08:18 +02:00
Dietrich d9782c508a rust-analyzer-extension moved to rust-lang
The recommended extension id could not be found as rust-analyzer now has the id `rust-lang.rust-analyzer`
2022-06-13 20:03:30 +02:00
Timo Kösters 39bc84d81c Merge branch 'fix_panic_on_long_message' into 'next'
Don't panic when signing event fails.

Closes #232

See merge request famedly/conduit!343
2022-05-28 20:47:15 +00:00
Timo Kösters 89eb54b7ff Merge branch 'unignore-feddest-doc-test' into 'next'
enable FedDest doc-test

See merge request famedly/conduit!349
2022-05-28 20:43:37 +00:00
Jonas Zohren 8bb58061fd Merge branch 'adopt-aur-patches' into 'next'
Adjust some files to the AUR patches

See merge request famedly/conduit!351
2022-05-10 07:26:20 +00:00
Jonas Zohren 8392809eb1 Adjust some files to the AUR patches 2022-05-10 07:26:19 +00:00
= bb033fe02a added a command to the admin bot to create a new user, even with registration disabled 2022-05-01 17:49:02 +02:00
rmsthebest 23f29d1bda Added Caddy to the web proxy examples 2022-04-17 23:08:17 +00:00
Jan Christian Grünhage efe9d5000e enable FedDest doc-test
Doc rendering is exactly as before, but it now actually tests the code
2022-04-14 16:42:11 +02:00
Zeyphros 090d0fe684 Fix typo 2022-04-13 00:08:55 +02:00
Timo Kösters 2fcb3c8b93 Merge branch '262-missing_room_keys_endpoint' into 'next'
feat: re-register missing add_backup_keys route

Closes #262

See merge request famedly/conduit!346
2022-04-11 16:05:59 +00:00
Jakub Kubík 729d66aa11 feat: register missing add_backup_keys route 2022-04-10 14:56:43 +02:00
Paul van Tilburg b10dbc747b Remove the address override in deb generated config
This override was accidentally introduced by commit de6c331.
The Debian postinst script will ask for and generate a config with the
address set. This should not be overriden by what is set in the default
config and is thus a deviation from the standard docs.
2022-04-09 15:13:01 +02:00
Zeyphros 07a3a6fa9a Return an error when signing an event fails
Prevents the server from crashing/become unresponsive when overly long
messages are sent
2022-04-08 22:05:13 +02:00
Timo Kösters 6e106b5732 Merge branch 'v9' into 'next'
Support all room versions from V3 to V9

Closes #161

See merge request famedly/conduit!257
2022-04-07 15:27:58 +00:00
Timo Kösters 00b362b43b fix: cors warning 2022-04-07 17:09:07 +02:00
Timo Kösters b6b27b66c8 fix: don't allow unjoined users to send typing notifications 2022-04-07 17:07:33 +02:00
Timo Kösters 3573d40027 fix warnings 2022-04-07 17:04:29 +02:00
Timo Kösters e4600ccfef bump ruma 2022-04-07 17:02:49 +02:00
Timo Kösters 0ae39807a4 Add V9 to list of allowed versions 2022-04-07 16:50:09 +02:00
Timo Kösters 686319e2e3 fix: error handling 2022-04-07 16:50:07 +02:00
Nyaaori d655f4c1be Cleanup rooms.rs, globals.rs, and pdu.rs 2022-04-07 16:48:37 +02:00
Nyaaori 4b28146ee7 Support room version 3 2022-04-07 16:44:50 +02:00
Nyaaori d8a3b257f2 Enable room version 4 2022-04-07 16:36:27 +02:00
Nyaaori 714873694d Refactor room version support, add default room version config 2022-04-07 16:35:10 +02:00
Timo Kösters d81216cad7 improvement: preparing for room version 9 2022-04-07 16:26:50 +02:00
Timo Kösters 9e29dc808f Merge branch '198-support-user-password-resets' into 'next'
feat: support user password resets

Closes #198

See merge request famedly/conduit!339
2022-04-07 12:11:55 +00:00
Jakub Kubík ada07de204 feat: support user password resets 2022-04-07 12:11:55 +00:00
Timo Kösters 2556e29984 Merge branch 'up-ruma-went-too-far' into 'next'
Upgrade Ruma

See merge request famedly/conduit!342
2022-04-07 11:37:53 +00:00
Timo Kösters df4c38cb61 fix: remove warnings 2022-04-07 13:22:32 +02:00
Timo Kösters 2808dd2000 Ruma upgrade 2022-04-07 12:58:48 +02:00
Timo Kösters 17ad5f0595 fix: checks for incoming cross signing changes 2022-04-07 12:56:18 +02:00
Timo Kösters b8411ae2fd refactor: rename endpoints to match ruma 2022-04-07 12:56:17 +02:00
Timo Kösters 566833111c refactor: small improvements 2022-04-07 12:56:16 +02:00
chenyuqide ee96a03d60 Update ruma 2022-04-07 12:56:16 +02:00
chenyuqide 21bc099ccf Update ruma 2022-04-07 12:56:12 +02:00
Timo Kösters 1ce03059a0 Merge branch 'next' into 'next'
Fix wrong associated type in OutgoingKind::Appservice

See merge request famedly/conduit!324
2022-04-03 19:48:25 +00:00
Timo Kösters 9ed352d4c0 Merge branch '199-fix-kick-ban-over-federation' into 'next'
fix: fix kick and ban events over federation

Closes #199

See merge request famedly/conduit!338
2022-04-03 17:59:15 +00:00
Jakub Kubík a08c667230 docs: add comments for clarification of recent changes 2022-04-03 19:27:48 +02:00
Jakub Kubík 414c7c40c4 fix: remove our server from the list of servers to send the event PDU to 2022-04-03 19:19:57 +02:00
Jakub Kubík 1712e63e06 fix: fix kick and ban events over federation
Fix the scenario where a MembershipState change event was not sent to the server of a user kicked/banned from a room on a Conduit instance if there were not any other users from that server in the room.
2022-04-03 18:58:45 +02:00
Timo Kösters 272e27ae01 Merge branch 'appservice-pdu-send-fix' into 'next'
Send PDU to appservice if state_key is their user ID

Closes #110

See merge request famedly/conduit!331
2022-04-03 12:32:23 +00:00
Andrej Kacian 9046223e7f Send PDU to appservice if state_key is their user ID
Fixes #110.
2022-04-01 19:38:38 +02:00
Timo Kösters 0066f20bdd Merge branch 'trailingslash' into 'next'
fix: allow trailing slashes for /state/<type>/ again

See merge request famedly/conduit!336
2022-04-01 14:17:21 +00:00
Timo Kösters a5465dfd3e fix: allow trailing slashes for /state/<type>/ again 2022-04-01 16:00:04 +02:00
Timo Kösters 8086bee146 Merge branch 'show-config' into 'next'
Add show-config admin command

See merge request famedly/conduit!295
2022-04-01 09:01:00 +00:00
Timo Kösters b11a3b80bc Merge branch 'shutdown-msg' into 'next'
Log caught Ctrl+C or SIGTERM for operator feedback

See merge request famedly/conduit!319
2022-04-01 08:49:28 +00:00
Timo Kösters 554146f46e Merge branch 'notify-admin-room-on-user-register' into 'next'
Notify admin room for user registrations, deactivations and password changes

See merge request famedly/conduit!318
2022-04-01 08:41:51 +00:00
Timo Kösters 7bc84dc971 Merge branch 'jplatte/up-axum' into 'next'
Upgrade axum to 0.5

See merge request famedly/conduit!335
2022-04-01 08:33:22 +00:00
Timo Kösters d89141100c Merge branch 'insensitive-login' into 'next'
Case insensitive username login

Closes #248

See merge request famedly/conduit!323
2022-04-01 08:20:45 +00:00
Timo Kösters f9bf465578 Merge branch 'readable' into 'next'
Fix security issue.

See merge request famedly/conduit!316
2022-04-01 07:30:05 +00:00
Jonas Platte 3933bd9a8e Update axum feature set used 2022-03-31 22:52:16 +02:00
Jonas Platte db0659cb3d Upgrade axum to 0.5 2022-03-31 22:50:17 +02:00
Timo Kösters 1219535e56 Merge branch 'fix/bad-uid-crash' into 'next'
Fix crash when a bad user ID is in the database

See merge request famedly/conduit!334
2022-03-31 19:23:41 +00:00
LordMZTE 4a12a7cbc8 Fix crash when a bad user ID is in the database
To my understanding, a bad user ID can sometimes make it into the
database, which lead to a panic prior to this change.
2022-03-31 20:59:59 +02:00
Jonas Zohren 08072d2c8d Merge branch 'docker/ci-bump-alpine-version' into 'next'
chore: Bump alpine version for CI generated docker

See merge request famedly/conduit!333
2022-03-30 20:30:56 +00:00
Jonas Zohren 1ebf417c11 chore: Bump alpine version for CI generated docker 2022-03-30 20:23:04 +00:00
Jonas Zohren a2a7c61872 Merge branch 'docker-bump-alpine-version' into 'next'
chore(docker): Bump alpine (base image) version

Closes #255

See merge request famedly/conduit!330
2022-03-18 17:52:50 +00:00
Jonas Zohren 61277452af chore(docker): Bump alpine (base image) version 2022-03-18 18:44:05 +01:00
Timo Kösters 6be5e83e61 Merge branch 'reqwest-tls-native-roots' into 'next'
Use native root CA certificates for reqwest

See merge request famedly/conduit!329
2022-03-14 14:27:12 +00:00
Timo Kösters c70c0129f8 Merge branch 'proxy-config-examples' into 'next'
Fix proxy config examples in config/proxy.rs

See merge request famedly/conduit!321
2022-03-14 14:26:28 +00:00
Andrej Kacian b5b8181851 Notify admin room for user registrations, deactivations and password changes 2022-03-13 09:13:45 +01:00
Andrej Kacian 194a85d4c5 Use native root CA certificates for reqwest 2022-03-12 15:44:22 +01:00
kk a6edf00810 Merge remote-tracking branch 'origin/next' into insensitive-login
pulling next into dev branch
2022-03-09 19:12:02 -08:00
Jonas Zohren 738f5e8f68 Merge branch 'ci-fix-cross-musl-builds' into 'next'
CI: Fix musl builds

See merge request famedly/conduit!328
2022-03-08 22:13:31 +00:00
Jonas Zohren 5a9462c9ab fix(ci): Fix musl builds
This pins the image to use for cross to a working image's sha256
2022-03-08 21:52:57 +00:00
chenyuqide 5695121f38 Fix wrong associated type in OutgoingKind::Appservice 2022-03-02 23:48:01 +08:00
reti4 8bafdc4623 fixed location of lowercase fn 2022-03-02 02:25:15 +00:00
Jonas Zohren 36a6d724fe Merge branch 'writable' into 'next'
Fix permissions

See merge request famedly/conduit!317
2022-03-01 23:55:10 +00:00
reti4 9385ea0e7c fmt fix 2022-03-01 21:23:34 +00:00
reti4 9f059ad4c3 make username login case insensitive 2022-03-01 21:03:55 +00:00
TomZ 5c6c6f272c Fix security issue.
The docs state that you need to make the config file _readable_
and then proceeds to make the file writable.

This changes it to make the file to be owned by root and readable by
anyone. This is the default for unix / linux and suggested practice
for files in /etc.
2022-02-23 10:15:33 +01:00
Andrej Kacian 65fa4b2ca4 Fix proxy config examples in config/proxy.rs 2022-02-22 22:32:38 +01:00
Jonas Zohren 6788225cac Merge branch 'fix-docker-db-dir-permissions' into 'next'
Fix(docker): Make conduit own default db path

See merge request famedly/conduit!320
2022-02-22 15:34:14 +00:00
Jonas Zohren a5bb6786c8 fix(docker): Make conduit own default db path
When a user mounts a volume into the default volume path,
it uses the permissions and ownership from the host volume.
In most cases, this is 1000:1000, which it also uses on the inside.

If you don't mount a volume though (e.g., for testing), conduit cries:
“The database couldn't be loaded or created.”

This fix chowns the default db dir to remedy this.
2022-02-22 16:26:30 +01:00
Andrej Kacian 3b2b35aab7 Log caught Ctrl+C or SIGTERM for operator feedback 2022-02-22 00:28:46 +01:00
TomZ 949f2523f9 Fix permissions
The text just sets the ownership and ignores that defaults on unix
are to have newly created dirs be readable by everyone.
This closes the database to unauthorized users on multi-user systems.
2022-02-21 22:35:08 +01:00
Andrej Kacian 196c83939c Add show-config admin room command 2022-02-21 22:27:19 +01:00
Jonas Zohren 237645e975 Merge branch 'docs' into 'next'
docs: make all configs match

Closes #205

See merge request famedly/conduit!301
2022-02-20 10:59:56 +00:00
Jonas Zohren 86162c2c20 Merge branch 'next' into docs 2022-02-20 11:43:50 +01:00
Jonas Zohren 199c84195a Merge branch 'improve-docker-documentation' into 'next'
Improve docker documentation some

See merge request famedly/conduit!314
2022-02-20 10:43:05 +00:00
Jonas Zohren 57ac4160b7 Merge branch 'next' into docs 2022-02-20 11:42:19 +01:00
Jonas Zohren 91c648253a Merge branch 'docs-remove-obsolete-cross-readme' into 'next'
Remove the now obsolete cross readme

See merge request famedly/conduit!315
2022-02-20 10:22:47 +00:00
Jonas Zohren 5a80507006 chore(docs): Remove the now obsolete cross readme 2022-02-20 11:12:49 +01:00
Jonathan de Jong cc14727888 revert reflow 2022-02-20 10:55:17 +01:00
Jonathan de Jong 94573a3a61 improve docker documentation some 2022-02-19 17:06:06 +01:00
Jonas Zohren 0ba0fa5f6c Merge branch 'ci-audit-dependencies' into 'next'
CI: audit dependencies

See merge request famedly/conduit!313
2022-02-19 11:25:30 +00:00
Jonas Zohren ad6eb92bbd feat(ci): Add dependency audit to CI tests 2022-02-19 12:19:06 +01:00
Timo Kösters ce76041c03 Merge branch 'up-ruma' into 'next'
Update Ruma

See merge request famedly/conduit!312
2022-02-19 09:46:56 +00:00
Jonas Zohren 8f063c99d5 chore(ci): Split up tests 2022-02-18 22:29:55 +01:00
Jonathan de Jong 557d119bee change search_events_v3 to search_events::v3 2022-02-18 19:54:26 +01:00
Jonathan de Jong e9f87e1952 update ruma 2022-02-18 15:33:14 +01:00
Jonas Zohren f3795846b5 Merge branch 'readme' into 'next'
Slight clarification

See merge request famedly/conduit!310
2022-02-18 12:19:51 +00:00
Timo Kösters b8eaa3be85 Merge branch 'redactfix' into 'next'
Redaction fix

Closes #235

See merge request famedly/conduit!298
2022-02-18 12:00:40 +00:00
Timo Kösters c496e599ef Merge branch 'serde-cleanup' into 'next'
Remove useless serde roundtrips

See merge request famedly/conduit!311
2022-02-18 11:07:59 +00:00
Jonas Platte 27692a2f14 Remove useless serde roundtrips 2022-02-18 11:52:00 +01:00
TomZ e57cd437d4 Slight clarification
Which version it started being beta in is quite irrelevant here.
2022-02-17 23:00:39 +01:00
Timo Kösters 5a99460a4c Merge branch 'not-found' into 'next'
Add a not-found route

See merge request famedly/conduit!306
2022-02-17 15:43:08 +00:00
Jonas Zohren ba83d0ac68 Merge branch 'more-vscode-defaults' into 'next'
Provide some sane defaults for vscode developing

See merge request famedly/conduit!309
2022-02-17 15:33:03 +00:00
Jonas Zohren bcd6c0bf53 feat: Provide sane defaults for vscode developing
This includes some extensions and a debug profile
2022-02-17 11:14:50 +00:00
Jonas Zohren b4225cb0fc fix(docker): use user 1000 and standard db path 2022-02-16 15:13:04 +01:00
Jonas Zohren 98b67da649 fix: Docker syntax 2022-02-16 15:13:03 +01:00
Jonas Zohren 0be8500c4f Set all env vars in docker README 2022-02-16 15:12:40 +01:00
Jonas Zohren 97507d2880 Remove most env vars from Dockerfile 2022-02-16 15:12:40 +01:00
Jonas Zohren c4353405a5 Suggestions from Jonas Zohren 2022-02-16 15:12:38 +01:00
Timo Kösters de6c3312ce docs: make all configs match 2022-02-16 15:11:46 +01:00
Jonas Zohren c66866d890 Merge branch 'ci-lint-dockerfiles-with-hadolint' into 'next'
CI: Lint dockerfiles with hadolint

Closes #239

See merge request famedly/conduit!308
2022-02-15 19:10:12 +00:00
Jonas Zohren b21a44ca4c feat(ci): Lint dockerfiles with hadolint 2022-02-15 20:01:38 +01:00
Jonas Zohren e04d4ff150 Merge branch 'ci-fix-tag-pipelines' into 'next'
Ci fix tag pipelines

Closes #229

See merge request famedly/conduit!307
2022-02-15 10:56:25 +00:00
Jonas Zohren 2645494582 fix(ci): Also run CI for git tags 2022-02-15 11:17:46 +01:00
Jonas Zohren 77f4b68c8e fix(ci): Also create versioned docker image 2022-02-15 11:17:32 +01:00
Timo Kösters 6602f6114c fix: redacts can't error anymore 2022-02-13 15:47:58 +01:00
Jonas Platte 3aece38e9d Add a not-found route 2022-02-13 13:59:27 +01:00
Timo Kösters 9cfef51af3 Merge branch 'more-paths' into 'next'
Take advantage of multiple paths

See merge request famedly/conduit!305
2022-02-13 12:13:22 +00:00
Jonas Platte aee6bf7e7a Change this to handler 2022-02-13 11:30:04 +00:00
Jonathan de Jong b8d92d3cec take advantage of multiple paths 2022-02-13 12:07:00 +01:00
Timo Kösters 0c4b42ac13 Merge branch 'parse-pdu-command-panic' into 'next'
fix: do not panic on a JSON not containing the PDU

Closes #236

See merge request famedly/conduit!304
2022-02-12 21:22:37 +00:00
Timo Kösters 91d5fbd56c Merge branch 'up-ruma' into 'next'
Update ruma

See merge request famedly/conduit!303
2022-02-12 20:59:07 +00:00
M0dEx d4217007fe fix: do not panic on a JSON not containing the PDU
Do not panic on a JSON not containing the PDU when executing the parse-pdu admin command.
2022-02-12 21:40:07 +01:00
Jonathan de Jong 35b82d51cf fix compilations 2022-02-12 21:04:38 +01:00
Jonathan de Jong 0ed1e42aed update ruma 2022-02-12 21:01:53 +01:00
Timo Kösters 2b644ef7b7 Merge branch 'tracing-cleanup' into 'next'
Remove unnecessary tracing::instrument attributes

See merge request famedly/conduit!302
2022-02-12 15:50:24 +00:00
Jonas Platte 0ad6eac4f8 Remove all tracing::instrument attributes from database::abstraction::* 2022-02-12 16:38:47 +01:00
Jonas Platte accdb77315 Clean up tracing::instrument attributes
Remove it from request handler since there's already the context of the
request path, added through TraceLayer.
2022-02-12 16:38:47 +01:00
Timo Kösters 914152fcbd Merge branch 'syncfast' into 'next'
improvement: faster /syncs

Closes #231

See merge request famedly/conduit!297
2022-02-12 15:11:03 +00:00
Timo Kösters 2a00c547a1 improvement: faster /syncs 2022-02-12 15:57:54 +01:00
Jonas Platte adeb8ee425 Remove no-op conversions 2022-02-12 15:03:07 +01:00
Jonas Platte d74074ad53 Remove tracing::instrument attribute from util functions
They don't ever log anything, so the extra context is never used.
2022-02-12 15:01:28 +01:00
Timo Kösters 41d3da245e Merge branch 'update_turn_readme' into 'next'
Update turn readme

See merge request famedly/conduit!292
2022-02-12 13:04:07 +00:00
Timo Kösters 0565b5a6c8 Merge branch 'show-dns-setup-error' into 'next'
Display actual error message from TokioAsyncResolver, if any

See merge request famedly/conduit!296
2022-02-12 13:01:41 +00:00
Timo Kösters f3502beb94 Merge branch 'welcome-message-command-hint' into 'next'
feat: add welcome message command hint

See merge request famedly/conduit!299
2022-02-12 12:28:53 +00:00
Timo Kösters d6b9874b35 Merge branch 'fix-admin-self-commands' into 'next'
Fix admin room processing commands from its own messages

See merge request famedly/conduit!293
2022-02-12 12:27:57 +00:00
Timo Kösters 1d01e2a077 Merge branch 'axum' into 'next'
Port from rocket to axum

See merge request famedly/conduit!263
2022-02-12 12:22:41 +00:00
Jonas Platte ce714cfd07 Bump version 2022-02-12 13:20:55 +01:00
Jonas Platte 50b24b37c2 Upgrade Ruma 2022-02-12 12:56:18 +01:00
Jonas Platte 9db0473ed5 Improve error messages in Ruma wrapper FromRequest impl 2022-02-12 12:56:08 +01:00
Jonas Platte 5d8c80b170 Strip quotes from X-Matrix fields 2022-02-12 12:56:08 +01:00
Jonas Platte 21ae63d46b Rewrite query parameter parsing 2022-02-12 12:56:08 +01:00
Jonas Platte c8951a1d9c Use axum-server for direct TLS support 2022-02-12 12:56:08 +01:00
Jonas Platte 5fa9190117 Simplify return type of most route handlers 2022-02-12 12:56:08 +01:00
Jonas Platte 77a87881c9 Add message to unsupported HTTP method panic 2022-02-12 12:56:08 +01:00
Jonas Platte 7bf538f549 Fix axum route conflicts 2022-02-12 12:56:07 +01:00
Jonas Platte a5757ab195 Generalize RumaHandler 2022-02-12 12:56:07 +01:00
Jonas Platte d1d2217019 Clean up error handling for server_server::get_server_keys_route 2022-02-12 12:56:07 +01:00
Jonas Platte 1f7b3fa4ac Port from Rocket to axum 2022-02-12 12:56:07 +01:00
Timo Kösters 8709c3ae7b Merge branch 'refactor2' into 'next'
Remove unnecessary uses of event enums

See merge request famedly/conduit!300
2022-02-12 11:50:23 +00:00
Jonas Platte 5db4c001d1 Remove another unnecessary use of an event enum 2022-02-12 01:58:47 +01:00
Jonas Platte 583ec51f9f Remove unnecessary use of event enum 2022-02-12 01:58:47 +01:00
M0dEx f602d32aaa feat: add the actual server name to the welcome message 2022-02-11 18:51:28 +01:00
M0dEx a6976e6d2d feat: add 'available' to the help command line in the welcome message 2022-02-11 18:40:51 +01:00
M0dEx f2b8aa28f3 feat: add a line with the help command to the welcome message 2022-02-11 18:26:56 +01:00
Andrej Kacian bfbefb0cd2 Display actual error message from TokioAsyncResolver, if any 2022-02-07 12:56:44 +01:00
Andrei Vasiliu 31918bb990 Fix admin room processing commands from its own messages 2022-02-05 08:57:15 +02:00
Torsten Flammiger f110b5710a Move appservice howto into whats-next; again, rename placeholder TURN url 2022-02-04 21:11:50 +01:00
Torsten Flammiger 1cc0b55650 Resolve merge conflict 2022-02-04 19:28:57 +01:00
Torsten Flammiger 63a2c6cce5 Add new TURN Readme and reference it from DEPLOY.md 2022-02-04 19:11:29 +01:00
Jonas Zohren faa0cdb595 Merge branch 'next' into 'master'
CI-Hotfix to master

See merge request famedly/conduit!290
2022-02-04 18:00:01 +00:00
Jonas Zohren 0cec421930 Merge branch 'ci-hotfix-sytest-on-master' into 'next'
fix(ci): Always build debug version for sytest

See merge request famedly/conduit!289
2022-02-04 17:51:57 +00:00
Jonas Zohren 826b077e21 fix(ci): Always build debug version for sytest 2022-02-04 18:43:13 +01:00
Timo Kösters 9c8c784fe7 Merge branch 'next' into 'master'
Release 0.3

See merge request famedly/conduit!288
2022-02-04 17:37:26 +00:00
Jonas Zohren 4dcc080ad9 Merge branch 'pre-release-doc-changes' into 'next'
Pre-0.3 doc adjustments

See merge request famedly/conduit!287
2022-02-04 17:12:33 +00:00
Timo Kösters d55992dc83 Merge branch 'jemallocfeature' into 'next'
feat: allow disabling jemalloc via feature

See merge request famedly/conduit!285
2022-02-04 17:08:03 +00:00
Jonas Zohren 103dc7e09b Pre-0.3 doc adjustments 2022-02-04 18:05:24 +01:00
Timo Kösters dffa5570e7 Merge branch 'emptysearchcrash' into 'next'
fix: crash on empty search

Closes #190

See merge request famedly/conduit!286
2022-02-04 16:42:56 +00:00
Timo Kösters dd03608f17 use our own reqwest fork 2022-02-04 17:24:45 +01:00
Timo Kösters eb0b2c429f fix: crash on empty search 2022-02-04 17:15:52 +01:00
Timo Kösters 8d8edddb2e feat: allow disabling jemalloc via feature 2022-02-04 17:00:46 +01:00
Timo Kösters f35ad27627 Merge branch 'contextfix' into 'next'
fix: lazy loading for /context

See merge request famedly/conduit!284
2022-02-04 13:45:57 +00:00
Timo Kösters 72cd52e57c fix: lazy loading for /context 2022-02-04 13:33:04 +01:00
Timo Kösters 8db7d2c025 Merge branch 'asonix/encourage-reqwest-reuse' into 'next'
Re-use a basic reqwest client in all possible cases

See merge request famedly/conduit!265
2022-02-04 11:27:41 +00:00
Timo Kösters 51cca1a60f Merge branch 'create-admin-room' into 'next'
Create admin room and hide migration messages on first run

Closes #157 and #225

See merge request famedly/conduit!282
2022-02-03 21:09:21 +00:00
Andrei Vasiliu e1c0dcb6bb Create admin room and hide migration messages on first run 2022-02-03 22:50:11 +02:00
Timo Kösters 86a9ec9f44 Merge branch 'up-ruma' into 'next'
Upgrade Ruma

See merge request famedly/conduit!281
2022-02-03 19:41:47 +00:00
Jonas Platte d23d6fbb37 Upgrade Ruma 2022-02-03 20:24:02 +01:00
Timo Kösters 2d9c5791a6 Merge branch 'rocket-config' into 'next'
Remove mutation from default_config and set default log_level to off

See merge request famedly/conduit!280
2022-02-03 19:20:49 +00:00
Jonas Platte 92571d961f Remove mutation from default_config and set default log_level to off 2022-02-03 19:55:54 +01:00
Timo Kösters 7a388f4d72 Merge branch 'command-refactor' into 'next'
Move and refactor admin commands into admin module

See merge request famedly/conduit!253
2022-02-03 18:43:54 +00:00
Andrei Vasiliu b56efcdc2a Merge remote-tracking branch 'origin/next' into command-refactor
Fixed a small conflict in admin.rs
2022-02-03 20:31:06 +02:00
Andrei Vasiliu 6399a7fe4e Remove dash from admin command help 2022-02-03 20:21:04 +02:00
Timo Kösters 79345dc2a6 Merge branch 'refactor' into 'next'
Some refactorings

See merge request famedly/conduit!279
2022-02-03 12:50:55 +00:00
Jonas Platte 974c10e739 Move Config out of database module 2022-02-03 13:30:04 +01:00
Jonas Platte ce60fc6859 Stop using set_env to configure tracing-subscriber 2022-02-03 13:24:28 +01:00
Jonas Platte abb4b4cf0b Remove TryFrom, TryInto imports
They are no longer needed in the 2021 edition.
2022-02-03 13:24:04 +01:00
Andrei Vasiliu 4bbff69a24 Merge remote-tracking branch 'origin/next' into command-refactor
Fixed conflict with commit 78502aa6b1
2022-02-03 13:12:55 +02:00
Timo Kösters b4755ba15b Merge branch 'tests' into 'next'
Bug fixes

See merge request famedly/conduit!278
2022-02-03 10:12:04 +00:00
Timo Kösters 9ef3abacd4 fix: initial state deserialize->serialize error 2022-02-03 10:57:54 +01:00
Andrei Vasiliu 87225e70c3 Parse admin command body templates from doc comments 2022-02-02 21:35:57 +02:00
Jonas Zohren 510a44699d Merge branch 'fix-healthcheck-no-port' into 'next'
Docker: Healtcheck and build fixes

Closes #222

See merge request famedly/conduit!277
2022-02-02 14:07:49 +00:00
Jonas Zohren c4733676cf Apply feedback from Ticho 2022-02-02 13:35:15 +00:00
Jonas Zohren e5bac5e4f5 fix: Running in Docker 2022-02-02 14:07:35 +01:00
Jonas Zohren 9478c75f9d Use prebuilt CI-containers from https://gitlab.com/jfowl/conduit-containers
Also run all builds on approved MRs
2022-02-02 13:31:28 +01:00
Torsten Flammiger e24d75cffc Return the ID of the appservice that was created by register_appservice 2022-02-02 13:29:10 +01:00
Torsten Flammiger 8f69f02e59 add error handling for register_appservice too 2022-02-02 13:29:09 +01:00
Torsten Flammiger da7b55b39c Cleanup appservice events after removing the appservice 2022-02-02 13:29:09 +01:00
user bfcf2db497 fix: mention dependencies to build from source 2022-02-02 13:29:09 +01:00
Timo Kösters a5f004d7e9 fix: signature mismatch on odd send_join servers 2022-02-02 13:25:31 +01:00
Jonas Zohren 004dfdeaac Merge branch 'ci-test-using-prebuilt-images' into 'next'
Use custom container images for CI

Closes #221

See merge request famedly/conduit!273
2022-02-01 23:51:38 +00:00
Jonas Zohren fa4099b138 Use prebuilt CI-containers from https://gitlab.com/jfowl/conduit-containers
Also run all builds on approved MRs
2022-02-01 23:51:38 +00:00
Timo Kösters caf9834e50 feat: cache capacity modifier 2022-02-01 14:42:13 +01:00
Timo Kösters 23aecb78c7 fix: use to_lowercase on /register/available username 2022-01-31 15:40:31 +01:00
Timo Kösters e17bbdd42d tests 2022-01-31 14:49:00 +01:00
Timo Kösters 95ca43e20f Merge branch 'cleanup_events_after_unregister_appservice' into 'next'
Cleanup events after unregister appservice / update appservice error handling / return ID of new appservice

See merge request famedly/conduit!276
2022-01-31 13:24:01 +00:00
Torsten Flammiger 28d3b348d2 Return the ID of the appservice that was created by register_appservice 2022-01-31 11:52:33 +01:00
Torsten Flammiger 78502aa6b1 add error handling for register_appservice too 2022-01-31 10:07:49 +01:00
Torsten Flammiger cc13112592 Cleanup appservice events after removing the appservice 2022-01-31 09:27:31 +01:00
Andrei Vasiliu 677f044d13 Refactor admin code to always defer command processing 2022-01-31 00:00:05 +02:00
Timo Kösters fb2a7ebf66 Merge branch 'build-dependencies-deploy' into 'next'
Mention dependencies to build from source

See merge request famedly/conduit!275
2022-01-29 08:35:54 +00:00
user 8ff95a5a48 fix: mention dependencies to build from source 2022-01-28 22:26:56 -08:00
Jonas Zohren 401b88d16d fix: Healtcheck use netstat for port as fallback 2022-01-28 23:23:58 +01:00
Jonas Zohren 8c1cf733b5 Merge branch 'fix-healthcheck-no-port' into 'next'
fix: Use default port for healthcheck as fallback

Closes #222

See merge request famedly/conduit!274
2022-01-28 21:48:25 +00:00
Jonas Zohren 44f7a85077 fix: Use default port for healthcheck as fallback
Conduit can start without a specific port being configured.
This adjusts the healthcheck script to tolerate that state.

Closes https://gitlab.com/famedly/conduit/-/issues/222
2022-01-28 22:33:49 +01:00
Aode (lion) b39ddf7be9 Rename reqwest clients, mention cheap client clones in comment 2022-01-28 12:42:47 -06:00
Jonas Platte 296c68c0cd Merge branch 'get-thumbnail-mxc-as-ref' into 'next'
Do not copy mxc string unnecessarily in db.get_thumbnail()

See merge request famedly/conduit!272
2022-01-27 17:14:42 +00:00
Andrej Kacian 529e88c7f9 Do not copy mxc string unnecessarily in db.get_thumbnail() 2022-01-27 17:47:09 +01:00
Aode (lion) 1059f35fdc use pre-constructed client for well-known requests also 2022-01-27 10:37:04 -06:00
Aode (Lion) f8d1c1a8af Re-use a basic request in all possible cases 2022-01-27 10:37:04 -06:00
Timo Kösters 20006c91af Merge branch 'media-download-followup' into 'next'
Media download followup

See merge request famedly/conduit!271
2022-01-27 16:24:15 +00:00
Andrej Kacian 0f6d232cb1 Style fixes from 'cargo fmt' 2022-01-27 17:13:33 +01:00
Andrej Kacian ccfc243c2c Make get_remote_content() return Result instead of ConduitResult 2022-01-27 17:13:07 +01:00
Timo Kösters f7148def90 Merge branch 'up-ruma' into 'next'
Upgrade Ruma

See merge request famedly/conduit!268
2022-01-27 15:46:00 +00:00
Timo Kösters 63309e52f8 Merge branch 'media-download-with-filename' into 'next'
Media download with filename

See merge request famedly/conduit!266
2022-01-27 15:44:56 +00:00
Andrej Kacian c4317a7a96 Reduce code duplication in media download route handlers 2022-01-27 16:32:19 +01:00
Jonas Platte 9c2000cb89 Upgrade Ruma 2022-01-27 16:25:42 +01:00
Andrej Kacian 52873c88b7 Fix incorrect HTTP method in doc comments of two media routes 2022-01-27 00:31:44 +01:00
Andrej Kacian 8472eff277 Implement media download with custom filename 2022-01-27 00:31:44 +01:00
Jonas Zohren ba8d5abb67 Merge branch 'fix/sccache' into 'next'
Fix CI cargo-cross caching with sccache

See merge request famedly/conduit!264
2022-01-26 18:54:13 +00:00
Maxim De Clercq ff16729976 fix: correct RUSTC_WRAPPER path in cross container 2022-01-26 00:02:03 +01:00
Maxim De Clercq acf1585fc3 fix: make sure that libatomic is linked statically 2022-01-24 11:45:07 +01:00
Maxim De Clercq 067fcfc0e4 fix: remove trailing slash from shared path 2022-01-23 22:51:02 +01:00
Maxim De Clercq 77ad4cb8f8 fix: use readelf for checking static compilation 2022-01-23 22:51:02 +01:00
Maxim De Clercq 64c25ea4a1 fix: always print ELF information 2022-01-23 18:38:33 +01:00
Maxim De Clercq c7560b3502 fix: remove libgcc dependency in ci builds since the binary is ensured to be statically compiled 2022-01-23 18:09:14 +01:00
Maxim De Clercq c2ad2b3dd7 fix: pass sccache variables to cross container with build.env.passthrough 2022-01-23 17:43:28 +01:00
Maxim De Clercq 219dfbabd5 fix: pass RUSTC_WRAPPER to the cross container and enforce static builds 2022-01-23 17:31:12 +01:00
Jonas Zohren 4a34d757d7 Merge branch 'fix/rocksdb-cross-compiling' into 'next'
Fix cross-compiling for RocksDB

Closes #213

See merge request famedly/conduit!261
2022-01-23 15:58:27 +00:00
Maxim De Clercq fd67cd7450 feat: support targetting i686 2022-01-23 15:58:19 +01:00
Maxim De Clercq cd9902637d feat: use rustembedded/cross images and use static relocation model to fix cross-compile 2022-01-23 14:41:39 +01:00
Andrei Vasiliu 7505548b94 Merge remote-tracking branch 'refs/remotes/origin/next' into command-refactor
Resolved conflict for the new list_local_users command
2022-01-22 14:29:50 +02:00
Timo Kösters f50bdb6010 Merge branch 'list_local_users' into 'next'
Implement list_local_users command

See merge request famedly/conduit!260
2022-01-22 09:33:32 +00:00
Maxim De Clercq a021680591 fix: make sure libatomic is always linked because it's skipped on arm targets 2022-01-22 01:14:36 +01:00
Maxim De Clercq 3e9abfedb4 fix: make sure libstdc++ is linked statically when cross-compiling 2022-01-22 00:14:19 +01:00
Timo Kösters b634f9d45c Merge branch 'reqwestfix' into 'next'
improvement: use jemalloc for lower memory usage

See merge request famedly/conduit!262
2022-01-21 16:54:35 +00:00
Timo Kösters f88523988e improvement: use jemalloc for lower memory usage 2022-01-21 17:54:05 +01:00
Maxim De Clercq bfef94f5f4 fix: linking against libatomic is no longer required since the library path is fixed 2022-01-21 17:26:25 +01:00
Maxim De Clercq d94f3c1e9a fix: make sure cc-rs and bindgen use the correct paths when cross-compiling 2022-01-21 17:06:15 +01:00
Timo Kösters 4ef995cf7d Merge branch 'next' into 'next'
Add heisenbridge to tested appservices

See merge request famedly/conduit!250
2022-01-21 15:43:40 +00:00
Reiner Herrmann 97d56af5bd Add heisenbridge to tested appservices 2022-01-21 16:40:03 +01:00
Andrei Vasiliu 57979da28c Change structopt to clap, remove markdown dependency 2022-01-21 17:35:26 +02:00
Timo Kösters 58da67e59e Merge branch 'mautrix-signal-support' into 'next'
Add mautrix-signal to tested appservices

See merge request famedly/conduit!251
2022-01-21 15:33:10 +00:00
Timo Kösters 5d3ba5c628 Merge branch 'WIP_persy_batch_next' into 'next'
feat: Integration with persy using background ops

See merge request famedly/conduit!231
2022-01-21 15:31:46 +00:00
Torsten Flammiger 960ba8bd99 Merged current next 2022-01-21 14:32:59 +01:00
Torsten Flammiger ba6d72f3f9 Reformatted 2022-01-21 14:28:07 +01:00
Andrei Vasiliu cc3ef1a8be Improve help text for admin commands 2022-01-21 11:13:24 +02:00
Andrei Vasiliu f244c0e2ce Merge remote-tracking branch 'refs/remotes/origin/next' into command-refactor 2022-01-21 10:19:17 +02:00
Andrei Vasiliu e378bc4a2c Refactor admin commands to use structopt 2022-01-21 10:17:50 +02:00
Timo Kösters ab4f3bd06c Merge branch 'lib-main' into 'next'
Clean up mod and use statements in lib.rs and main.rs

See merge request famedly/conduit!258
2022-01-20 12:32:39 +00:00
Jonas Platte 8d81c1c072 Use MSRV for build CI jobs
The test job will use the latest stable so all stable lints are included.
2022-01-20 13:23:58 +01:00
Jonas Platte 6bb1081b71 Use BTreeMap::into_values
Stable under new MSRV.
2022-01-20 13:19:51 +01:00
Jonas Platte ff5fec9e74 Raise minimum supported Rust version to 1.56 2022-01-20 13:19:51 +01:00
Jonas Platte 5afb27a5a9 Use latest stable for Docker image 2022-01-20 12:29:24 +01:00
Jonas Platte 6e322716ca Delete rust-toolchain file 2022-01-20 12:29:10 +01:00
Jonas Platte 756a41f22d Fix rustc / clippy warnings 2022-01-20 00:10:39 +01:00
Jonas Platte a0fc5eba72 Remove unnecessary Result 2022-01-19 23:57:22 +01:00
Timo Kösters cc0f094ff7 Merge branch 'rocksdbbreaks' into 'next'
Rocksdb breaking change. If your server breaks, come to #conduit:fachschaften.org

See merge request famedly/conduit!259
2022-01-19 06:17:57 +00:00
Timo Kösters d4eb3e3295 fix: rocksdb does not use zstd compression unless we disable everything else 2022-01-19 07:09:25 +01:00
Jonas Platte c6277c72a1 Fix warnings in database::abstraction 2022-01-18 21:05:40 +01:00
Jonas Platte 13a48c4577 Clean up mod and use statements in lib.rs and main.rs 2022-01-18 21:04:44 +01:00
Timo Kösters b2ffc4e496 Merge branch 'maxopenfiles' into 'next'
Server ACL support and more config options

Closes #67

See merge request famedly/conduit!248
2022-01-18 09:05:57 +00:00
Timo Kösters 53de350908 fix: less load when lazy loading 2022-01-17 23:24:27 +01:00
Torsten Flammiger fd6427a83f Update/Revert code comment 2022-01-17 22:34:34 +01:00
Torsten Flammiger fc39b3447c Little bit of refactoring 2022-01-17 19:43:45 +01:00
Torsten Flammiger 4aefc29650 Merge branch 'list_local_users_test' into list_local_users 2022-01-17 19:20:11 +01:00
Timo Kösters 03b174335c improvement: lower default pdu cache capacity 2022-01-17 14:46:53 +01:00
Timo Kösters 8c90e7adfb refactor: fix warnings 2022-01-17 14:46:03 +01:00
Timo Kösters ee8e72f7a8 feat: implement server ACLs 2022-01-17 14:35:38 +01:00
Jonas Zohren 24aa034e48 Merge branch 'ci-fix-cargo-test-missing-libclang' into 'next'
CI: Fix cargo-test

See merge request famedly/conduit!255
2022-01-16 20:57:23 +00:00
Jonas Zohren 10f1da12bf CI: Fix cargo-test 2022-01-16 20:57:23 +00:00
Torsten Flammiger 50430cf4ab Name function after command: list_local_users 2022-01-16 21:22:57 +01:00
Torsten Flammiger 52284ef9e2 Add some debug/info if user was found 2022-01-16 20:25:16 +01:00
Torsten Flammiger 3e79d15495 Updated function documentation 2022-01-16 20:15:53 +01:00
Andrei Vasiliu 13ae036ca0 Move and refactor admin commands into admin module 2022-01-16 13:52:23 +02:00
Torsten Flammiger 9205c07048 Update get_local_users description 2022-01-15 22:37:39 +01:00
Torsten Flammiger c03bf6ef11 name the function after its purpose: iter_locals -> get_local_users 2022-01-15 22:20:51 +01:00
Julius de Bruijn 217e378992 Add mautrix-signal to tested appservices 2022-01-15 17:34:13 +00:00
Torsten Flammiger 91eb6c4d08 Return a Result instead of a vector 2022-01-15 17:10:23 +01:00
Torsten Flammiger fb19114bd9 rename iter_locals to get_local_users; make get_local_users skip on parse errors; remove deprecated function count_local_users 2022-01-15 15:52:47 +01:00
Tglman c1cd4b5e26 chore: set the released version of persy in Cargo.toml 2022-01-15 14:17:15 +00:00
Tglman f9977ca64f fix: changes to update to the last database engine trait definition 2022-01-15 14:17:15 +00:00
Tglman 1cc41937bd refactor:use generic watcher in persy implementation 2022-01-15 14:17:15 +00:00
Tglman ab15ec6c32 feat: Integration with persy using background ops 2022-01-15 14:17:15 +00:00
Timo Kösters d434dfb3a5 feat: config option for rocksdb max open files 2022-01-14 11:44:20 +01:00
Timo Kösters 5b8d2a736e Merge branch 'default' into 'next'
improvement: better default cache capacity

See merge request famedly/conduit!247
2022-01-14 10:44:06 +00:00
Timo Kösters 80e51986c4 improvement: better default cache capacity 2022-01-14 11:08:31 +01:00
Jonas Zohren 8fc51f0029 Merge branch 'ci-cargo-home-workaround' into 'next'
Fix(ci): Disable CARGO_HOME caching

See merge request famedly/conduit!246
2022-01-13 22:24:47 +00:00
Jonas Zohren f67785caaf Fix(ci): Disable CARGO_HOME caching 2022-01-13 22:24:47 +00:00
Timo Kösters 1119c2f510 Merge branch 'rocksdb' into 'next'
feat: rocksdb backend

See merge request famedly/conduit!217
2022-01-13 22:12:51 +00:00
Timo Kösters 16f826773b refactor: fix warnings 2022-01-13 22:55:35 +01:00
Timo Kösters 6fa01aa982 fix: remove dbg 2022-01-13 22:44:27 +01:00
Timo Kösters a336027b0e fix: better memory usage message 2022-01-13 22:44:27 +01:00
Timo Kösters 447639054e improvement: higher default pdu capacity 2022-01-13 22:44:27 +01:00
Timo Kösters 9e77f7617c fix: disable direct IO again 2022-01-13 22:44:27 +01:00
Timo Kösters 7f27af032b improvement: optimize rocksdb for spinning disks 2022-01-13 22:44:26 +01:00
Timo Kösters b96822b617 fix: use db options for column families too 2022-01-13 22:44:26 +01:00
Timo Kösters 0bb7d76dec improvement: rocksdb configuration 2022-01-13 22:44:26 +01:00
Timo Kösters 077e9ad438 improvement: memory usage for caches 2022-01-13 22:44:25 +01:00
Andrej Kacian 68ee1a5408 Add rocksdb implementation of memory_usage() 2022-01-13 22:42:25 +01:00
Andrej Kacian ff243870f8 Add "database_memory_usage" AdminCommand 2022-01-13 22:42:24 +01:00
Andrej Kacian 71431f330a Add memory_usage() to DatabaseEngine trait 2022-01-13 22:42:24 +01:00
Timo Kösters fa6d7f7ccd feat: database backend selection at runtime 2022-01-13 22:42:22 +01:00
Timo Kösters 4f39d36e98 docs: lazy loading 2022-01-13 22:38:52 +01:00
Timo Kösters c6d88359d7 fix: incremental lazy loading 2022-01-13 22:38:52 +01:00
Timo Kösters f285c89006 fix: make incremental sync efficient again 2022-01-13 22:38:52 +01:00
Timo Kösters 93d225fd1e improvement: faster way to load required state 2022-01-13 22:38:52 +01:00
Timo Kösters 1bd9fd74b3 feat: partially support sync filters 2022-01-13 22:38:52 +01:00
Timo Kösters 68e910bb77 feat: lazy loading 2022-01-13 22:38:50 +01:00
Timo Kösters 5bcc1324ed fix: auth event fetch order 2022-01-13 22:29:19 +01:00
Timo Kösters 54f4d39e3e improvement: don't fetch event multiple times 2022-01-13 22:29:17 +01:00
Timo Kösters b1d9ec3efc fix: atomic increment 2022-01-13 22:28:18 +01:00
Timo Kösters ee3d2db8e0 improvement, maybe not safe 2022-01-13 22:10:51 +01:00
Timo Kösters 83a9095cdc fix? 2022-01-13 22:10:51 +01:00
Timo Kösters 74951cb239 dbg 2022-01-13 22:10:51 +01:00
Timo Kösters 4b4afea2ab fix auth event fetching 2022-01-13 22:10:51 +01:00
Timo Kösters c9c9974641 fix: stack overflows when fetching auth events 2022-01-13 22:10:50 +01:00
Timo Kösters a30b588ede rocksdb as default 2022-01-13 22:10:50 +01:00
Timo Kösters 1d647a1a9a improvement: allow rocksdb again 2022-01-13 22:10:43 +01:00
Timo Kösters b25354c747 Merge branch 'add_remove_appservice' into 'next'
Add ability to remove an appservice

See merge request famedly/conduit!236
2022-01-13 11:38:17 +00:00
Torsten Flammiger eecd664c43 Reformat code 2022-01-13 12:26:23 +01:00
Timo Kösters f3ea2df9fe Merge branch 'simpler-traefik-nginx' into 'next'
Make traefik+nginx config more self-contained

See merge request famedly/conduit!239
2022-01-13 11:18:15 +00:00
Timo Kösters fbcbadf265 Merge branch 'rust-1.53' into 'next'
Restore compatibility with Rust 1.53

See merge request famedly/conduit!244
2022-01-13 11:09:14 +00:00
Jonas Platte bcf4ede0bc Restore compatibility with Rust 1.53 2022-01-13 12:06:20 +01:00
Timo Kösters f5d1dda766 Merge branch 'up-ruma' into 'next'
Upgrade Ruma

See merge request famedly/conduit!243
2022-01-13 10:52:13 +00:00
Jonas Platte 84862352ba Replace to_string calls on string literals with to_owned 2022-01-13 11:48:40 +01:00
Jonas Platte cf54185a1c Use struct literals for consistency 2022-01-13 11:48:18 +01:00
Jonas Platte 349865d3cc Upgrade Ruma 2022-01-13 11:44:23 +01:00
Timo Kösters 2fa8171e79 Merge branch 'ci-use-sccache' into 'next'
CI: Use sccache for caching

Closes #200

See merge request famedly/conduit!232
2022-01-13 10:42:33 +00:00
Timo Kösters 8e12b47df4 Merge branch 'no-passwords-in-db' into 'next'
Do not store uiaa requests in database

See merge request famedly/conduit!219
2022-01-13 10:33:49 +00:00
Timo Kösters 0ec26b7e96 Merge branch 'next' into 'next'
refactor:moved key watch wake logic to specific module

See merge request famedly/conduit!238
2022-01-13 10:27:56 +00:00
Timo Kösters b32e85ffa8 Merge branch 'up-ruma' into 'next'
Upgrade Ruma

See merge request famedly/conduit!237
2022-01-13 10:24:45 +00:00
Ticho 34782694 b746f17e56 Make traefik+nginx config more self-contained
The nginx instance which is serving the .well-known endpoints can serve
the simple JSON replies directly from memory, instead of having them
as external files on disk.
2022-01-07 13:06:21 +00:00
Torsten Flammiger 8d51359668 Fix typo and remove unneeded newline 2021-12-26 20:49:19 +01:00
Torsten Flammiger a69eb277d4 Update count users: It's now list_local_users and contains the number and the usernames 2021-12-26 20:00:31 +01:00
Torsten Flammiger 39787b41cb Rename admin command CountUsers -> CountLocalUsers; Update comments 2021-12-26 12:04:38 +01:00
Torsten Flammiger 2281bcefc6 Finalize count_local_users function 2021-12-26 11:06:28 +01:00
Torsten Flammiger d21030566c Rename/Add count methods to count_local_users 2021-12-25 21:29:03 +01:00
Torsten Flammiger 567cf6dbe9 Add command count_local_users to database/rooms.rs 2021-12-25 20:51:22 +01:00
Torsten Flammiger 7c1b2625cf Prepare to add an option to list local user accounts from your homeserver 2021-12-24 23:06:54 +01:00
Tglman a889e884e6 refactor:moved key watch wake logic to specific module 2021-12-23 23:17:43 +00:00
Jonas Platte aba95b20f3 Upgrade Ruma 2021-12-23 17:40:42 +01:00
Moritz Bitsch c4a438460e Use Box to store UserID and DeviceID
Userid and DeviceID are of unknown size, use Box to be able to store
them into the userdevicesessionid_uiaarequest BTreeMap
2021-12-22 19:26:23 +01:00
Torsten Flammiger 7f2445be6c On unregister_appservice(service_name), remove the appservice service_name from cache too 2021-12-22 16:48:27 +01:00
Torsten Flammiger b6c9582cf4 Fix doc style comment according to Rust; VSCode added line breaks 2021-12-22 13:09:56 +01:00
Torsten Flammiger 7857da8a0b Add ability to remove an appservice 2021-12-20 15:46:36 +01:00
Moritz Bitsch 720a54b3bb Use String to store UserId for uiaa request
Fixes compilation error after ruma upgrade
2021-12-18 19:05:18 +01:00
Moritz Bitsch 0725b69abb Clean up userdevicesessionid_uiaarequest BTreeMap
There is no need to encode or decode anything as we are not
saving to disk
2021-12-18 18:57:36 +01:00
Moritz Bitsch fe8cfe0556 Add database migration to remove stored passwords
uiaarequests can contain plaintext passwords, which were stored on disk
2021-12-18 18:57:36 +01:00
Moritz Bitsch 3d25d46dc5 Use simple BTreeMap to store uiaa requests
some uiaa requests contain plaintext passwords which should never be
persisted to disk.

Currently there is no cleanup implemented (you have to restart conduit)
2021-12-18 18:57:36 +01:00
Timo Kösters 9b57c89df6 Merge branch 'more-event-id-arcs' into 'next'
Use Arc for EventIds in PDUs

See merge request famedly/conduit!229
2021-12-16 13:06:30 +00:00
Jonas Platte 34d3f74f36 Use Arc for EventIds in PDUs
Upgrades Ruma again to make this work.
2021-12-16 13:55:24 +01:00
Timo Kösters 11a21fc136 Merge branch 'up-ruma' into 'next'
Upgrade ruma

See merge request famedly/conduit!228
2021-12-15 14:22:30 +00:00
Jonas Platte 0183d003d0 Revert rename of Ruma<_> parameters 2021-12-15 13:58:25 +01:00
Jonas Platte f712455047 Reduce EventId copying 2021-12-15 13:00:37 +01:00
Jonas Platte 58ea081762 Use int! macro instead of Int::from 2021-12-15 13:00:37 +01:00
Jonas Platte bffddbd487 Simplify identifier parsing code 2021-12-15 13:00:37 +01:00
Jonas Platte 41fef1da64 Remove unnecessary .to_string() calls 2021-12-15 13:00:37 +01:00
Jonas Platte 892a0525f2 Upgrade Ruma 2021-12-15 13:00:37 +01:00
Jonas Platte 1fc616320a Use struct init shorthand 2021-12-15 13:00:37 +01:00
Timo Kösters 14a178d783 Merge branch 'update-docker-base-image' into 'next'
Update docker images

See merge request famedly/conduit!230
2021-12-15 10:14:20 +00:00
Jonas Zohren 339a26f56c Update docker images 2021-12-15 10:14:20 +00:00
Jonas Zohren adb518fa0d CI: Use curl instead of wget
The rust docker image already comes with curl, no need to install wget.
2021-12-14 11:16:40 +01:00
Jonas Zohren f91216dd3c CI: Optionally use sccache for compilation
This moves compiler caching for incremental builds away from GitLab
caching the whole target/ folder to caching each code unit in S3.
This aleviates the need to zip and unzip and just caches on the fly.

This feature is optional and gated behind the SCCACHE_BIN_URL env
2021-12-14 11:16:02 +01:00
Timo Kösters ca724b6340 Merge branch '226-fix-docker-ci-issues' into 'next'
Fixes for !225

See merge request famedly/conduit!226
2021-11-25 22:36:44 +00:00
Jonas Zohren 9bfc7b34b6 Fixes for !225 2021-11-25 22:36:44 +00:00
Timo Kösters afa5d449c6 Merge branch 'better-multiarch-building-the-second-attempt' into 'next'
CI: New Multiarch builds and Docker images + cargo clippy/test output now integrated into GitLab

Closes #145

See merge request famedly/conduit!225
2021-11-21 17:34:09 +00:00
Jonas Zohren 2fff720df3 CI: New Multiarch builds and Docker images + cargo clippy/test output now integrated into GitLab 2021-11-21 17:34:08 +00:00
Timo Kösters da00f611e9 Merge branch 'feature/turn-server-settings' into 'next'
Implement turn server settings

Closes #97

See merge request famedly/conduit!208
2021-11-19 16:39:24 +00:00
Moritz Bitsch 9fccbb014a Implement TURN server authentication with hmac
This is a prefered method to allow limited access to the TURN server
2021-11-12 12:43:15 +00:00
Moritz Bitsch 109892b4b7 Implement turn server settings
this fills out the infos in /_matrix/client/r0/voip/turnServer with
values specified in the server config
2021-11-12 12:43:15 +00:00
Jonas Platte 24a835647c Merge branch 'nyaaori/fix-room-creation' into 'next'
Make createRoom follow spec for m.room.create, allowing creation of spaces

See merge request famedly/conduit!220
2021-11-09 16:34:51 +00:00
Nyaaori c4bce1d0c7 Cleanup room.rs; replace unwraps with map_err 2021-11-09 16:12:44 +00:00
Jonas Platte 9b63708685 Merge branch 'nyaaori/fix-join-panic' into 'next'
Fix join panic bug

See merge request famedly/conduit!224
2021-11-09 14:46:28 +00:00
Nyaaori 86177faae7 Fix join panic bug 2021-11-07 07:57:15 +00:00
Timo Kösters 2a749c1e99 Merge branch 'nyaaori/implement-report' into 'next'
Implement the report feature

Closes #13

See merge request famedly/conduit!218
2021-11-03 14:17:32 +00:00
Timo Kösters 5ae753b2e7 Merge branch 'amorgan-next-patch-81816' into 'next'
Add 'Federation publicRoom Name/topic keys are correct' test to sytest whitelist

See merge request famedly/conduit!221
2021-10-27 11:49:55 +00:00
Andrew Morgan 743bdbe961 Add 'Federation publicRoom Name/topic keys are correct' test to sytest whitelist 2021-10-26 13:30:02 +00:00
Nyaaori d5d25fb064 Preserve all m.room.create entries when performing room upgrades 2021-10-24 22:13:08 +00:00
Nyaaori 8087a26a35 Make createRoom follow spec for m.room.create, allowing creation of spaces 2021-10-24 20:26:51 +00:00
Nyaaori bbe16f8467 Update Ruma 2021-10-24 00:45:02 +00:00
Nyaaori 50f931a2fd Cleanup and fix validation in report.rs, lower max report length, better html 2021-10-20 11:12:06 +00:00
Nyaaori 1541b93f45 Make reports look nicer and reduce spam potential, increase max report length to 1000 characters 2021-10-18 05:38:41 +00:00
Nyaaori ccf501a420 Initial implementation of /report, fixing #13 2021-10-18 04:51:11 +00:00
Timo Kösters 6f70beb78c Merge branch 'nyaaori/fix-bad-json' into 'next'
Nyaaori/fix bad json

Closes #115

See merge request famedly/conduit!216
2021-10-16 06:59:34 +00:00
Timo Kösters 259fc580ca Merge branch 'nyaaori/otk-sync-fix' into 'next'
Remove device_one_time_keys_count from is_empty() sync checks, fixing sync issue as reported by Nekron

Closes #115

See merge request famedly/conduit!215
2021-10-16 06:54:14 +00:00
Nyaaori 55d78b1914 Bump Ruma version to fix M_BAD_JSON on login 2021-10-16 00:45:51 +00:00
Nyaaori 484a044b50 Remove device_one_time_keys_count from is_empty() sync checks, fixing sync issue as reported by Nekron 2021-10-15 23:17:08 +00:00
Nyaaori 2264a5f945 Merge branch 'next' of https://gitlab.com/famedly/conduit into next 2021-10-15 23:14:07 +00:00
Timo Kösters e88929e154 Merge branch 'nyaaori/fix-otk-reporting' into 'next'
Always send device_one_time_keys_count, fixing #178

Closes #169 and #178

See merge request famedly/conduit!213
2021-10-15 13:01:52 +00:00
Nyaaori d996d1b0e6 Always send device_one_time_keys_count, fixing #178 2021-10-15 12:38:20 +00:00
Timo Kösters dc8bc4a880 Merge branch 'up-ruma' into 'next'
Upgrade Ruma

See merge request famedly/conduit!210
2021-10-15 11:38:12 +00:00
Timo Kösters 87694f4369 Merge branch 'moa31-next-patch-76037' into 'next'
Change listen address when running inside a Container to prevent Bad Gateway error

See merge request famedly/conduit!207
2021-10-15 10:51:19 +00:00
Timo Kösters 335027e739 Merge branch 'nyaaori/admin-check' into 'next'
Implement admin check and add config option for allowing room creation

See merge request famedly/conduit!211
2021-10-15 10:47:55 +00:00
Timo Kösters 0ccda5f1c7 Merge branch 'nyaaori/allow_encryption' into 'next'
Make allow_encryption work again, fixing #115

Closes #115

See merge request famedly/conduit!212
2021-10-15 10:20:05 +00:00
Nyaaori 9082a531c9 Make allow_encryption work again, fixing #115 2021-10-15 09:57:49 +00:00
Jonas Platte 91afa1e0e0 Make Result alias usable with any error type 2021-10-13 12:25:58 +02:00
Jonas Platte f2ef5677e0 Reduce turbofish usage
Should make the code a little bit easier to read.
2021-10-13 12:25:58 +02:00
Jonas Platte 1c4d9af586 Enable more lints and apply their suggestions 2021-10-13 10:24:39 +02:00
Jonas Platte 09895a20c8 Upgrade Ruma
Co-authored-by: Timo Kösters <timo@koesters.xyz>
2021-10-13 10:16:45 +02:00
Nyaaori 636db8cfaa Make allow_encryption work again, fixing #115 2021-09-24 22:44:26 +00:00
Nyaaori 6bc8fb2ae7 Implement admin check and add config option for allowing room creation 2021-09-24 07:16:34 +00:00
Luc-pascal Ceccaldi 5b23d3d06e Change listen address when running inside a Container to prevent Bad Gateway error 2021-09-23 07:49:52 +00:00
Timo Kösters 47f3263396 Merge branch 'gwmngilfen-next-patch-21674' into 'next'
Add two flavours of change for the mautrix-signal patch

See merge request famedly/conduit!197
2021-09-15 20:31:21 +00:00
Greg Sutcliffe d38f9b5f01 Move Generic instructions for APPSERVICES above notes for specific bridges and tidy up. 2021-09-15 21:16:25 +01:00
Greg Sutcliffe fa616342b6 Add two flavours of change for the mautrix-signal patch 2021-09-15 21:16:25 +01:00
Timo Kösters 34fa7fee05 Merge branch 'ci-fix-kaniko-i-hope' into 'next'
fix(ci): Convince kaniko that it is indeed running in a container by --force-ing it.

See merge request famedly/conduit!205
2021-09-15 07:05:33 +00:00
Jonas Zohren e8d998cedf fix(ci): Convince kaniko that it is indeed running in a container by --force-ing it. 2021-09-14 20:44:11 +00:00
Timo Kösters 565fe3a7dd Merge branch 'faster-sending' into 'next'
improvement: batch inserts for inserting pdus

See merge request famedly/conduit!204
2021-09-14 18:35:12 +00:00
Timo Kösters 5c02dc7830 improvement: batch inserts for inserting pdus 2021-09-14 14:33:46 +02:00
Timo Kösters 159e22e450 Merge branch 'ci-fix-aarch64-build' into 'next'
fix(ci): Fix aarch64 build

See merge request famedly/conduit!203
2021-09-14 12:09:44 +00:00
Jonas Zohren ab472e9b7c fix(ci): Fix aarch64 build
gcc-8-aarch64-linux-gnu is not available in debian 11 (which the rust image uses), so update to gcc-10

Signed-off-by: Jonas Zohren <git-pbkyr@jzohren.de>
2021-09-14 12:32:07 +02:00
Timo Kösters 31264e3d1d Merge branch 'ci-remove-element-web-register-test' into 'next'
Remove the "register an account with element" test

See merge request famedly/conduit!202
2021-09-14 09:50:24 +00:00
Jonas Zohren 422bd09e32 Remove the "register an account with element" test
Broke due to a timeout and Timo does not like broken tests.
Less testing means less failing tests.

Also, hopefully sytest is less broken now.
2021-09-14 09:44:15 +00:00
Timo Kösters b64538c6f1 Merge branch 'efficient-sqlite' into 'next'
improvement: more efficient sqlite

See merge request famedly/conduit!199
2021-09-14 07:23:02 +00:00
Timo Kösters 178451e9b5 Merge branch 'deduplicate-watchers' into 'next'
improvement: deduplicate watchers

See merge request famedly/conduit!201
2021-09-14 07:10:59 +00:00
Timo Kösters 583a966f6e Merge branch 'less-alloc' into 'next'
Reduce allocations in server_server

See merge request famedly/conduit!190
2021-09-14 07:09:55 +00:00
Timo Kösters cbee7fe111 improvement: deduplicate watchers 2021-09-13 23:20:30 +02:00
Jonas Platte d68c93b5fa Clean up (mostly automated with cargo clippy --fix) 2021-09-13 20:58:58 +02:00
Jonas Platte 979ec6b4fa Upgrade ruma 2021-09-13 20:55:13 +02:00
Jonas Platte 910ad7fed1 Get rid of more unnecessary intermediate collections 2021-09-13 20:55:12 +02:00
Timo Kösters 2c8412fe58 improvement: more efficient sqlite 2021-09-13 20:12:42 +02:00
Timo Kösters 06b0c9267f Merge branch 'appservice-signal' into 'next'
Add mautrix-signal appservice instructions

See merge request famedly/conduit!196
2021-09-13 14:07:18 +00:00
Daniel Wiesenberg 00927a7ce3 Add mautrix-signal appservice instructions 2021-09-09 10:02:11 +02:00
Timo Kösters 4aacafc298 Merge branch 'roomidshort-fix' into 'next'
fix sync not firing on new events in room

See merge request famedly/conduit!194
2021-09-08 13:39:05 +00:00
Jonathan de Jong 23c5ec8099 fix sync not firing on new events in room 2021-09-08 14:50:44 +02:00
Timo Kösters 562a2524d7 Merge branch 'db-errors' into 'next'
fix(database): handle errors in config parsin or database creation

Closes #121

See merge request famedly/conduit!193
2021-09-08 09:53:25 +00:00
Rasmus Thomsen 51245d34f1 fix(database): handle errors in config parsin or database creation
Showing the user a backtrace can be pretty confusing, so just printing
a nice error message makes errors easier to understand for end users.

fixes #121
2021-09-08 09:08:45 +01:00
Timo Kösters 4a773a1096 Merge branch 'rm-unused-deps' into 'next'
Remove unused dependencies

See merge request famedly/conduit!192
2021-09-07 14:00:27 +00:00
Jonas Platte 5821b8e705 Remove unused dependencies 2021-09-07 15:41:01 +02:00
Timo Kösters 0737bc021f Merge branch 'charludo-next-patch-31617' into 'next'
apache2 sample-config error

See merge request famedly/conduit!191
2021-09-06 18:38:38 +00:00
charludo 487046571c These lines get *generated* by certbot. Having them in the file before running certbot results in an apache2 error, and putting them in afterwards is not necessary, since certbot places them there on its own. 2021-09-06 18:35:35 +00:00
Timo Kösters 2d242523fc Merge branch 'next' into 'next'
Fix deprecated/removed Traefik label

See merge request famedly/conduit!189
2021-09-03 20:56:21 +00:00
Daniel Wiesenberg bbe36810ec Fix deprecated/removed Traefik label 2021-09-03 21:51:17 +02:00
Timo Kösters a449b1d73f Merge branch 'fix-old-events' into 'next'
fix: make sure old events don't sneek into the timeline

See merge request famedly/conduit!188
2021-09-03 09:47:24 +00:00
Timo Kösters 71341ea05a fix: make sure old events don't sneek into the timeline 2021-09-03 11:26:15 +02:00
Timo Kösters 73b764322f Merge branch 'adjust-ci-for-next-and-master-development' into 'master'
CI: Adjust CI for master and next branch development model (master)

See merge request famedly/conduit!187
2021-09-02 18:25:57 +00:00
Jonas Zohren a1f51440e2 chore(CI): Adjust CI for master and next branch development model
- Build release builds for branches "master" and "next"
- Push docker images under different tags, depending on why the pipeline started
  - branch master: push to `latest`
  - branch next: push to `next`
  - tag: push to `$TAG_NAME`

Signed-off-by: Jonas Zohren <git-pbkyr@jzohren.de>
2021-09-02 17:17:51 +02:00
Timo Kösters 0d6ae2e1e7 Merge branch 'thanks' into 'master'
docs: add thanks to

See merge request famedly/conduit!185
2021-09-02 11:10:23 +00:00
Timo Kösters d0baca44f8 docs: add thanks to 2021-09-02 13:05:19 +02:00
Timo Kösters 5536bfdca5 Merge branch 'ci-also-run-for-tags' into 'master'
Also run CI on git tags, not only new commits.

See merge request famedly/conduit!184
2021-09-02 07:33:25 +00:00
Jonas Zohren 3357bbec1e chore: Also run CI on git tags, not only new commits.
Signed-off-by: Jonas Zohren <git-pbkyr@jzohren.de>
2021-09-02 09:17:25 +02:00
Timo Kösters 102ff574ea Merge branch 'readme' into 'master'
docs: update readme and version

See merge request famedly/conduit!180
2021-09-01 21:28:28 +00:00
Timo Kösters 2770ce2cf6 fix: avoid panic 2021-09-01 23:00:24 +02:00
Timo Kösters 7cd7f1923f chore: update dependencies 2021-09-01 22:31:25 +02:00
Timo Kösters 43d693ca19 revert Arc<EventId> commit 2021-09-01 22:30:11 +02:00
Timo Kösters 875b345a5f docs: update readme and version 2021-09-01 22:18:19 +02:00
Timo Kösters 17adf096e9 Merge branch 'server-server-opt' into 'master'
Remove unneeded intermediary container collection

See merge request famedly/conduit!183
2021-09-01 20:02:37 +00:00
Jonas Platte 487601a249 Remove unneeded intermediary container collection 2021-09-01 21:46:05 +02:00
Timo Kösters 27788af022 Merge branch 'batch_keys' into 'master'
Get required keys in batch when joining a room

See merge request famedly/conduit!182
2021-09-01 19:12:21 +00:00
Timo Kösters 4b39d7cb64 fix: batch key fetching 2021-09-01 20:02:34 +02:00
Kurt Roeckx c53d79e287 fixup! Get required keys in batch when joining a room 2021-09-01 19:30:32 +02:00
Kurt Roeckx 984ad5ecd6 fixup! Get required keys in batch when joining a room 2021-09-01 19:30:31 +02:00
Kurt Roeckx b546a5bf15 Let our server signing be valid for 1 week
It was valid for 2 minutes, which can result in the server being
asked too much for something that never changes.
2021-09-01 19:30:31 +02:00
Kurt Roeckx a87519fb71 Get required keys in batch when joining a room
We now ask the trusted server for all keys in 1 request, instead of
asking each server individual for it's own keys.
2021-09-01 19:30:30 +02:00
Timo Kösters 9c3f1a9272 Merge branch 'master' into 'master'
Add Traefik setup, incl. step-by-step, to docker README.

See merge request famedly/conduit!158
2021-09-01 16:04:41 +00:00
Timo Kösters 8518d59a0b Merge branch 'clippy' into 'master'
Fix a bunch of clippy lints

See merge request famedly/conduit!178
2021-09-01 10:47:23 +00:00
Timo Kösters 4e68c22457 Merge branch 'docs' into 'master'
docs: documentation for every endpoint

See merge request famedly/conduit!177
2021-09-01 10:20:13 +00:00
Timo Kösters 73d876643c improvement: make pdu cache capacity configurable 2021-09-01 11:03:45 +02:00
Timo Kösters 22779c21d3 Merge branch 'health_script' into 'master'
Fix healthcheck.sh permissions and rearange ci dockerfile

See merge request famedly/conduit!179
2021-09-01 08:08:22 +00:00
Daniel Wiesenberg 8c584887c9 Fix healthcheck.sh permissions and rearange ci dockerfile 2021-08-31 23:17:32 +02:00
Timo Kösters 33738dbbc2 improvement: stop prev event fetching if too many events fail 2021-08-31 22:04:47 +02:00
Jonas Platte a6bb9bbe68 Fix a bunch of clippy lints 2021-08-31 21:20:03 +02:00
Timo Kösters b9eb39a9c6 docs: documentation for every endpoint 2021-08-31 19:20:34 +02:00
Timo Kösters 364820aae4 Merge branch 'registration-default' into 'master'
Default registration true

See merge request famedly/conduit!176
2021-08-31 17:03:05 +00:00
Timo Kösters ec38411620 Merge branch 'health_script' into 'master'
Move docker healthcheck into dedicated script.

See merge request famedly/conduit!173
2021-08-31 16:59:33 +00:00
Jonathan de Jong 9ec8b7f2b3 registration default true 2021-08-31 18:25:35 +02:00
Daniel Wiesenberg a08ea15695 Use $CI_COMMIT_SHORT_SHA for GIT_REF
Using `$CI_COMMIT_REF_NAME` means we get `master` for every image build,
which is not very useful/informative. Using `$CI_COMMIT_SHORT_SHA`,
on the other hand, makes it possible to see exactly from which commit an
image was built.
2021-08-31 18:03:44 +02:00
Timo Kösters 49dd3567c6 Merge branch 'connection-lifetime' into 'master'
thread_local connections

See merge request famedly/conduit!175
2021-08-30 19:05:22 +00:00
Jonathan de Jong 69df9a0145 add tls 2021-08-30 20:18:48 +02:00
Timo Kösters d0d47675d8 Merge branch 'speed' into 'master'
improvement: call /state_ids less often by using state res

See merge request famedly/conduit!174
2021-08-30 17:32:41 +00:00
Timo Kösters bd4ea14a29 improvement: call /state_ids less often by using state res 2021-08-30 16:07:59 +02:00
Timo Kösters 9033cc86aa Merge branch 'speed' into 'master'
fix: make appservices more efficient

See merge request famedly/conduit!172
2021-08-30 09:14:08 +00:00
Timo Kösters 1b25e78e3a fix: inviting dendrite users 2021-08-30 10:56:41 +02:00
Timo Kösters d57c19802d improvement: don't do state updates if the event was soft failed 2021-08-30 10:46:36 +02:00
Daniel Wiesenberg 9ded40e983 Change healthcheck in ci dockerfile 2021-08-30 09:14:08 +02:00
Daniel Wiesenberg a469ca0461 Move docker healthcheck into dedicated script. 2021-08-29 20:01:38 +02:00
Timo Kösters 632a1343eb fix: make appservices more efficient 2021-08-29 20:00:43 +02:00
Timo Kösters 00c9ad12bd Merge branch 'speed' into 'master'
Speed

See merge request famedly/conduit!168
2021-08-28 18:28:25 +00:00
Timo Kösters 1601027605 add warning if calculated event id != requested event id 2021-08-28 19:35:42 +02:00
Timo Kösters afca61fe7c fix: don't retry soft failed events 2021-08-28 11:39:33 +02:00
Devin Ragotzy 9bff276fa9 Use Arc<EventId> in place of most EventIds 2021-08-27 20:20:14 +02:00
Timo Kösters 19b89ab91f fix: server resolution 2021-08-27 20:20:13 +02:00
Timo Kösters 0330d3e270 fix: server resolution with well-known files 2021-08-27 20:20:13 +02:00
Timo Kösters a1e8a99db5 improvement: less IO for auth chains 2021-08-27 20:20:12 +02:00
Timo Kösters 33172a70e6 fix: improve key fetching 2021-08-27 20:20:12 +02:00
Timo Kösters 1b56a7bbfd Merge branch 'speed' into 'master'
fix: e2ee over federation

See merge request famedly/conduit!165
2021-08-26 12:55:47 +00:00
Timo Kösters d485eb5a24 chore: bump dependencies 2021-08-26 14:38:25 +02:00
Timo Kösters 41d07be97b improvement: persist cached auth chains in db 2021-08-26 14:19:08 +02:00
Timo Kösters bef4fe50ce fix: better migration, force e2ee device key updates 2021-08-26 14:19:08 +02:00
Timo Kösters 9152b877a7 fix: wrong soft fail check, too many events in /sync state response 2021-08-26 14:19:07 +02:00
Timo Kösters 9f8c45c763 fix: e2ee over federation
to device events were not being sent
2021-08-26 14:19:07 +02:00
Daniel Wiesenberg 5800e9b797 Add Traefik setup, incl. step-by-step, to docker README. 2021-08-26 12:26:32 +02:00
Timo Kösters 5aa56b92ee Merge branch 'speed' into 'master'
improvement: more efficient auth chain cache

See merge request famedly/conduit!164
2021-08-24 20:12:10 +00:00
Timo Kösters dd87066546 improvement: more efficient auth chain cache 2021-08-24 21:55:18 +02:00
Timo Kösters 30b309b708 Merge branch 'speed' into 'master'
Better E2EE and faster incoming event handling

See merge request famedly/conduit!163
2021-08-24 18:16:56 +00:00
Timo Kösters d5695fb9fe Merge branch 'only-set-max-optimzations-in-ci' into 'master'
Only apply max. optimizations in CI builds.

See merge request famedly/conduit!162
2021-08-24 17:54:17 +00:00
Timo Kösters 81e056417c improvement: better e2ee over fed, faster incoming event handling 2021-08-24 19:52:05 +02:00
Timo Kösters 72dd95f500 Merge branch 'createwarnings' into 'master'
fix: correct create event warnings

See merge request famedly/conduit!161
2021-08-24 17:51:53 +00:00
Jonas Zohren b6e755f67e Only apply max. optimizations in CI builds.
The average german man has a life expectancy of 78.7 years, or 689884.2 hours.
Assuming that Timo is 20 years old, he has rougly 514564.2 hours left on planet earth.
Also assuming that cross release builds took him 25 minutes before,
but 2-2.5x of that with the current release compilation config he wasted roughly an hour waiting for it to complete.
If he continued to work on Conduit for 20 more years (or 175320 hours),
and makes a release compilation about once per day, this means 7305 hours or 304 days wasted waiting for the rust compiler.
By cutting that back down to the original settings, he get's 182 days of his life back.
That's about 0.63% of his remaining life.
182 joyful days he can spend with family and loved ones.
2021-08-22 21:05:32 +00:00
Timo Kösters 4f8cf3bed4 Merge branch 'send_join_v1' into 'master'
Implement federation/v1/send_join

See merge request famedly/conduit!141
2021-08-22 12:06:26 +00:00
Timo Kösters b3ea6adc9c Merge branch 'get-pdu-json' into 'master'
Consistent and escaped response in get_pdu

See merge request famedly/conduit!160
2021-08-22 11:08:11 +00:00
Timo Kösters 6d83954c40 fix: room upgrades 2021-08-22 13:06:50 +02:00
Timo Kösters 667ffb4239 fix: correct create event warnings 2021-08-22 13:01:13 +02:00
Kurt Roeckx 48494c9464 Implement federation/v1/send_join 2021-08-22 10:07:38 +02:00
Tom Smeding 2ef23b213a Consistent and escaped response in get_pdu
1. The fallback text of the get_pdu admin room command response message
   now contains the same text as the formatted_body content (namely, the
   json instead of Debug-formatting of a serde type).
2. The formatted_body content of the get_pdu response is now
   html-escaped.
2021-08-21 15:31:26 +02:00
Timo Kösters 33481ec062 Merge branch 'statediffs' into 'master'
Statediffs

See merge request famedly/conduit!145
2021-08-21 13:05:38 +00:00
Timo Kösters 3b78e43a18 fmt 2021-08-21 14:24:10 +02:00
Timo Kösters 4956fb9fba improvement: limit prev event fetching 2021-08-21 14:22:21 +02:00
Timo Kösters b09499c2df fix: don't save empty tokens 2021-08-19 14:05:23 +02:00
Timo Kösters 46d8a46e1f improvement: faster incoming transaction handling 2021-08-19 11:01:43 +02:00
Timo Kösters cefca2d0d1 Merge branch 'different-optimizations-for-master-and-branches' into 'master'
CI: Use full optimizations for master and faster config else

See merge request famedly/conduit!155
2021-08-18 08:58:45 +00:00
Timo Kösters bf7e019a68 improvement: better prev event fetching, perf improvements 2021-08-17 16:06:09 +02:00
Timo Kösters 75ba8bb565 fix: faster room joins 2021-08-17 00:22:52 +02:00
Timo Kösters 0823506d05 fix: don't load endless prev events and fix room join bug 2021-08-16 23:24:52 +02:00
Timo Kösters 2c3bee34a0 improvement: better sqlite 2021-08-15 13:27:03 +02:00
Timo Kösters a4310f840e improvement: state info cache 2021-08-15 06:48:25 +02:00
Timo Kösters 5bd5b41c70 fix: fetch event multiple times 2021-08-15 06:48:25 +02:00
Timo Kösters f9a2edc0dd fix: also fetch prev events that are outliers already 2021-08-15 06:48:25 +02:00
Timo Kösters ecd1e45a44 fix: fetch more than one prev event 2021-08-15 06:48:24 +02:00
Timo Kösters 1d46569929 fix: don't use recursion for prev events 2021-08-15 06:48:24 +02:00
Timo Kösters 1e3a8ca35d fmt 2021-08-15 06:48:24 +02:00
Timo Kösters 0cb22996be remove prev event fetch limit 2021-08-15 06:48:14 +02:00
Jonas Zohren 9c3a8edcae Use full optimizations for master and faster config else
Signed-off-by: Jonas Zohren <git-pbkyr@jzohren.de>
2021-08-14 21:41:27 +02:00
Timo Kösters 38effda799 fix: delta calculation 2021-08-14 19:11:10 +02:00
Timo Kösters 3cf0145bc5 fix: room exists panic 2021-08-14 08:26:45 +02:00
Timo Kösters 3eabaa2a95 finish implementing better state store 2021-08-13 19:49:16 +02:00
Timo Kösters 31f60ad6fd improvement: migrations, batch inserts 2021-08-12 17:56:35 +02:00
Timo Kösters 41dd620d74 WIP improvement: much better state storage 2021-08-12 17:56:35 +02:00
Timo Kösters 9410d3ef9c fix: long prev event fetch times for huge rooms 2021-08-12 17:56:14 +02:00
Timo Kösters 665aee11c0 less warnings 2021-08-12 17:56:14 +02:00
Timo Kösters 5173d0deb5 improvement: cache for short event ids 2021-08-12 17:56:14 +02:00
Timo Kösters c2c6a8673e improvement: use u64s in auth chain cache 2021-08-12 17:56:14 +02:00
Timo Kösters 096e0971f1 improvement: smaller cache, better prev event fetching 2021-08-12 17:56:13 +02:00
Timo Kösters 8a5dbef474 Merge branch 'set-canonical-room-alias-on-room-creation' into 'master'
Try to set canonical room alias on room creation.

Closes #123

See merge request famedly/conduit!154
2021-08-12 12:24:33 +00:00
Jonas Zohren 4cf3c432af Try to set canonical room alias on room creation.
The spec does not require servers to apply a room canonical alias event upon room creation (yet).
Still, synapse does that, since users can set their desired alias in Elements room creation dialog.
With this commit, conduit also sets that alias if it is a valid one.

This closes https://gitlab.com/famedly/conduit/-/issues/123
2021-08-12 14:02:46 +02:00
Timo Kösters dd3c60fb5a Merge branch 'master' into 'master'
Bump version of alpine docker image to 3.14

See merge request famedly/conduit!150
2021-08-10 05:44:16 +00:00
Timo Kösters e83c226b1b Merge branch 'zap-displayname' into 'master'
Set nicer displayname

See merge request famedly/conduit!149
2021-08-10 05:43:44 +00:00
Jonathan de Jong 8335f44bfe Set nicer displayname 2021-08-10 05:43:44 +00:00
Timo Kösters 3745a7cbe6 Merge branch '3pid' into 'master'
Add support for a minimal `r0/account/3pid`.

See merge request famedly/conduit!151
2021-08-10 05:42:50 +00:00
Timo Kösters 610b4f9ad1 Merge branch 'fetchprev' into 'master'
improvement: try to load missing prev events

See merge request famedly/conduit!152
2021-08-10 05:30:12 +00:00
Ahmed Charles 879aeafa9e Add support for a minimal r0/account/3pid. 2021-08-09 12:34:25 -07:00
Daniel Wiesenberg a7b6af7caf Bump version of alpine docker image to 3.14 2021-08-09 21:21:18 +02:00
Timo Kösters 260db9fcc7 improvement: try to load missing prev events 2021-08-09 21:05:41 +02:00
Timo Kösters 1cbc61c558 Merge branch 'badeventfix' into 'master'
fix: handle bad events in db better

See merge request famedly/conduit!148
2021-08-08 19:48:08 +00:00
Timo Kösters d2f406e0e8 fix: handle bad events in db better 2021-08-08 21:33:28 +02:00
Timo Kösters a816e3decd Merge branch 'room_create_version' into 'master'
Support creating rooms with a version

See merge request famedly/conduit!147
2021-08-07 15:36:45 +00:00
Kurt Roeckx 989a20e99c Support creating rooms with a version 2021-08-07 16:25:21 +02:00
Timo Kösters 1cf9da26bf Merge branch 'timeout' into 'master'
improvement: longer timeout, more descriptive errors

See merge request famedly/conduit!146
2021-08-04 21:09:48 +00:00
Timo Kösters 55a2ff025f improvement: longer timeout, more descriptive errors 2021-08-04 22:55:03 +02:00
Timo Kösters 76660bf189 Merge branch 'sqlitefixes' into 'master'
Sqlitefixes

See merge request famedly/conduit!144
2021-08-04 19:52:30 +00:00
Timo Kösters df727688ef remove rocksdb 2021-08-04 21:17:40 +02:00
Timo Kösters 902404d48d improvement: save member count + sled fixes 2021-08-04 21:15:01 +02:00
Timo Kösters b813c34642 improvement: more auth chain caching 2021-08-04 18:30:56 +02:00
Timo Kösters ab7835dedb fix: early return from state res 2021-08-04 15:19:50 +02:00
Timo Kösters 9bb4c3cd01 improvement: batched inserts for tokenids 2021-08-04 12:54:26 +02:00
Timo Kösters fce22362d4 improvement: better auth chain calculation 2021-08-03 19:18:41 +02:00
Timo Kösters 41ec7cf5d0 improvement: batch inserts for stateids 2021-08-03 16:14:07 +02:00
Timo Kösters 49ade0cfbd improvement: allow batch inserts 2021-08-03 11:24:21 +02:00
Timo Kösters 0eeba86b32 fix: improve locks 2021-08-03 11:17:39 +02:00
Timo Kösters 6b06fc9707 fix: don't run push rules for users that don't exist 2021-08-03 10:24:20 +02:00
Timo Kösters bd63797213 improvement: make better use of sqlite connections 2021-08-03 10:24:14 +02:00
Timo Kösters 2c4f966d60 improvement: use sqlite properly 2021-08-01 16:59:52 +02:00
Timo Kösters 8174b16c38 Merge branch 'master' into 'master'
Also push docker image to docker hub

See merge request famedly/conduit!142
2021-08-01 10:10:51 +00:00
Timo Kösters 6666aae5a5 Merge branch 'docs' into 'master'
docs: make it clear that database_path is a folder

See merge request famedly/conduit!143
2021-07-30 17:44:33 +00:00
Timo Kösters 0f045890eb docs: make it clear that database_path is a folder 2021-07-30 19:27:37 +02:00
Timo Kösters 9cb99a05e0 Merge branch 'tracing_flame' into 'master'
feat: tracing flame graph

See merge request famedly/conduit!140
2021-07-30 16:42:25 +00:00
Timo Kösters dc85a8fafd fix: migration and push edu bugs 2021-07-30 18:05:26 +02:00
Daniel Wiesenberg fcd127aadc Also push docker image to docker hub 2021-07-30 17:15:44 +02:00
Timo Kösters 5df6b8cd5f improvement: better account data implementation 2021-07-30 16:08:24 +02:00
Timo Kösters 5c776e9ba7 feat: heed db backend (LMDB) 2021-07-29 23:11:53 +02:00
Timo Kösters c209775abd fix: pdu without state bug 2021-07-29 12:33:44 +02:00
Timo Kösters 5e924227b6 feat: add threadpool for iterator threads, bug fixes, tracing_flame support 2021-07-29 08:49:28 +02:00
Timo Kösters 734c4637f0 Merge branch 'ci-build-docker-image' into 'master'
CI: Build docker image

See merge request famedly/conduit!134
2021-07-21 15:05:20 +00:00
Timo Kösters e0072eff63 Merge branch 'v5' into 'master'
feat: support room version 5

See merge request famedly/conduit!138
2021-07-21 11:05:59 +00:00
Timo Kösters cae2b200cc Merge branch 'initial_state_keys' into 'master'
Implement From<AnyInitialStateEvent> on PduBuilder

Closes #116

See merge request famedly/conduit!136
2021-07-21 10:03:08 +00:00
Timo Kösters 918df9ca6d feat: support room version 5 2021-07-21 11:59:56 +02:00
Timo Kösters 387e864659 Merge branch 'aliases' into 'master'
Implement getting room aliases

See merge request famedly/conduit!116
2021-07-21 09:48:17 +00:00
Timo Kösters c84960df91 Merge branch 'deploy-guide-remove-arm-add-x86_64-musl' into 'master'
Docs: Remove arm download, but add x86_64 musl one

See merge request famedly/conduit!137
2021-07-21 09:34:14 +00:00
Jonas Zohren 32db4c09a0 Docs: Remove arm download, but add x86_64 musl one 2021-07-21 09:21:49 +00:00
Kurt Roeckx 0d33cc4acd Implement getting room aliases
Signed-off-by: Kurt Roeckx <kurt@roeckx.be>
2021-07-21 10:56:22 +02:00
phesch 666e1d30a3 Implement From<AnyInitialStateEvent> on PduBuilder
The conversion between the two is now direct and thus shouldn't lose the state_keys.
2021-07-21 10:55:23 +02:00
Timo Kösters f43fd6a475 Merge branch 'e2ee-fed' into 'master'
Initial E2EE over federation support

See merge request famedly/conduit!135
2021-07-21 08:41:00 +00:00
Timo Kösters 1587f2cd52 fix: check events in timeline (not only state) for member changes 2021-07-21 09:39:54 +02:00
Timo Kösters f121978897 fix: state bug 2021-07-20 23:36:03 +02:00
Timo Kösters 80533bfab2 fix: improve code when skipping /state_ids 2021-07-20 22:06:42 +02:00
Timo Kösters 08a3326431 docs: Initial end-to-end encryption over federation support 2021-07-20 21:37:08 +02:00
Timo Kösters fe3b5d32a7 feat: send to-device events over federation 2021-07-20 21:17:15 +02:00
Timo Kösters e20f55970e feat: call /query/profile over federation when local user asks 2021-07-20 19:49:47 +02:00
Timo Kösters 728e176a06 feat: /keys/query and /keys/claim over federation 2021-07-20 19:40:25 +02:00
Timo Kösters 7d14a46607 Merge branch 'improvements' into 'master'
Update ruma

See merge request famedly/conduit!127
2021-07-20 16:59:49 +00:00
Timo Kösters 68cc743f2a fix: use get_auth_chain method more often 2021-07-20 18:45:21 +02:00
Timo Kösters 56e5d5e3d2 fix: add warning for strange bug 2021-07-20 18:38:17 +02:00
Timo Kösters f0ac7ed933 chore: update ruma again 2021-07-20 15:25:17 +02:00
Timo Kösters 0f8ecdc625 fix: state res fixes 2021-07-20 15:25:17 +02:00
Timo Kösters cfaa900e83 improvement: auth chain cache 2021-07-20 15:25:16 +02:00
Timo Kösters f5273f7eb1 improvement: upgrade ruma and implement blurhashes 2021-07-20 15:25:16 +02:00
Timo Kösters 0fcefa4125 fix: ruma 2021-07-20 15:25:16 +02:00
Timo Kösters d07762f596 Merge branch 'connection-cushion' into 'master'
Spillover connection cushion

See merge request famedly/conduit!133
2021-07-20 10:39:04 +00:00
Jonathan de Jong d253f9236a change fraction type 2021-07-20 11:01:35 +02:00
Jonathan de Jong ec44f3d568 change to f64 2021-07-20 10:47:36 +02:00
Jonas Zohren 167e903a56 Fix typo 2021-07-19 22:02:10 +02:00
Jonas Zohren 0a8dadb797 Add hardcoded artifacts.expose_as to show them in MRs 2021-07-19 20:39:58 +02:00
Jonas Zohren 678ce0abc6 CI: Create docker image with musl binary 2021-07-19 20:39:58 +02:00
Jonathan de Jong e7a51c07d0 log change feedback 2021-07-19 17:17:10 +02:00
Jonathan de Jong 79bf7fc597 some logging shuffling 2021-07-19 16:46:59 +02:00
Jonathan de Jong 7e579f8d34 change to fraction-based approach 2021-07-19 16:25:41 +02:00
Jonathan de Jong 0f2dc9a239 add stuff and bits 2021-07-19 15:56:20 +02:00
Timo Kösters 59d538206f Merge branch 'fix-shutdown-period' into 'master'
Fix shutdown period

See merge request famedly/conduit!131
2021-07-19 13:11:25 +00:00
Jonathan de Jong faa283d35b review feedback 2021-07-19 13:44:53 +02:00
Timo Kösters 86160597ea Merge branch 'ci-package-upload-hotfix' into 'master'
CI: Fix package upload

See merge request famedly/conduit!132
2021-07-19 11:20:00 +00:00
Jonas Zohren d6b37480e7 CI: Fix package upload 2021-07-19 10:00:44 +00:00
Jonathan de Jong 3ce75d1f02 apply fix 2021-07-19 11:55:39 +02:00
Timo Kösters a50abeedad Merge branch 'ci-rough-sytest-integration' into 'master'
CI: Add sytest

See merge request famedly/conduit!130
2021-07-19 08:47:32 +00:00
Jonas Zohren 130b9841da CI: Add sytest 2021-07-19 08:47:31 +00:00
Timo Kösters ffa10a68b9 Merge branch 'more-detailed-issue-templates' into 'master'
Docs: More (detailed) templates for Issues and MRs

See merge request famedly/conduit!129
2021-07-19 08:28:10 +00:00
Timo Kösters 124b5484b5 Merge branch 'test-registering-with-element-web' into 'master'
CI: Test registration with element web

See merge request famedly/conduit!128
2021-07-19 08:23:05 +00:00
Jonas Zohren 2babff1e41 CI: Test registration with element web 2021-07-19 08:23:04 +00:00
Jonas Zohren cdd01262d2 Shorten more templates 2021-07-18 20:43:21 +00:00
Jonas Zohren 092221ca3f Reduce amount of text in Bug Report template 2021-07-18 20:30:57 +00:00
Jonas Zohren 5d8ad4fd72 Add some more details to the MR template 2021-07-17 12:22:11 +02:00
Jonas Zohren 7054f74783 Add issue template for GitHub which redirects to Gitlab 2021-07-17 12:21:41 +02:00
Jonas Zohren 82a4ec9cbd Add more detailed issue templates
Shamelessly stolen from
https://github.com/HedgeDoc/client

Originally written by
https://github.com/ErikMichelson and
https://github.com/DerMolly
2021-07-17 12:00:38 +02:00
Timo Kösters f924ebf8a6 Merge branch 'fix-windows-signal' into 'master'
fix signal compiling on windows

See merge request famedly/conduit!126
2021-07-15 16:29:47 +00:00
Jonathan de Jong b1993421c2 fix signal compiling on windows 2021-07-15 18:09:10 +02:00
Timo Kösters 8e2d6f7e43 Merge branch 'sled-fix' into 'master'
Sled fixes

See merge request famedly/conduit!125
2021-07-15 15:38:40 +00:00
Jonathan de Jong d76e95e8fc use existing db cache size 2021-07-15 13:47:21 +02:00
Jonathan de Jong 661101c9ae add sled cache_capacity back 2021-07-15 13:29:08 +02:00
Timo Kösters f7ecf83ac3 Merge branch 'stuff' into 'master'
fix: stuck/duplicate messages, e2ee and sync timeouts

See merge request famedly/conduit!123
2021-07-15 08:18:56 +00:00
Timo Kösters 9a4789efdc Merge branch 'ci-format-check-before-cargo-test' into 'master'
CI: Check format before running test

See merge request famedly/conduit!124
2021-07-14 20:53:10 +00:00
Jonas Zohren eaa4c77641 CI: Check format before running test
Testing needs compilation and is slow. Format checking is quick.
As format checking fails more often than tests,
switching them should result in faster failure and feedback
2021-07-14 20:33:19 +00:00
Timo Kösters 9268b33c3f Merge branch 'shutdown-sync' into 'master'
Make shutdown short-circuit sync helpers

See merge request famedly/conduit!122
2021-07-14 13:49:00 +00:00
Timo Kösters 9de32ae12f fix toolchain 2021-07-14 15:46:30 +02:00
Jonathan de Jong 952fb75795 add shutdown handler to kick sync 2021-07-14 14:50:07 +02:00
Timo Kösters e12b1ff863 improvement: locks 2021-07-14 13:21:25 +02:00
Timo Kösters e15e6d4405 improvement: efficient /sync, mutex for federation transactions 2021-07-14 13:20:39 +02:00
Timo Kösters 1c25492a7e fix: stuck messages
Conduit did not send the event in /sync because of a race condition.
There is a brief moment in time where Conduit accepted the event, but
did not store it yet. So when the client /syncs it updates the since
token without sending the event. I hope I fixed it by significantly
shortening the race-condition period.
2021-07-14 13:19:24 +02:00
Timo Kösters 8c44312485 fix: e2ee verification 2021-07-14 13:10:56 +02:00
Timo Kösters ac0027756e improvement: more efficient state res 2021-07-14 13:10:49 +02:00
Timo Kösters f3e806096b Merge branch 'clippy-fix' into 'master'
Fix clippy lint

See merge request famedly/conduit!121
2021-07-14 10:57:44 +00:00
Jonathan de Jong e1b89c1248 apply lint suggestions and version bump 2021-07-14 12:31:38 +02:00
Timo Kösters be6b6c3cf0 Merge branch 'rocket-update' into 'master'
Update rocket to rc1 and lock file

See merge request famedly/conduit!120
2021-07-14 09:48:17 +00:00
Jonathan de Jong 15471d9ac4 update rocket and lock 2021-07-14 11:28:24 +02:00
Timo Kösters 3c236fb671 Merge branch 'sqlite' into 'master'
Sqlite

See merge request famedly/conduit!114
2021-07-14 07:07:09 +00:00
Jonathan de Jong 9d4fa9a220 Sqlite 2021-07-14 07:07:08 +00:00
Timo Kösters bd4bd58612 Merge branch 'capabilities_auth' into 'master'
Getting capabilities requires authentication

See merge request famedly/conduit!117
2021-07-13 07:55:19 +00:00
Timo Kösters 0eec1cc696 Merge branch 'ci-tag-jobs-with-docker' into 'master'
Better CI (run on faster CI hosts, incremental release builds, thin-lto)

See merge request famedly/conduit!118
2021-07-12 20:35:00 +00:00
Jonas Zohren 3fa09ff57d Use thin-lto [1] for "better" release builds.
This performs a rather quick variant of Link Time Optimization [2].
It should add negligible build time but also more optimized binaries.

[1]: https://doc.rust-lang.org/cargo/reference/profiles.html#lto

[2]: https://llvm.org/docs/LinkTimeOptimization.html
2021-07-12 20:21:13 +00:00
Jonas Zohren 0080932aef Speed up release builds
Setting cargo to run incremental builds means partial build results should be cached. This is not enabled by default in release mode.

Incremental builds use 256 codegen units by default [1].
We set them to 16 (release default) again for somewhat faster code but slightly slower builds.


[1]: https://doc.rust-lang.org/cargo/reference/profiles.html#codegen-units
2021-07-12 20:18:14 +00:00
Jonas Zohren 888a2f7fa1 Make CI run on famedly runners
By default, jobs without tags only run on CI runners configured to do so [1].
Conduit can use famedly runners, which are more powerfull than gitlab's runners, but require a tag on the job to run it there.
This commit tags each job with the "docker" tag.
On the famedly/conduit repo this means faster CI.
On other gitlab.com forks the normal ci.
Selfhosted gitlab's might need to add a "docker" tag to their runner.

[1]: https://docs.gitlab.com/ee/ci/runners/configure_runners.html#use-tags-to-limit-the-number-of-jobs-using-the-runner
2021-07-12 19:58:35 +00:00
Kurt Roeckx dcb5e5900f Getting capabilities requires authentication 2021-07-11 22:07:10 +02:00
Timo Kösters 4732aa6782 Merge branch 'invalid_utf8' into 'master'
Return proper error in case of invalid UTF-8

See merge request famedly/conduit!110
2021-07-11 13:44:27 +00:00
Kurt Roeckx 699f77671f Return proper error in case of invalid UTF-8 in json_body
json_body is used in places that need authentication. In
case an unknown field is set, Ruma doesn't parse the field
and so doesn't give an error on invalid UTF-8. But Conduit
has parsed and on error makes json_body None. Return an
error to the client instead of generating an internal error.
2021-07-11 14:47:13 +02:00
Timo Kösters fcfb9b51de Merge branch 'fix-ci-failing-duplicate-nightly-release' into 'master'
Fix: Duplicate releases don't work, remove nightly

Closes #100

See merge request famedly/conduit!113
2021-07-11 11:43:48 +00:00
Jonas Zohren 36681dd3ac Fix: Duplicate releases don't work, remove nightly 2021-07-11 11:43:48 +00:00
Timo Kösters 13c0beafa6 Merge branch 'lib-fix' into 'master'
Export conduits Config struct and fix clippy warnings

See merge request famedly/conduit!99
2021-07-11 11:42:07 +00:00
Timo Kösters a313a93ff5 Merge branch 'master' into 'master'
Change default port in docker to the new

See merge request famedly/conduit!115
2021-07-11 11:41:12 +00:00
Daniel Wiesenberg 6a96cfaac1 Change default port in docker to the new
conduit default port 6167 and fix the docker healthcheck
2021-07-06 10:43:33 +02:00
Timo Kösters 787e18b2a4 Merge branch 'jfowl-master-patch-57056' into 'master'
Fix: Nightly release tag name should not be a branch name

See merge request famedly/conduit!112
2021-07-02 15:18:26 +00:00
Jonas Zohren fcc30f059e Fix: Nightly release tag name should not be a branch name
According to tulir this breaks the GitLab Matrix bot, and nightly is a better match anyway
2021-07-02 14:58:00 +00:00
Timo Kösters f1a2aa3a94 Merge branch 'jfowl-master-patch-97252' into 'master'
Publish master builds as nightly releases & also build debs

See merge request famedly/conduit!111
2021-07-02 12:26:27 +00:00
Jonas Zohren a7cb1c999a Publish master builds as nightly releases & also build debs 2021-07-02 12:26:26 +00:00
Timo Kösters 5711467ad9 Merge branch 'state-res-closure' into 'master'
Remove auth_cache using a closure to fetch events in state-res

See merge request famedly/conduit!108
2021-07-02 10:56:21 +00:00
Devin Ragotzy c30cc50a0b Switch ruma to a commit from next 2021-07-02 06:40:40 -04:00
Timo Kösters 5f6b0c673c Merge branch 'feature/proxy' into 'master'
add support for arbitrary proxies

See merge request famedly/conduit!54
2021-07-01 19:46:18 +00:00
Aiden McClelland c53cc03ff8 address pr comments 2021-07-01 13:38:25 -06:00
Timo Kösters af903ceac3 Merge branch 'ci-build-artifacts-1' into 'master'
Generate binaries for 3 architectures in the CI

See merge request famedly/conduit!94
2021-07-01 19:06:40 +00:00
Aiden McClelland f25f61d4a9 fix errors introduced by rebase 2021-07-01 12:48:12 -06:00
Aiden McClelland b2d5516058 add support for arbitrary proxies 2021-07-01 12:41:12 -06:00
Devin Ragotzy 1bb84a8e2d Fix docs for fetch_and_handle_events 2021-06-30 07:48:16 -04:00
Devin Ragotzy 98f1480e2b Remove auth_cache using a closure to fetch events in state-res 2021-06-30 12:54:19 +02:00
Timo Kösters cc9111059d Merge branch 'search-impovements' into 'master'
improvement: /search works for multiple rooms

See merge request famedly/conduit!106
2021-06-30 08:32:55 +00:00
Timo Kösters 05821d6fd5 improvement: pdu cache, /sync cache 2021-06-30 10:31:34 +02:00
Devin Ragotzy 09a8737f24 Export conduits Config struct and fix clipp warningsy 2021-06-29 16:02:12 -04:00
Timo Kösters dcac1361ec improvement: /search works for multiple rooms 2021-06-21 15:21:00 +02:00
Timo Kösters fee7d3d2e3 Merge branch 'allow_appservice_registration' into 'master'
Always allow appservices to register new users

See merge request famedly/conduit!105
2021-06-21 10:15:48 +00:00
Timo Kösters 1a70ea5702 Merge branch 'upgrade-deps' into 'master'
Upgrade Ruma

See merge request famedly/conduit!104
2021-06-21 10:14:12 +00:00
phesch 637d9d3b6f Always allow appservices to register new users 2021-06-19 16:12:05 +02:00
Jonas Platte 808741bcb6 Remove unnecessary Option-wrapping and successive unwrapping 2021-06-17 20:44:29 +02:00
Jonas Platte b291e76572 Use try operator for Option more 2021-06-17 20:37:07 +02:00
Jonas Platte f3e630c064 Fix lots of clippy lints 2021-06-17 20:34:14 +02:00
Jonas Platte af2ce5803e Remove pointless double deserialization 2021-06-17 20:29:02 +02:00
Jonas Platte 7fa54e4411 Use Ruma-provided default power levels for shorter code 2021-06-17 20:14:37 +02:00
Jonas Platte f6046871f4 Upgrade Ruma 2021-06-17 20:12:36 +02:00
Timo Kösters 2ac7b6d411 Merge branch 'event_auth' into 'master'
feat: /event_auth

Closes #43

See merge request famedly/conduit!103
2021-06-14 09:44:07 +00:00
Timo Kösters 67f9592b17 feat: /event_auth 2021-06-14 11:36:40 +02:00
Timo Kösters 07271b7725 Merge branch 'roomdirfilter' into 'master'
improvement: filter our room directory

Closes #35

See merge request famedly/conduit!102
2021-06-14 09:33:20 +00:00
Timo Kösters 77a23f8969 improvement: filter our room directory
Fixes #35
2021-06-14 11:26:41 +02:00
Timo Kösters 01e01bf25e Merge branch 'state' into 'master'
feat: /state

Closes #47

See merge request famedly/conduit!101
2021-06-14 09:23:22 +00:00
Timo Kösters 3c9ea55938 feat: /state 2021-06-14 11:01:12 +02:00
Timo Kösters cf493f2b5b Merge branch 'userdir' into 'master'
User directory improvements

See merge request famedly/conduit!100
2021-06-12 16:52:49 +00:00
Timo Kösters e8f6708927 improvement: show more users in our user directory 2021-06-12 18:40:33 +02:00
Timo Kösters 8c6bcc47bf Merge branch 'rocksdb' into 'master'
Swappable database backend

See merge request famedly/conduit!98
2021-06-12 14:25:03 +00:00
Timo Kösters cd4bc520d8 improvement: feature flags for sled, rocksdb 2021-06-12 15:13:04 +02:00
hamidreza kalbasi 2078af59d8 fix fmt problems 2021-06-09 22:22:05 +02:00
hamidreza kalbasi 2385bd1cfd add migrations 2021-06-09 22:22:05 +02:00
hamidreza kalbasi affa124864 create media folder in init 2021-06-09 22:22:05 +02:00
hamidreza kalbasi ff841b73c5 use .keys() and remove unneccery .to_vec() 2021-06-09 22:22:04 +02:00
hamidreza kalbasi 804105479c fix fmt and clippy warnings 2021-06-09 22:22:04 +02:00
hamidreza kalbasi 972caacdc2 put media in filesystem 2021-06-09 22:22:04 +02:00
Timo Kösters d0ee823254 feat: swappable database backend 2021-06-09 22:21:52 +02:00
Timo Kösters 81715bd84d Merge branch 'account' into 'master'
Fix account and media bugs

See merge request famedly/conduit!97
2021-06-08 07:22:32 +00:00
Timo Kösters b3cec1d20d Merge branch 'master' into 'master'
Fix ruma dependency

Closes #95

See merge request famedly/conduit!96
2021-06-05 06:14:55 +00:00
Damian Poddebniak bb7a4220d3 Fix ruma dependency 2021-06-04 20:18:03 +02:00
Jonas Fowl b84c66daba Generate binaries for 3 architectures in the CI
The result is stored in the gitlab package registry
2021-06-01 00:58:50 +00:00
Timo Kösters e1e529d818 fix: don't apply push rules for users of other homeservers 2021-05-30 22:01:12 +02:00
Timo Kösters 88cf043f94 fix: deactivate accounts that should be deactivated 2021-05-30 21:56:36 +02:00
Timo Kösters bff68e595b Merge branch 'account' into 'master'
fix: putting global account data works now

Closes #92

See merge request famedly/conduit!93
2021-05-29 09:14:47 +00:00
Timo Kösters 59dd3676d5 fix: putting global account data works now 2021-05-29 10:53:03 +02:00
Timo Kösters 1fa7ff2eb1 Merge branch 'claim' into 'master'
feat: implement /claim, handle to-device events

See merge request famedly/conduit!92
2021-05-28 21:36:46 +00:00
Timo Kösters deacdf6f58 fix: is_direct for locally invited users 2021-05-28 22:53:00 +02:00
Timo Kösters 5b5cc0574e feat: implement /claim, handle to-device events 2021-05-28 13:46:15 +02:00
Timo Kösters 953f2b005f Merge branch 'specify-and-document-msrv' into 'master'
Specify the minimum required Rust version in the manifest

See merge request famedly/conduit!91
2021-05-28 07:49:06 +00:00
Vadim Zeitlin f199b51f97 Move the link to cross-compiling guide to DEPLOY.md 2021-05-28 09:42:59 +02:00
Vadim Zeitlin 0f16a79888 Specify the minimum required Rust version in the manifest
Also mention it in the deployment guide.
2021-05-27 23:32:33 +02:00
Vadim Zeitlin 6af942814f Fix some typos in the README 2021-05-27 23:32:33 +02:00
Timo Kösters 0805f4ac2a Merge branch 'pdu-success' into 'master'
fix: also return successful PDUs in /send/:txnId

See merge request famedly/conduit!90
2021-05-27 21:24:43 +00:00
Gabriel Souza Franco 7db59c550f fix: also return successful PDUs in /send/:txnId 2021-05-27 18:10:48 -03:00
Timo Kösters 25b1cd2683 Merge branch 'stateres' into 'master'
fix: state resolution bugs

See merge request famedly/conduit!89
2021-05-27 09:10:53 +00:00
Timo Kösters daa1fc90a7 fix: state resolution bugs 2021-05-27 10:48:17 +02:00
Timo Kösters eeb0b59b76 Merge branch 'redaction_quotes' into 'master'
Fix redacted_because field being sent as a string

Closes #87

See merge request famedly/conduit!88
2021-05-26 15:58:00 +00:00
phesch ddcf1a715b Fix redacted_because field being sent as a string 2021-05-26 17:38:30 +02:00
Timo Kösters d1c0eaf628 Merge branch 'master' into 'master'
Fix docker-compose trusted_servers env var

See merge request famedly/conduit!87
2021-05-26 07:03:51 +00:00
Daniel Wiesenberg 8387ceacab Fix docker-compose trusted_servers env var 2021-05-25 21:34:31 +02:00
Timo Kösters 1aec80c57c Merge branch 'logs' into 'master'
fix: logs for ruma crate

See merge request famedly/conduit!86
2021-05-24 16:08:56 +00:00
Timo Kösters aacf6289db improvement: increase default max concurrent requests 2021-05-24 18:00:39 +02:00
Timo Kösters 57ecd81534 fix: logs for ruma crate 2021-05-24 13:22:30 +02:00
Timo Kösters ceaeab6816 Merge branch 'federation-errors' into 'master'
feat: forward federation errors to the client

See merge request famedly/conduit!85
2021-05-23 18:27:05 +00:00
Timo Kösters e5c7119516 feat: forward federation errors to the client 2021-05-23 16:46:46 +02:00
Timo Kösters 1939e62814 fmt 2021-05-23 11:11:20 +02:00
Timo Kösters 1ab209736a Merge branch 'forbidden' into 'master'
fix: Forbidden instead of InvalidParam when joining

See merge request famedly/conduit!84
2021-05-22 19:56:46 +00:00
Timo Kösters fd69ac621c fix: run ci with docker 2021-05-22 21:41:08 +02:00
Timo Kösters c1b2b468b8 fix: bad except in ruma wrapper 2021-05-22 21:33:31 +02:00
Timo Kösters 7e4dc65747 Merge branch 'master' into 'master'
Update Dockerfile and docker-compose

See merge request famedly/conduit!39
2021-05-22 19:26:03 +00:00
Daniel Wiesenberg 634fe04c33 Fix wrong env var name in traefik compose 2021-05-22 20:49:07 +02:00
Timo Kösters 90cd11d850 fix: Forbidden instead of InvalidParam when joining 2021-05-22 18:50:40 +02:00
Daniel Wiesenberg c6625d83e6 Add CONDUIT_TRUSTED_SERVERS config param 2021-05-22 16:53:48 +02:00
Daniel Wiesenberg 5a7ccbdfab Add CONDUIT_CONFIG to all relevant docker files
And mention that an empty string can be used to configure
Conduit purely with env vars.
2021-05-22 16:53:48 +02:00
Daniel Wiesenberg beb428d866 Update docker command in README
Mention the need for a config.
2021-05-22 16:53:48 +02:00
Daniel Wiesenberg 52a96b3d84 Update Dockerfile and docker-compose
- Dockerfile now tracks the gitlab repository and the master branch.
- docker-compose now points to conduit.toml instead of Rocket.toml and
its env vars were also renamed from ROCKET_ to CONDUIT_.
Furthermore vectorim/riot-web was changed to vectorim/element-web
2021-05-22 16:53:48 +02:00
Timo Kösters 42c9ba2e5c Merge branch 'appservice-docs' into 'master'
docs: APPSERVICES setup guide

See merge request famedly/conduit!83
2021-05-22 13:13:54 +00:00
Timo Kösters 47160e9e06 docs: APPSERVICES setup guide 2021-05-22 13:55:28 +02:00
Timo Kösters 488581cc51 Merge branch 'fix-sync' into 'master'
fix: too many syncs

See merge request famedly/conduit!82
2021-05-22 09:39:14 +00:00
Timo Kösters 9b77eb7bb7 fix: too many syncs 2021-05-22 11:31:15 +02:00
Timo Kösters acfd0aef27 Merge branch 'cargo-deb-packaging-update' into 'master'
Update cargo-deb packaging for recent changes

See merge request famedly/conduit!61
2021-05-22 09:03:43 +00:00
Timo Kösters 50348de1dd Merge branch 'improvements' into 'master'
improvement: federation get_keys and optimize signingkey storage

See merge request famedly/conduit!81
2021-05-22 08:49:18 +00:00
Timo Kösters 1b42770ab5 improvement: warning for small max_request_size values 2021-05-22 10:34:19 +02:00
Timo Kösters 3e2f742f30 fix: room version warnings and other bugs when joining rooms 2021-05-21 22:22:05 +02:00
Timo Kösters 989d843c40 fix: unauthorized pdus will be responded to with FORBIDDEN 2021-05-21 18:12:02 +02:00
Timo Kösters 09157b2096 improvement: federation get_keys and optimize signingkey storage
- get encryption keys over federation
- optimize signing key storage
- rate limit parsing of bad events
- rate limit signature fetching
- dependency bumps
2021-05-21 13:25:24 +02:00
Timo Kösters ae41bc5067 fix: run state res with old current state again
I'm a bit torn on the "auth check based on the current state of the
room". It can mean multiple things:

1. The state of the room before the homeserver looked at the event at
all. But that means if a message event from a user arrives, but we
didn't see their join event before, we soft fail the message (even
though we would find the join event when going through the auth events
of the event and doing state res)

2. The state of the room after doing state-res with the event and our
previous room state. We need to do this state resolution to find the new
room state anyway, so we could just use the new room state for the auth
check. The problem is that if the incoming event is a membership leave
event, the new room state does not allow another leave event. This is
obviously the wrong option.

3. The state of the room after doing state-res with the state **before**
the event and our previous room state. This will mean a lot more
calculations because we have to run state-res again

We used 2. before and now use 1. again
2021-05-17 10:58:44 +02:00
Timo Kösters 8f27e6123b feat: send read receipts over federation
currently they will only be sent if a PDU has to be sent as well
2021-05-17 10:25:27 +02:00
Timo Kösters 24793891e0 feat: implement GET /presence 2021-05-14 11:05:41 +02:00
Timo Kösters 767fe76d3e Merge branch 'jfowl-master-patch-93743' into 'master'
Try to improve CI build times by caching

See merge request famedly/conduit!79
2021-05-13 07:57:11 +00:00
Jonas Fowl 3ea0d2b567 Try to improve CI build times by caching 2021-05-13 07:57:11 +00:00
Timo Kösters f3e6311680 Merge branch 'clippy_ci' into 'master'
Add linting checks to CI

See merge request famedly/conduit!76
2021-05-12 18:44:41 +00:00
Timo Kösters 37b4a1cd0d Merge branch 'dbg_clippy' into 'master'
Add dbg_macro check

See merge request famedly/conduit!75
2021-05-12 18:44:01 +00:00
Timo Kösters 68c5c57486 Merge branch 'improvements' into 'master'
improvement: bug fixes and refactors

See merge request famedly/conduit!78
2021-05-12 18:29:26 +00:00
Timo Kösters f62258ba35 improvement: bug fixes and refactors
- power level content override adds to the default event instead of
replacing it
- sending code refactored to make edus possible
- remove presence events when restarting conduit
- remove room_id field from read receipts over /sync
- handle incoming read receipts
- fix array bounds bug in server_server.rs
2021-05-12 20:15:24 +02:00
Timo Kösters ad5e51dc25 Merge branch 'up-ruma' into 'master'
Upgrade Ruma

See merge request famedly/conduit!77
2021-05-08 07:46:26 +00:00
Jonas Platte af6fea3d4e Refactor some canonical JSON code 2021-05-08 02:13:01 +02:00
Jonas Platte a0457000ff Upgrade Ruma 2021-05-08 01:54:28 +02:00
Jonathan de Jong 80f1844476 fix rustup pls 2021-05-05 17:44:32 +00:00
Jonathan de Jong 9bf99e99a8 fix clippy rustup 2021-05-05 17:26:59 +00:00
Jonathan de Jong 442d0732a4 add rustup 2021-05-05 17:01:48 +00:00
Jonathan de Jong 9d2cc4d8b1 add cargo fmt check 2021-05-05 16:48:44 +00:00
Jonathan de Jong e48cd9b018 add clippy to CI 2021-05-05 16:41:22 +00:00
Jonathan de Jong 268ad3441c add dbg_macro check 2021-05-05 16:14:49 +00:00
Timo Kösters bd16850fd4 Merge branch 'trusted' into 'master'
fix: add trusted_servers to config and deploy guide

See merge request famedly/conduit!74
2021-05-05 10:42:55 +00:00
Timo Kösters 3408d74f93 fix: add trusted_servers to config and deploy guide 2021-05-05 12:27:49 +02:00
Timo Kösters 861cc76363 Merge branch 'uiaa' into 'master'
improvement: uiaa works like in synapse

See merge request famedly/conduit!73
2021-05-05 10:18:26 +00:00
Timo Kösters cf94b8e712 improvement: uiaa works like in synapse 2021-05-04 19:05:30 +02:00
Timo Kösters b42d34858e Merge branch 'up-ruma' into 'master'
Upgrade ruma and clean up request sending code

See merge request famedly/conduit!72
2021-05-02 16:59:31 +00:00
Jonas Platte e1c4e5c73e Return only event content in account_data endpoints, not the entire event 2021-04-29 21:28:01 +02:00
Jonas Platte 8bfaf09f37 Clean up reqwest::Response to http::Response conversion 2021-04-29 21:28:00 +02:00
Jonas Platte c28eba1e5b Bump ruma 2021-04-29 21:05:29 +02:00
Jonas Platte 08ca573df0 Remove explicit setting of content-type header
`try_into_http_request` takes care of this already.
2021-04-29 20:50:59 +02:00
Jonas Platte 61c522dcc0 Fix formatting 2021-04-29 20:50:59 +02:00
Jonas Platte b76af682a6 Fix clippy warnings 2021-04-29 20:50:59 +02:00
Timo Kösters 27d25914e1 Merge branch 'roomdir' into 'master'
improvement: optimize room directory

Closes #36

See merge request famedly/conduit!71
2021-04-28 15:58:54 +00:00
Timo Kösters 3c3062a316 improvement: optimize room directory 2021-04-28 17:56:15 +02:00
Timo Kösters d35ad69af1 Merge branch 'up-ruma' into 'master'
Bump ruma

See merge request famedly/conduit!70
2021-04-28 09:44:04 +00:00
Jonas Platte 2e1d7d12ca Refactor usage of CanonicalJsonValue 2021-04-26 19:03:51 +02:00
Jonas Platte c2b72773d5 Fix clippy warning 2021-04-26 19:02:32 +02:00
Jonas Platte 5be5c9e9f0 Bump ruma 2021-04-26 19:02:32 +02:00
Timo Kösters f9f37cfcf8 Merge branch 'invites' into 'master'
feat: send invites over federation

Closes #53

See merge request famedly/conduit!69
2021-04-26 16:53:53 +00:00
Timo Kösters 58463bba93 feat: send invites over federation 2021-04-25 14:10:21 +02:00
Timo Kösters abe176e3d0 Merge branch 'sending' into 'master'
fix: send transaction retry code

See merge request famedly/conduit!68
2021-04-24 21:17:18 +00:00
Timo Kösters 3dfc245633 fix: send transaction retry code 2021-04-24 18:26:41 +02:00
Timo Kösters dd0b2597b7 Merge branch 'signatures' into 'master'
feat: verify signatures for incoming requests

Closes #77

See merge request famedly/conduit!65
2021-04-24 12:55:41 +00:00
Timo Kösters 2fc1ec2ad5 fix: logging 2021-04-24 13:34:35 +02:00
Timo Kösters 226045ea4b improvement: warning on misconfigured reverse proxy 2021-04-24 12:29:02 +02:00
Jonas Platte 026af6b1a6 Improve formatting of ruma_wrapper.rs 2021-04-24 12:22:42 +02:00
Jonas Platte d8b484beed Upgrade ruma 2021-04-24 12:22:36 +02:00
Jonas Platte e72fd44bb5 Refactor send_request for appservices 2021-04-24 12:18:21 +02:00
Jonas Platte 7067d7acae Refactor Responder implementation for RumaResponse 2021-04-24 12:18:21 +02:00
Timo Kösters 23f81bfaf7 chore: update dependencies 2021-04-24 12:18:19 +02:00
Timo Kösters bb234ca002 fix: only show one typing event per user 2021-04-24 12:17:45 +02:00
Timo Kösters 6e84d317b2 improvement: update ruma 2021-04-24 12:17:44 +02:00
Timo Kösters 1f84013b2a feat: verify signatures for incoming requests 2021-04-24 12:17:44 +02:00
Timo Kösters f89e3668fd Merge branch 'deploy-proxy' into 'master'
Document proper proxy options in DEPLOY.md

See merge request famedly/conduit!67
2021-04-24 08:57:11 +00:00
Gabriel Souza Franco 7e4320a079 chore: document proper proxy options in DEPLOY.md 2021-04-23 15:27:35 -03:00
Paul van Tilburg f63a624743 Add text about using cargo-deb to the README 2021-04-23 19:11:42 +02:00
Timo Kösters 8c72909bb8 Merge branch 'tls-name' into 'master'
Validate TLS certificates according to Matrix spec

See merge request famedly/conduit!60
2021-04-23 05:22:07 +00:00
Paul van Tilburg 4fb2f17b83 Purge debconf changes from the DB on purge 2021-04-22 21:52:47 +02:00
Paul van Tilburg 19aaffeb23 Change the default port (follows DEPLOY.md) 2021-04-22 21:52:47 +02:00
Paul van Tilburg f3b1096417 Change the default library path (follows DEPLOY.md) 2021-04-22 21:52:47 +02:00
Paul van Tilburg 5bf43a4d7e Generate conduit.toml instead of debian environment file
Only generate this file once. I am not sure what to do with future
upgrades yet.
2021-04-22 21:52:40 +02:00
Timo Kösters 14c7ecf722 Merge branch 'improvements' into 'master'
Implement /devices

Closes #62

See merge request famedly/conduit!64
2021-04-21 09:03:18 +00:00
Timo Kösters 2f440e644d fix: clippy 2021-04-21 10:59:07 +02:00
Timo Kösters 71ed1b295a feat: /devices route 2021-04-21 10:51:56 +02:00
Timo Kösters e815486030 fix: don't allow inviting other users (not implemented yet) 2021-04-21 10:00:23 +02:00
Gabriel Souza Franco ed253e236c chore: document FedDest, fix tests 2021-04-21 00:35:44 -03:00
Timo Kösters 1937cf554f Merge branch 'add-ci' into 'master'
Add basic CI

See merge request famedly/conduit!41
2021-04-20 12:23:28 +00:00
Timo Kösters 9adcc20335 Merge branch 'update-readme' into 'master'
docs: update readme

See merge request famedly/conduit!63
2021-04-20 11:21:18 +00:00
Timo Kösters 4c4e1f9027 docs: update readme 2021-04-20 13:07:00 +02:00
Timo Kösters ad19264c38 Merge branch 'fix-fetch' into 'master'
fix: bug when fetching events over federation

See merge request famedly/conduit!62
2021-04-19 10:00:47 +00:00
Timo Kösters 0b9182455c fix: use working email 2021-04-19 11:57:17 +02:00
Timo Kösters d4e0ba245b fix: bug when fetching events over federation 2021-04-19 11:55:27 +02:00
Timo Kösters 0b89ffe566 Merge branch 'make-join' into 'master'
feat: make_join, send_join and /directory

See merge request famedly/conduit!59
2021-04-16 21:15:27 +00:00
Paul van Tilburg ab58609d3d No longer use/support a local environment file 2021-04-16 22:07:58 +02:00
Timo Kösters eedac4fd96 feat: make_join, send_join and /directory 2021-04-16 18:18:29 +02:00
Gabriel Souza Franco 7faa021ff5 chore: code formatting and cleanup 2021-04-16 12:18:22 -03:00
Timo Kösters 6d109b9902 Merge branch 'mdformatting' into 'master'
docs: Fix markdown formatting in DEPLOY.md

See merge request famedly/conduit!58
2021-04-16 09:24:52 +00:00
Tobias Fella 95db30918e docs: Fix fix formatting of code blocks in markdown 2021-04-16 11:10:01 +02:00
Gabriel Souza Franco e73de2317e fix: verify tls cert for non-conformant servers 2021-04-16 00:36:35 -03:00
Gabriel Souza Franco b4c001de2f chore: cleanup string-based code in find_actual_destination 2021-04-16 00:27:26 -03:00
Gabriel Souza Franco 0b56589dce feat: add handling of tls cert for delegated hosts 2021-04-15 22:07:27 -03:00
Timo Kösters 18398e1f17 Merge branch 'bump-stateres' into 'master'
Bump stateres

See merge request famedly/conduit!57
2021-04-14 15:47:00 +00:00
Timo Kösters 04b08d4505 chore: bump stateres 2021-04-14 17:46:17 +02:00
Timo Kösters f6c4da829e Merge branch 'better-joining' into 'master'
improvement: use invite state as hints to what servers to ask for joining

See merge request famedly/conduit!56
2021-04-14 13:06:14 +00:00
Timo Kösters bc98425dfe improvement: use invite state as hints to what servers to ask for joining 2021-04-14 14:46:40 +02:00
Timo Kösters d6b59cd20c Merge branch 'develop' into 'master'
State resolution overhaul

See merge request famedly/conduit!53
2021-04-14 11:36:53 +00:00
Timo Kösters 001d8dc257 fix: don't do expensive operation on local /send 2021-04-14 12:55:14 +02:00
Timo Kösters c1953efa6b chore: code cleanup 2021-04-14 10:43:31 +02:00
Timo Kösters abddfc2d2a Merge remote-tracking branch 'famedly/master' into develop 2021-04-14 10:26:28 +02:00
Timo Kösters 5951294638 feat: join cursed rooms
this removes several restrictions and tries to continue verifying a pdu
event if some auth events fail (it drops/ignores bad pdus)
2021-04-14 09:39:06 +02:00
Timo Kösters 8b40e0a85f improvement: fetch signing keys in parallel when joining a room 2021-04-13 22:54:01 +02:00
Timo Kösters 5049d0e01b improvement: check signatures on join 2021-04-13 18:17:51 +02:00
Timo Kösters b4f79b77ba feat: reject invites over federation 2021-04-13 17:41:14 +02:00
Timo Kösters 662a0cf1df improvement: better and more efficient message count calculation 2021-04-12 12:40:16 +02:00
Timo Kösters 1dc85895a7 fix: show warning for invalid user ids 2021-04-12 10:12:52 +02:00
Timo Kösters a961732f5f fix: overflow 2021-04-11 21:35:17 +02:00
Timo Kösters a8231eef25 fix: alias parsing 2021-04-11 21:29:37 +02:00
Timo Kösters 8773e5013d feat: incoming invites over federation 2021-04-11 21:04:31 +02:00
Timo Kösters b427395648 Merge branch 'add-vscode-settings' into 'master'
Add settings.json for vscode rust-analyzer

See merge request famedly/conduit!45
2021-04-11 10:56:38 +00:00
Timo Kösters b4bbbd26bf Merge branch 'MTRNord/propose-better-systemd-user' into 'master'
fix: Do not run conduit as root instead use a separate user

See merge request famedly/conduit!49
2021-04-11 10:52:52 +00:00
Marcel ac99e05714 docs: capitalize a "conduit" that was missed 2021-04-11 10:51:43 +00:00
Marcel dd69850598 docs: Fix missing _matrix in apache config 2021-04-11 10:50:38 +00:00
Timo Kösters b0ea692706 fix: malformed pushrule error when event does not trigger any actions 2021-04-11 10:50:30 +02:00
Timo Kösters 588de12d79 fix: lost forward extremity 2021-04-11 10:12:29 +02:00
Timo Kösters 044e65afcc fix: move back to sled stable 2021-04-11 10:12:05 +02:00
Timo Kösters 84f4ce73e5 fix: membership deserializing 2021-04-09 21:45:22 +02:00
Timo Kösters 51aa6448bc fix: use sled main to avoid deadlock 2021-04-07 17:58:33 +02:00
Timo Kösters f3f95a73d0 improvement: /event route 2021-04-07 15:57:23 +02:00
Timo Kösters d0cdbe2e2b Merge branch 'up-ruma' into 'develop'
Upgrade ruma

See merge request famedly/conduit!48
2021-04-07 13:55:31 +00:00
Jonas Platte dc031fff95 Remove redundant calls to .iter() and .into_iter() 2021-04-06 17:38:54 +02:00
Jonas Platte dbe8c2ce19 Remove lots of redundant string allocations 2021-04-06 17:38:54 +02:00
Jonas Platte fe744c856f Upgrade ruma
… and refactor push rule code along the way.
2021-04-06 17:38:53 +02:00
Marcel c267c0f09e fix: use full codeblocks and capitalize Conduit and Debian 2021-04-06 13:17:39 +00:00
Marcel 9b2f8730bb fix: Do not run conduit as root instead use a separate user 2021-04-06 12:26:47 +00:00
Timo Kösters c9b1f0ca83 Merge branch 'k0gen-master-patch-33282' into 'master'
No need to log out and back in fix

See merge request famedly/conduit!47
2021-04-03 13:04:55 +00:00
Mariusz Kogen 246e4735fd No need to log out and back in fix 2021-04-02 22:11:14 +00:00
Timo Kösters db7044a950 sytest test 2021-03-26 13:41:05 +01:00
Timo Kösters 8c6a49bec3 Merge branch 'update_CI_for_develop' into 'develop'
Update Complement CI container

See merge request famedly/conduit!46
2021-03-26 12:31:34 +00:00
Timo Kösters cd4dc13731 fix: use correct room versions 2021-03-26 13:30:17 +01:00
Rudi Floren 5a13f6f7e0 Remove build container and use the always present build artifact directly
Proper chmod caddy and conduit binaries
2021-03-26 04:19:54 +01:00
Timo Kösters c213769d9f improvement: refactor state res and fix a few bugs in the process 2021-03-25 23:55:40 +01:00
Timo Kösters 16eed1d8c2 chore: get rid of warnings 2021-03-24 12:44:10 +01:00
Timo Kösters e50f2864de improvement: save state for send_join pdu 2021-03-24 11:46:15 +01:00
Timo Kösters e305889b72 feat: room_account_data endpoints 2021-03-24 08:48:28 +01:00
Timo Kösters 1d00a8c41f improvement: better logging
Use CONDUIT_LOG or the log setting in the config
2021-03-23 22:06:09 +01:00
Timo Kösters 46d8f36a2c fix: media thumbnail calculation and appservice detection 2021-03-23 21:18:16 +01:00
Timo Kösters 3ea7d162db fix: various improvements and fixes 2021-03-23 12:59:27 +01:00
Timo Kösters 363c629faf fix: signature key fetching, optimize push sending 2021-03-22 14:04:41 +01:00
Timo Kösters d4c76f4654 chore: update ruma 2021-03-18 19:38:08 +01:00
Timo Kösters f775c76d8a chore: get rid of warnings 2021-03-18 18:33:43 +01:00
Timo Kösters abe9122df6 Merge branch 'more-gitignore' into 'master'
Add more gitignore

See merge request famedly/conduit!42
2021-03-18 17:09:04 +00:00
Gabriel Souza Franco 7b3fe88345 Send proper Host header in federation requests 2021-03-18 17:59:16 +01:00
Timo Kösters 5cb15551f3 improvement: use db compression 2021-03-18 13:13:08 +01:00
Timo Kösters a0fa0ee7a0 fix: join appservice room with alias 2021-03-18 12:03:44 +01:00
Timo Kösters a77fcd106e feat: implement /state_ids and fix federation stuff 2021-03-18 00:11:13 +01:00
Timo Kösters 100307c936 improvement: optimize state storage 2021-03-17 22:31:28 +01:00
Timo Kösters 44425a903a fix: multiple federation/pusher fixes 2021-03-16 18:00:46 +01:00
Timo Kösters 21f785d530 Merge branch 'correct-sendtxn' into pushers 2021-03-15 09:56:04 +01:00
Jonathan de Jong 0367028203 add settings.json 2021-03-14 11:55:28 +01:00
Jonathan de Jong d0d5bc412b Add more gitignore 2021-03-13 20:33:16 +01:00
Jonathan de Jong f79053484b Add .gitlab-ci.yml 2021-03-13 20:18:56 +01:00
Timo Kösters 6da40225bb improvement: make state res actually work 2021-03-13 16:30:12 +01:00
Timo Kösters e785ff6f56 Merge branch 'sled-no-metrics' into 'master'
fix: avoid illegal instruction crash

See merge request famedly/conduit!38
2021-03-12 17:29:47 +00:00
Timo Kösters 7bc58461cd fix: avoid illegal instruction crash
see https://github.com/spacejam/sled/issues/1232
2021-03-12 16:22:35 +01:00
Timo Kösters 6538d91567 Merge branch 'readme' into 'master'
docs: add icon and license to readme

See merge request famedly/conduit!37
2021-03-04 20:37:50 +00:00
Timo Kösters 96431069a9 docs: add icon and license to readme 2021-03-04 21:37:24 +01:00
Timo Kösters 3436e844c2 Merge branch 'valkum-master-patch-62987' into 'master'
Fix Complement CI paths

See merge request famedly/conduit!36
2021-03-04 17:51:52 +00:00
Rudi Floren 156296ac05 Fix Complement CI paths
The final container tried to COPY from the default cargo target dir, but we only checked if cached_target is present.
We copy from cached_target to target when cached_target is present now in the builder
2021-03-04 17:22:23 +00:00
Timo Kösters 643109309b Merge branch 'incoming-pdu' into 'master'
fix: don't accept incoming pdus if we know about them already

Closes #70

See merge request famedly/conduit!33
2021-03-04 14:38:07 +00:00
Timo Kösters 03440f4b15 Merge branch 'readme' into 'master'
docs: small readme changes

See merge request famedly/conduit!35
2021-03-04 14:35:12 +00:00
Timo Kösters 79c910efdf Merge branch 'clippy_again' into 'master'
Fix more clippy errors in master

See merge request famedly/conduit!34
2021-03-04 14:30:28 +00:00
Timo Kösters bb1064ce04 docs: small readme changes 2021-03-04 15:28:28 +01:00
Rudi Floren 4027cbd01d Fix various clippy errors 2021-03-04 15:27:25 +01:00
Rudi Floren 6309506a48 Allow suspicious_else_formatting
This is probably unfixable because it is caused by macros
2021-03-04 15:26:34 +01:00
Devin Ragotzy 0d55964d24 Run nightly cargo fmt 2021-03-04 08:45:23 -05:00
Devin Ragotzy d0df8b495c Merge remote-tracking branch 'upstream/master' into correct-sendtxn 2021-03-04 08:39:16 -05:00
Devin Ragotzy e239014fa3 Query for the correct server 2021-03-04 08:02:41 -05:00
Timo Kösters 1ce00f90fe fix: don't accept incoming pdus if we know about them already 2021-03-04 13:37:16 +01:00
Timo Kösters bd6507eafb Merge branch 'valkum-master-patch-25423' into 'master'
Make clippy happy (needless-return, etc.)

See merge request famedly/conduit!23
2021-03-04 12:35:12 +00:00
Rudi Floren 231c6032f4 Make clippy happy (needless-return, etc.) 2021-03-04 12:35:12 +00:00
Timo Kösters eaeba35f3c Merge branch 'valkum/complement' into 'master'
Sync paths with CI pipeline due to dockerignore

See merge request famedly/conduit!24
2021-03-04 12:32:55 +00:00
Timo Kösters 3e274d7d2c Merge branch 'valkum/conduit-update_rocket' into 'master'
update dependencies

See merge request famedly/conduit!32
2021-03-04 12:32:22 +00:00
Timo Kösters 105f893cf3 chore: bump other dependencies to make it work 2021-03-04 12:29:08 +01:00
Timo Kösters a04860b513 Merge branch 'as-fix' into 'master'
fix: apply the same appservice sending rules to events coming from federation

See merge request famedly/conduit!31
2021-03-04 11:18:00 +00:00
Timo Kösters 437cb5783a fix: apply the same appservice sending rules to events coming from federation
currently this code is duplicated from database/rooms.rs, when we
refactor server_server.rs we should deduplicate it
2021-03-04 11:34:38 +01:00
Rudi Floren f4039902d8 Bump Rocket to current HEAD 2021-03-03 22:42:10 +01:00
Timo Kösters 1a940b6e05 Merge branch 'as-fix' into 'master'
fix: don't always query aliases of appservices

See merge request famedly/conduit!29
2021-03-03 21:07:18 +00:00
Timo Kösters f2ec2be821 fix: don't always query aliases of appservices
only do so if the alias matches the regex in the registration file
2021-03-03 21:53:32 +01:00
Timo Kösters 1a198e7336 Merge branch 'jaeger' into 'master'
feat: opentelemetry/jaeger support

See merge request famedly/conduit!28
2021-03-02 14:14:26 +00:00
Timo Kösters 4155a47db1 feat: opentelemetry/jaeger support 2021-03-02 15:08:54 +01:00
Timo Kösters 066d5b92da Merge branch 'sending' into 'master'
fix: sending code got stuck sometimes

See merge request famedly/conduit!25
2021-03-02 14:04:11 +00:00
Timo Kösters f7713fdf2e fix: sending code got stuck sometimes 2021-03-02 14:58:46 +01:00
Timo Kösters 566b8ebabb Merge branch 'receipt-and-txnid' into 'master'
/receipt and transaction ids for federated requests

Closes #11

See merge request famedly/conduit!27
2021-03-02 13:49:14 +00:00
Timo Kösters 278751eb23 improvement: use transaction ids for federation requests 2021-03-02 14:36:48 +01:00
Timo Kösters dd68031b69 improvement: implement /receipt 2021-03-02 14:33:35 +01:00
Devin Ragotzy 79c9de98cd Add trusted_servers, filter servers to query keys by trusted_servers 2021-03-01 09:17:53 -05:00
Devin Ragotzy c9f4ff5cf8 Ask multiple servers for keys when not known or sending server failed 2021-03-01 08:23:28 -05:00
Devin Ragotzy f3253f2033 Move comments about Rooms trees to doc comments 2021-02-28 18:53:17 -05:00
Devin Ragotzy 0dd8a15c49 Fix leaves not being replaced by correct eventId in membership
Update ruma
2021-02-27 16:09:22 -05:00
Timo Kösters a9239a4d0b Merge branch 'larodar-master-patch-53953' into 'master'
Chore: Add Issue Template

See merge request famedly/conduit!26
2021-02-26 15:00:19 +00:00
Niklas Zender a601c29c97 Chore: Add Issue Template 2021-02-26 14:55:06 +00:00
Devin Ragotzy 0cc6448dbe Temp disable rust_2018_idioms for CI 2021-02-23 17:21:01 -05:00
Devin Ragotzy 8f283510aa Fix unused import clippy warning 2021-02-23 17:21:01 -05:00
Devin Ragotzy 48601142f8 Use auth_cache to avoid db, save state for every event when joining 2021-02-23 17:21:01 -05:00
Devin Ragotzy 74d530ae0e Address review issues, fix forward extremity calc
Keep track of all prev_events since if we know that an event is a
prev_event it is referenced and does not qualify as a forward extremity.
2021-02-23 17:21:01 -05:00
Devin Ragotzy 591769d5f3 Fiter PDU's before main incoming PDU loop 2021-02-23 17:21:01 -05:00
Devin Ragotzy 64374b4679 Use eventId when saving outliers 2021-02-23 17:21:01 -05:00
Devin Ragotzy e09be2f7ee Add incoming event to the current room state then resolve
All state snapshots that are used in the resolve call are state after
snapshots, they have the event inserted.
2021-02-23 17:21:01 -05:00
Devin Ragotzy 6661de50ab Fix and integrate outlier tree, build forks after adding event to DB 2021-02-23 17:21:01 -05:00
Devin Ragotzy 6fd3e1d1dd Append state event that pass resolution to DB, update to tokio 1.1 2021-02-23 17:21:01 -05:00
Devin Ragotzy e0453e2348 Cleanup dbg prints and error messages 2021-02-23 17:21:01 -05:00
Devin Ragotzy 68f60933e6 Resolved state is set as the current room state on incoming events 2021-02-23 17:21:01 -05:00
Devin Ragotzy 05a4c0b325 Finish forward extremity gathering, use resolved state as new snapshot 2021-02-23 17:21:01 -05:00
Timo Kösters 602edfd849 feature: push rule settings 2021-02-23 17:21:01 -05:00
Devin Ragotzy 88c60605b4 Add ability to update room leaves with multiple eventIds
Tokio seems a bit broken with Rocket...
2021-02-23 17:21:01 -05:00
Devin Ragotzy 66af1ff695 Update ruma and rocket to latest git rev and tokio to 1.0
Ruma updated the event signing validation code and there was a dep
resolving failure with serde rocket and tokio so I updated rocket latest and
tokio 1.0 to fix.
2021-02-23 17:20:52 -05:00
Valkum aa7b6b6e09 Sync paths with CI pipeline due to dockerignore#
As the docker ignore file includes the target dir, content in this dir
is no accessible to the docker daemon.
We circumvent this by providing the build artifact in a dir called
cached_dir
2021-02-22 19:07:39 +01:00
Timo Kösters 835cf80acd fix: pushers 2021-02-11 13:17:21 +01:00
Devin Ragotzy 7309b2fba9 WIP gather and update forward extremities 2021-02-09 15:25:30 -05:00
Devin Ragotzy 94da569119 Fixing the incoming events algorithm (review with time) 2021-02-09 15:25:22 -05:00
Devin Ragotzy db0aee3318 Use the auth_events for step 6, WIP forward_extremity_ids fn 2021-02-09 15:25:10 -05:00
Devin Ragotzy 4b2eb5ab82 Fix ALL clippy warnings 2021-02-09 15:25:00 -05:00
Devin Ragotzy 4cf530c55b Abstract event validation/fetching, add outlier and signing key DB trees
Fixed the miss named commented out keys in conduit-example.toml.
2021-02-09 15:24:09 -05:00
Devin Ragotzy 52392628e9 Convert uses of Box<ServerName> to a ref 2021-02-09 15:22:22 -05:00
Devin Ragotzy d108a735a4 State resolution outline for /send 2021-02-09 15:22:12 -05:00
Devin Ragotzy d0b8d0f5fd Fix signature/hash checks, fetch recursive auth events 2021-02-09 15:22:02 -05:00
Devin Ragotzy 168ae8dca0 Fill event_map with all events that will be needed for resolution 2021-02-09 15:21:51 -05:00
Devin Ragotzy 8de0d9f9ce Remove StateStore trait from state-res collect events needed 2021-02-09 15:21:41 -05:00
Devin Ragotzy cdeb1236a2 Fix clippy warnings remove unused imports 2021-02-09 15:21:14 -05:00
Devin Ragotzy 63af3d3da0 Step 5 in /send just fetches state from incoming server 2021-02-09 15:20:07 -05:00
Devin Ragotzy 4b9976aa74 Update state-res, use the new Event trait
This also bumps ruma to latest and removes js_int infavor of the ruma
re-export
2021-02-09 15:19:47 -05:00
Devin Ragotzy 4a92a29b56 State resolution outline for /send 2021-02-09 15:18:47 -05:00
Timo Kösters fb9880fee9 Merge branch 'are-we-synpase-sync' into 'master'
Sync are-we-synapse with dendrite

See merge request famedly/conduit!21
2021-02-07 21:36:05 +00:00
Timo Kösters 098ecb2ca3 Merge branch 'jwt-token-fixed' into 'master'
Add 'm.login.token' authentication

See merge request famedly/conduit!5
2021-02-07 17:11:53 +00:00
Timo Kösters d49911c5e0 Add 'm.login.token' authentication 2021-02-07 17:38:45 +01:00
Timo Kösters 3588dcd6d0 Merge branch 'deviceid-login' into 'master'
Handle optional device_id field during login

See merge request famedly/conduit!16
2021-02-07 12:28:05 +00:00
Timo Kösters 2d7012cdb1 Merge branch 'appservices' into 'master'
Appservices

Closes #29

See merge request famedly/conduit!11
2021-02-07 12:24:28 +00:00
Timo Kösters ea1e4625d1 fix: default config options 2021-02-07 13:20:00 +01:00
Timo Kösters 6924dfc8ea improvement: better appservice compatibility and optimizations 2021-02-06 15:28:30 +01:00
Timo Kösters 7be2a83195 Merge branch 'valkum/complement' into 'master'
Complement Testing: Fix binary name typo

See merge request famedly/conduit!20
2021-02-05 08:52:25 +00:00
Valkum 1d7207b39e Sync are-we-synapse with dendrite 2021-02-05 02:06:14 +01:00
Valkum a61b1cef5b Fix binary name typo 2021-02-04 23:51:20 +01:00
Timo Kösters a478ec0443 Merge branch 'cleanup' into 'master'
Update repository link in crate metadata

See merge request famedly/conduit!19
2021-02-03 18:30:11 +00:00
Timo Kösters fd3fb3a7ed Merge remote-tracking branch 'famedly/master' into appservices 2021-02-03 12:54:37 +01:00
Jonas Platte 6de5b3c2a0 Update repository link in crate metadata 2021-02-02 18:14:00 +01:00
Devin Ragotzy e4dc7ea8ac Prevent admin room from recursively spamming itself and user -> user 2021-01-30 11:52:48 -05:00
Devin Ragotzy 73124629b7 Add general rules matching for pusher, calc unread msgs 2021-01-29 21:48:35 -05:00
Devin Ragotzy 2d69e81699 WIP: send out push notification, impl pusher routes
It seems in order to test this I may also have to impl the email 3pid
route? I need to call the set_pusher route somehow.
2021-01-29 21:48:09 -05:00
Devin Ragotzy a0ecd76e21 Run cargo fmt using nightly 2021-01-29 21:48:09 -05:00
Devin Ragotzy 56b816a2be Fix and integrate outlier tree, build forks after adding event to DB 2021-01-29 21:45:33 -05:00
Devin Ragotzy cd0c5c0566 Append state event that pass resolution to DB, update to tokio 1.1 2021-01-29 11:20:33 -05:00
Devin Ragotzy b8b40ce38b Cleanup dbg prints and error messages 2021-01-28 15:50:45 -05:00
Devin Ragotzy 894b6ef037 Resolved state is set as the current room state on incoming events 2021-01-28 15:33:41 -05:00
Timo Kösters 265fab843a feature: push rule settings 2021-01-28 20:47:19 +01:00
Devin Ragotzy 35c1904b37 Finish forward extremity gathering, use resolved state as new snapshot 2021-01-24 20:18:40 -05:00
Timo Kösters a119d858f3 feature: push rule settings 2021-01-24 16:07:49 +01:00
Timo Kösters 87a0019f3a Merge branch 'valkum/complement' into 'master'
Allow the complement test image to use build artifacts

See merge request famedly/conduit!17
2021-01-23 07:43:05 +00:00
Valkum a1e296374f Allow the complement test image to use build artifacts 2021-01-22 20:11:19 +01:00
Devin Ragotzy a897608025 Roll back tokio and rocket update since ruma's request is at 0.2 tokio 2021-01-18 19:59:08 -05:00
Devin Ragotzy 3a6f264450 Add ability to update room leaves with multiple eventIds
Tokio seems a bit broken with Rocket...
2021-01-18 19:41:38 -05:00
Devin Ragotzy 00436a32b0 Update ruma and rocket to latest git rev and tokio to 1.0
Ruma updated the event signing validation code and there was a dep
resolving failure with serde rocket and tokio so I updated rocket latest and
tokio 1.0 to fix.
2021-01-18 19:36:44 -05:00
Devin Ragotzy c65bde41e0 WIP gather and update forward extremities 2021-01-18 19:08:59 -05:00
Devon Hudson 762255fa8d Simplify device creation logic during login 2021-01-17 08:39:47 -07:00
Devon Hudson 890187e004 improvement: Handle optional device_id field during login
remove debug logging
2021-01-16 22:19:48 -07:00
Timo Kösters 9424ba0559 Merge branch 'logout-devices' into 'master'
Respect logout_devices param on password change

See merge request famedly/conduit!15
2021-01-16 22:35:08 +00:00
Devon Hudson ebb38cd330 improvement: respect logout_devices param on password change
Move logout devices comment next to relevant loop

remove unnecessary log
2021-01-16 15:14:50 -07:00
Devin Ragotzy b1ae2bbeb2 Fixing the incoming events algorithm (review with time) 2021-01-16 16:37:20 -05:00
Devin Ragotzy 96dc6be14b Use the auth_events for step 6, WIP forward_extremity_ids fn 2021-01-15 15:46:47 -05:00
Devin Ragotzy 5a8041969d Fix ALL clippy warnings 2021-01-15 11:05:57 -05:00
Devin Ragotzy 851eb555b6 Abstract event validation/fetching, add outlier and signing key DB trees
Fixed the miss named commented out keys in conduit-example.toml.
2021-01-14 21:32:22 -05:00
Devin Ragotzy 2ac3ffbb24 Convert uses of Box<ServerName> to a ref 2021-01-14 15:11:55 -05:00
Devin Ragotzy 7c4e116caa State resolution outline for /send 2021-01-14 15:07:40 -05:00
Devin Ragotzy 27c4e9d9d5 Fix signature/hash checks, fetch recursive auth events 2021-01-14 14:36:24 +01:00
Devin Ragotzy 88f3ee489b Fill event_map with all events that will be needed for resolution 2021-01-14 14:31:47 +01:00
Devin Ragotzy 8a035880f0 Remove StateStore trait from state-res collect events needed 2021-01-14 14:30:24 +01:00
Devin Ragotzy 7c4d74bf9b Fix clippy warnings remove unused imports 2021-01-14 14:30:24 +01:00
Devin Ragotzy 0ee239c9d7 Step 5 in /send just fetches state from incoming server 2021-01-14 14:30:23 +01:00
Devin Ragotzy 9e83d2b2d5 Update state-res, use the new Event trait
This also bumps ruma to latest and removes js_int infavor of the ruma
re-export
2021-01-14 14:30:19 +01:00
Devin Ragotzy 690c066064 State resolution outline for /send 2021-01-14 14:28:32 +01:00
Paul van Tilburg c263e13000 fix: update binary file name in docs for consistency 2021-01-11 20:28:47 +01:00
Timo Kösters ad7b3f184b improvement: send 200 response for turn server info
We didn't implement it, but this will stop clients from retrying the
endpoint every minute
2021-01-11 17:26:47 +01:00
Timo Kösters d45d033bf1 fix: send presence updates when going offline
remaining bug: conduit sends presence updates every 5 minutes even if
the user is already offline
2021-01-10 17:12:34 +01:00
Timo Kösters b4818716b8 improvement: better deploy guide 2021-01-01 22:21:05 +01:00
Timo Kösters d7e56dbfa0 docs: recommend using binaries 2021-01-01 11:27:01 +01:00
Timo Kösters 3bdaf6e79e improvement: better default config 2021-01-01 11:24:09 +01:00
Timo Kösters 85364a9c27 improvement: change federation_enabled to federation_disabled
This enables federation by default
2021-01-01 10:52:43 +01:00
Timo Kösters edfd3c1f34 improvement: better config, better logs 2020-12-31 21:07:55 +01:00
Timo Kösters df16b2ba98 fix: rare state races 2020-12-31 14:52:08 +01:00
Timo Kösters 2cf6fd57b7 improvement: don't send pdus to appservices if it isn't interested
TODO: we need to send pdus if a user of the appservice is in the room
but not the appservice user itself
2020-12-23 19:41:54 +01:00
Timo Kösters fb9bd34696 improvement: better warnings when server is unreachable 2020-12-23 15:53:41 +01:00
Timo Kösters c1bc70aeca Merge branch 'kuboschek/conduit-always-query-srv' into appservices 2020-12-22 20:35:43 +01:00
Leonhard Kuboschek 8dcc1dfe56 improvement: always use port from SRV lookups
Also query SRV records when well-known is not found, fixes #29
2020-12-22 20:34:07 +01:00
Timo Kösters f12fbca3c5 fix: send state in /sync, element displays wrong membership changes 2020-12-22 20:22:17 +01:00
Timo Kösters 6606e41dde feat: improved state store 2020-12-20 13:34:11 +01:00
Timo Kösters 6e5b35ea92 feat: implement appservices
this also reverts some stateres changes
2020-12-08 12:59:20 +01:00
Timo Kösters d62f17a91a improvement: cache actual destination 2020-12-06 11:05:51 +01:00
Timo Kösters 9d4c7c34a0 Merge branch 'cargo-deb-packaging' into 'master'
Add Debian packaging via cargo-deb

See merge request famedly/conduit!3
2020-12-06 07:31:09 +00:00
Timo Kösters 45086b54b3 improvement: upgrade dependencies, fix timeline reload bug 2020-12-05 21:04:34 +01:00
Devin Ragotzy 164b1633d8 Update ruma to latest, renamed server keys and removed PduStub 2020-12-05 17:44:54 +01:00
Devin Ragotzy b869aab5d0 Cleanup removing debug printing and logging, append non state events 2020-12-05 17:37:13 +01:00
Devin Ragotzy c173ce43a5 convert_to_outgoing_federation_event takes CanonicalJsonObj 2020-12-05 17:37:12 +01:00
Devin Ragotzy 27e686f9ff Convert uses of serde_json::Value to CanonicalJsonObject 2020-12-05 17:37:12 +01:00
Devin Ragotzy b6d721374f Have Media db return optional content_type, conversion fixes 2020-12-05 17:37:11 +01:00
Devin Ragotzy bb24f6ad90 Address some review issues fmt, errors, comments 2020-12-05 17:37:11 +01:00
Devin Ragotzy 86bb93f8cf Remove outdated TODOs, use StateEvent::from_id_value consistently 2020-12-05 17:37:10 +01:00
Devin Ragotzy 234b226468 Fix review issues, Remove EventHash's in prev/auth_events in StateEvent
The latest state-res crate uses ruma's PduRoomV3 PDU's which don't have
tuples of (EventId, EventHashs) like previous versions did (this was
left from rebasing onto master). The Media DB
now takes an optional content_type like the updated ruma structs.
2020-12-05 17:37:10 +01:00
Devin Ragotzy acd144e934 Fix get_closest_parent and cleanup federation/send/:txn 2020-12-05 17:37:10 +01:00
Devin Ragotzy b13049a6fa Fix federated join miss hashing the join event created 2020-12-05 17:37:09 +01:00
Devin Ragotzy eca0bbb35a Fix federated join miss hashing the join event created 2020-12-05 17:37:09 +01:00
Devin Ragotzy dcd1163806 All outgoing pdus in Sending must be PduStubs 2020-12-05 17:37:08 +01:00
Devin Ragotzy c9a6ce54cb Add basic handling of EDUs for /send/txn 2020-12-05 17:37:08 +01:00
Devin Ragotzy 0d69ebdc6c Reformat imports and fix clippy warnings 2020-12-05 17:37:07 +01:00
Devin Ragotzy db8a0c5d69 Add closest_parent method to Rooms Db insert in order /send pdus 2020-12-05 17:37:07 +01:00
Devin Ragotzy 96dd3b2880 Update ruma to latest, fix unstable origin feature in ruma 2020-12-05 17:37:07 +01:00
Timo Kösters 49f6ab503a Merge branch 'better-logs' into 'master'
feat: send logs into admin room

See merge request famedly/conduit!6
2020-12-05 16:36:05 +00:00
Timo Kösters 6e36081573 improvement: more logging 2020-12-05 17:35:00 +01:00
Timo Kösters 9439f2c183 feat: send logs into admin room
Log entries will automatically be deduplicated, so a message won't be
sent if the same line has already been sent in the last 30 mins
2020-12-05 17:34:58 +01:00
Timo Kösters ecea0d4af2 Merge branch 'fix-admin-room' into 'master'
fix: logging thread crash when admin room does not exist

See merge request famedly/conduit!9
2020-12-05 16:31:18 +00:00
Timo Kösters e691e880e0 fix: logging thread crash when admin room does not exist 2020-12-02 16:08:59 +01:00
Paul van Tilburg 1a341543ba Lock down the Conduit process in the systemd unit
This will secure the service more and allow only what is necessary.
2020-11-24 14:42:20 +01:00
Paul van Tilburg 1b4a79d47c Add and install README.Debian
This file documents how the packaging is organized and how to
configure and use it.  It also details what the default deployment
is like.
2020-11-24 14:42:20 +01:00
Paul van Tilburg f72554de10 Split config into a Debian and local part
* The Debian part will be generated and managed by Debconf and configure
  homeserver name, address and port
* The local part will just be a config file that shows the other
  configuration options

Added the address configuration and moved the config generation
from the config to the postinst script.
2020-11-24 14:42:18 +01:00
Paul van Tilburg 79692db45d First version of cargo-deb packaging setup 2020-11-24 14:38:15 +01:00
Timo Kösters 7078443460 Merge branch 'fix_complement' into 'master'
Fix complement

See merge request famedly/conduit!7
2020-11-18 20:17:50 +00:00
Timo Kösters 998f9e2109 Merge branch 'sending' into 'master'
Sending improvements

See merge request famedly/conduit!2
2020-11-09 19:28:56 +00:00
Rudi Floren fc08b13db1 Change CA to PKI per naming in Complement 2020-11-09 17:32:04 +01:00
Rudi Floren e4c5ed96a9 Sync with newest complement changes 2020-11-09 17:21:35 +01:00
Timo Kösters 9f8cffcd22 Admin room improvements 2020-11-09 12:21:57 +01:00
Timo Kösters 16b22bb432 fix: don't allow more than 50 PDUs in a transaction 2020-11-03 21:53:57 +01:00
Rudi Floren 335a33c901 Fix and Improve Complement testing Dockerfile 2020-10-30 02:57:22 +01:00
Timo Kösters 0762196963 fix: don't send new events from left rooms 2020-10-27 20:26:28 +01:00
Timo Kösters 2f5df4aac9 improvement: more reliable federation sending 2020-10-27 20:26:27 +01:00
Timo Kösters 18f33b1ece Merge pull request 'Frequent flushing, configurable cache capacity, welcome message' (#237) from small-improvements into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/237
2020-10-23 14:41:54 +02:00
Timo Kösters df82314440 improvement: welcome message 2020-10-23 14:38:12 +02:00
Timo Kösters 6b3934e31d feat: configurable cache capacity 2020-10-23 14:38:12 +02:00
Timo Kösters 6dbe195695 improvement: flush after every request that manipulates the db 2020-10-23 14:38:07 +02:00
Timo Kösters b2a1505535 Merge pull request 'improvement: correct thumbnailing algorithm' (#233) from fix-thumbnailing into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/233
2020-10-19 17:46:22 +02:00
Timo Kösters 6bb8284fc0 improvement: correct thumbnailing algorithm 2020-10-19 17:21:28 +02:00
Timo Kösters de8bba4b49 Merge pull request 'Fix order of docker command arguments' (#232) from Weasy666/conduit:master into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/232
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-10-19 07:05:18 +02:00
Daniel Wiesenberg 2d6b7750fd Fix order of docker command arguments and change repository link to...
...github.com repo, to relieve some pressure from git.koesters.xyz.
2020-10-18 23:06:08 +02:00
Timo Kösters cde4178f4a Merge pull request 'fix: use device_id when registering' (#231) from fix-deviceid into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/231
2020-10-18 21:54:37 +02:00
Timo Kösters f0a21b6165 fix: use device_id when registering
TIL body.device_id != (*body).device_id, which is pretty bad, so I
renamed body.device_id to body.sender_device
2020-10-18 21:51:28 +02:00
Timo Kösters 9936027e8f Merge pull request 'Change license to Apache-2.0' (#195) from license into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/195
2020-10-18 19:37:18 +02:00
Timo Kösters fccd3fdb88 Merge pull request 'Allow unjoined users to read state of world readable rooms' (#230) from allow-reading-state into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/230
2020-10-18 16:45:17 +02:00
Timo Kösters f6f15d9396 Use conduit.rs server in the README shield 2020-10-18 16:44:18 +02:00
Timo Kösters 243126d393 Allow reading state if history_visibility is world readable
See https://matrix.org/docs/spec/client_server/r0.6.1#id87
2020-10-18 16:44:18 +02:00
Timo a2dbc6fe6d Change license to Apache-2.0 2020-10-18 13:47:52 +02:00
Timo Kösters 9f487dd93a Merge pull request 'Update README.md' (#229) from update-readme into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/229
2020-10-18 13:35:01 +02:00
Timo Kösters ce94ad05a7 Update README.md 2020-10-18 13:23:06 +02:00
Timo Kösters fbbf9f8999 Merge pull request 'docs: cross compile' (#226) from cross-compile into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/226
2020-10-18 13:03:18 +02:00
Timo Kösters 935546b25b Merge pull request 'fix: random timeline reloads' (#227) from fix-random-timeline-reloads into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/227
2020-10-18 09:56:28 +02:00
Timo Kösters 151ef07fb3 docs: cross compile 2020-10-18 09:04:11 +02:00
Timo Kösters 12b0efac8b fix: random timeline reloads 2020-10-18 09:03:40 +02:00
Timo Kösters f56b463278 Merge pull request 'fix: double join over federation' (#225) from join into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/225
2020-10-17 11:29:03 +02:00
Timo Kösters 9109cb492f fix: double join over federation 2020-10-17 11:24:57 +02:00
Timo Kösters a89f7eaf9f Merge pull request 'Add complement support for CI' (#209) from valkum/complement into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/209
2020-10-16 14:34:08 +02:00
Timo Kösters f7c2d23599 Merge branch 'master' into valkum/complement 2020-10-16 14:27:09 +02:00
Timo Kösters 294fae5cdb Merge pull request 'Update dependencies, remove dbgs' (#222) from deps into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/222
2020-10-16 14:12:08 +02:00
Timo Kösters dfcfab5b7e Merge branch 'master' into deps 2020-10-16 14:06:14 +02:00
Timo Kösters 9d1387954f Update dependencies, remove dbgs 2020-10-16 14:04:29 +02:00
Timo Kösters 15fa7fb1cc Merge pull request 'Reduce media ID length from 256 to 32' (#216) from miruka/conduit:reduce-mxc-length into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/216
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-10-16 13:24:52 +02:00
Timo Kösters b6ed018d16 Merge branch 'master' into reduce-mxc-length 2020-10-14 11:48:25 +02:00
Timo Kösters 0e817f6951 Merge pull request 'Federation, Admin room and many fixes' (#221) from federation into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/221
2020-10-13 19:04:42 +02:00
Timo Kösters 304c53c4f5 style: make clippy happier 2020-10-07 12:29:19 +02:00
Timo Kösters 4964e21342 Merge remote-tracking branch 'origin/master' into federation 2020-10-07 12:02:36 +02:00
Timo Kösters 6afc4c9b3e feat: federation disabled by default
It can be enable in the Rocket.toml config or using ROCKET_FEDERATION_ENABLED=true
2020-10-07 11:51:56 +02:00
Timo Kösters c15ae3c126 fix: invalid typing bytes because of 0xff in numbers 2020-10-07 11:51:56 +02:00
Timo Kösters bcd1fe1856 feat: admin room 2020-10-07 11:51:49 +02:00
Timo Kösters 0d6159c2da improvement: get_missing_events route and cleanup 2020-10-01 20:49:15 +02:00
Timo Kösters ab332363ce fix: don't send new requests to servers if we are already waiting 2020-10-01 20:49:14 +02:00
miruka 26e200e290 Reduce media ID length from 256 to 32
Most common filesystems limit paths to 255 bytes.
This change brings down the media ID length to be similar to
Synapse servers (25), and makes it possible for clients to
download media with the ID included in the filename.
2020-09-25 14:18:36 -04:00
Timo Kösters e08dfd982b improvement: look at SRV record when sending requests 2020-09-23 12:04:02 +02:00
Timo Kösters f0beffb0a9 Merge pull request 'Fix ruma dependency' (#211) from fix into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/211
2020-09-20 18:18:45 +02:00
Timo Kösters 19207845bc Fix ruma dependency 2020-09-20 13:49:13 +02:00
Timo Kösters 267c721616 fix: encryption and sync spam 2020-09-18 10:29:44 +02:00
Timo Kösters 8bcfff2766 fix: no notification counts for fast /syncs 2020-09-18 10:29:43 +02:00
Timo Kösters ea3aaa6b5c improvement: more efficient /sync with gaps 2020-09-18 10:29:43 +02:00
Rudi Floren 009e36b680 Fix Caddy integration for reverse-proxy 2020-09-17 21:11:18 +02:00
Rudi Floren 7c456a0390 Update dockerignore
Removing Rocket-example.toml from here is fine,
as it is not included in the last stage of our build stages
2020-09-17 20:14:07 +02:00
Valkum da28c12eeb Try to add TLS reverse proxy for complement 2020-09-17 15:36:36 +02:00
Valkum 8d66428beb Add intermediate container to hide ARGs
ARGs contain secrets to speed up builds
2020-09-17 12:50:37 +02:00
Timo Kösters 506c2a3146 fix: can't find count from event in db 2020-09-17 10:24:18 +02:00
Valkum 3e03787551 Add Complement dockerfile and move sytest dir 2020-09-16 19:53:27 +02:00
Timo Kösters 4db6d7e430 fix: remove avatar url checks
They are not in the spec and maubot relies on that
2020-09-16 18:10:55 +02:00
Timo Kösters a567cd81d5 improvement: better logs on deserialization errors 2020-09-16 15:08:51 +02:00
Timo Kösters f4078a29eb fix: synapse complains about missing origin 2020-09-16 11:42:33 +02:00
Timo Kösters dd749b8aee fix: server keys and destination resolution when server name contains port 2020-09-16 11:01:04 +02:00
Timo Kösters 005e00e9b1 fix: remove well-known 2020-09-15 17:16:55 +02:00
Timo Kösters 1bf614b0f5 fix: remove transaction_id from pdus over federation 2020-09-15 17:02:20 +02:00
Timo Kösters b7ab57897b fix: sending slowness 2020-09-15 16:14:59 +02:00
Timo Kösters 0b263208e3 fix: don't panic on bad server names 2020-09-15 08:55:02 +02:00
Timo Kösters 71500b14b9 fix: send to all servers and fix media store 2020-09-15 08:17:15 +02:00
Timo Kösters f7816b11de feat: send messages over federation 2020-09-15 08:17:06 +02:00
Timo Kösters 9f05ef926a fix: filter public room dir 2020-09-14 16:23:15 +02:00
Timo d1099e9224 Update dependencies 2020-09-14 14:36:49 +02:00
Timo Kösters aa5e9e607e feat: download media and thumbnails over federation 2020-09-14 14:20:38 +02:00
Timo Kösters 4e44fedbcd fix: room list over federation 2020-09-14 11:43:42 +02:00
Timo Kösters c5313b3e8f improvement: try out multiple servers when joining remote rooms 2020-09-14 11:00:31 +02:00
Timo Kösters 1f292c09f2 improvement: better federation joins 2020-09-14 09:29:46 +02:00
Timo Kösters af53485d70 fix: avoid pdus without event ids 2020-09-12 23:38:52 +02:00
Timo Kösters 1f28434988 feat: hacky transactions 2020-09-12 22:42:05 +02:00
Timo Kösters e6b1f54857 Merge remote-tracking branch 'origin/master' into federation 2020-09-12 22:23:54 +02:00
Timo Kösters 12a8c9badd fix: join rooms over federation 2020-09-12 21:30:07 +02:00
Timo Kösters 1e8fbd8d50 Update ruma version 2020-09-08 17:32:03 +02:00
Timo Kösters b5488f86b5 Merge pull request 'Add room upgrade.' (#182) from q-b/conduit-fork:rooms_upgrade into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/182
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-09-01 13:10:30 +02:00
Timo Kösters 698e44a732 Fix /upgrade account data problems 2020-09-01 13:08:49 +02:00
Timo Kösters 515465f900 fix: make element not show "unknown user" warning
The 404 error for /profile in the spec says "There is no profile
information for this user or this user does not exist.", but Element
assumes every 404 is a user that does not exist.
2020-08-31 13:23:39 +02:00
Faelar df55e8ed0b Add room upgrade. 2020-08-31 12:01:41 +02:00
Timo Kösters aef0c8563c Merge pull request 'improvement: add remaining key backup endpoints' (#201) from keybackup into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/201
2020-08-31 11:24:11 +02:00
Devin Ragotzy 2a63d0955a Sort and authenticate the events from /send_join response 2020-08-30 16:08:47 -04:00
Devin Ragotzy 3b40f3d60e Update state-res crate 2020-08-27 20:11:53 -04:00
Devin Ragotzy f46c2d1eec Fix review issues, move state-res to spec-comp branch 2020-08-27 20:11:53 -04:00
Timo Kösters 3f4cb753ee improvement: add remaining key backup endpoints 2020-08-27 14:52:20 +02:00
Timo Kösters d15b8d7c4e Merge pull request 'feat: handle txn ids' (#198) from txnids into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/198
2020-08-25 21:35:24 +02:00
Timo 4954df3cc3 feat: handle txn ids 2020-08-25 21:33:44 +02:00
Devin Ragotzy d9a29e3e5c Fix state for empty key route
Replace None with Some("") for state_key
2020-08-25 15:30:25 -04:00
Timo Kösters 6343eea417 Merge pull request 'Docker add healthcheck and mention Docker Hub image' (#196) from Weasy666/conduit:master into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/196
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-08-25 09:40:08 +02:00
Daniel Wiesenberg 38ac3e42be Docker add healthcheck and mention Docker Hub image 2020-08-25 09:02:45 +02:00
Timo Kösters 0f524955b2 Merge pull request 'fix: send notification count updates when private read receipts change' (#194) from fixrr into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/194
2020-08-24 13:39:39 +02:00
Timo 0c1cc8d82b Fix CI 2020-08-24 11:31:19 +02:00
Timo 33215d6099 fix: send notification count updates when private read receipts change 2020-08-24 10:46:20 +02:00
Timo Kösters 9aa5e99a0f Merge pull request 'fix: put reason of redaction in the redacted event' (#193) from redact into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/193
2020-08-24 10:43:05 +02:00
Timo Kösters f0cb17d7a5 Merge branch 'master' into redact 2020-08-24 10:42:00 +02:00
Devin Ragotzy 27ffe77823 Use helper instead of route for get_public_rooms_filtered 2020-08-23 16:45:01 -04:00
Devin Ragotzy 1848f08292 Use full sorting algorithm on incoming PDU's in membership 2020-08-23 16:43:48 -04:00
Timo 3c26166fb5 improvement: device list works better
The only situation that isn't working yet is sending `left` events for
users when the sender leaves the room
2020-08-23 16:43:48 -04:00
Timo 972babbc79 fix: set limited to true when skipping messages in /sync 2020-08-23 16:43:21 -04:00
Devin Ragotzy 672bf4f473 Cargo lock update and a few doc additions 2020-08-23 16:43:21 -04:00
Devin Ragotzy fe795d38ea Replace route calling routes with helpers
This fixes the panic from ruma "index out of bounds"
2020-08-23 16:43:21 -04:00
Devin Ragotzy 5ccdd3694b Add helper function for get_alias route 2020-08-23 16:43:21 -04:00
Devin Ragotzy ea20032404 Helper for join_room_by_id route so routes aren't calling routes 2020-08-23 16:43:21 -04:00
Devin Ragotzy 64fb0374b6 Use Vec<u8> instead of string for digest bytes and add roomid_statehash 2020-08-23 16:43:21 -04:00
Devin Ragotzy d73c6aa8ad Add roomid_statehash tree, clean up review issues 2020-08-23 16:43:21 -04:00
Devin Ragotzy 846a0098c1 Split append_pdu -> append_pdu and build_and_append
Move all state event appending to append_state_pdu.
2020-08-23 16:43:21 -04:00
Devin Ragotzy cb68bf9e0c Use ring crate to generate StatHashes when saving stateid/statehash 2020-08-23 16:43:21 -04:00
Devin Ragotzy c4f5a0a631 Keep track of State at event for state resolution
feat: first steps towards joining rooms over federation
Add state-res as a dependency of conduit
Add reverse_topological_power_sort before append_pdu
Implement statehashstatid_pduid tree for keeping track of state
Clean up implementation of state_hash as key for tracking state
2020-08-23 16:43:21 -04:00
Timo 38663228f5 fix: put reason of redaction in the redacted event 2020-08-23 16:47:27 +02:00
Timo Kösters 8e55623bde Merge pull request 'More Federation' (#181) from docs into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/181
2020-08-23 16:15:01 +02:00
Timo 7ba9263cc6 improvement: show most recent PDUs first when searching 2020-08-23 16:14:11 +02:00
Timo 366554630a fix: account registration 2020-08-23 16:14:11 +02:00
Timo 804d097a18 fix: wake up /sync for typing events 2020-08-23 16:14:10 +02:00
Timo c092f06068 docs: /sync 2020-08-23 16:14:10 +02:00
Timo df936e8e7e improvement: guests are more spec-conform 2020-08-23 16:14:10 +02:00
Timo 64789537f5 fix: device list when leaving rooms 2020-08-23 16:14:09 +02:00
Timo 4323cf5fec improvement: device list works better
The only situation that isn't working yet is sending `left` events for
users when the sender leaves the room
2020-08-23 16:14:09 +02:00
Timo f23fb32e95 fix: set limited to true when skipping messages in /sync 2020-08-23 16:14:09 +02:00
timokoesters e457e19088 feat: search pdus 2020-08-23 16:14:08 +02:00
Timo 27d35f5ab4 docs: fix /register method 2020-08-23 16:14:08 +02:00
Timo 69a7cb5142 fix dependency version 2020-08-23 16:14:07 +02:00
Timo 3ff17f69ad fmt 2020-08-23 16:14:07 +02:00
Timo 4be68eba76 feat: allow querying conduit's room list over federation 2020-08-23 16:14:07 +02:00
Timo 940f533d61 refactor: avoid some allocations when redacting 2020-08-23 16:14:06 +02:00
Timo 04eee089e0 feat: first steps towards joining rooms over federation 2020-08-23 16:14:06 +02:00
timokoesters f40f1d9f75 docs: endpoint documentation 2020-08-23 16:14:06 +02:00
Timo Kösters cfda76860b Merge pull request 'Make default server name more obvious' (#192) from spaetz/conduit:master into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/192
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-08-18 20:51:15 +02:00
Sebastian Spaeth 6b7e92ccf5 Make default server name more obvious
Too many people fell into the trap and left conduit.rs in the deployment
configuration, wondering why users are all listed as @conduit.rs.

Make the default server name really easy to identify and make it obvious
that this needs to be changed.
2020-08-18 19:18:10 +02:00
Timo Kösters 6191c3bd00 Merge pull request 'Fix license.' (#190) from q-b/conduit-fork:license into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/190
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-08-17 14:13:19 +02:00
Faelar 0fef955b28 Fix license. 2020-08-17 13:59:35 +02:00
Timo Kösters 2d96323d5f Merge pull request 'Update ruma' (#184) from jplatte/conduit:up-ruma into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/184
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-08-13 09:04:22 +02:00
Jonas Platte 75ea0b3163 Update ruma 2020-08-12 23:42:17 +02:00
Timo Kösters 4b3d6e736f Merge pull request 'Alpine based Docker image' (#152) from Weasy666/conduit:master into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/152
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-08-12 21:42:58 +02:00
Timo 2fc99c05e1 docs: add documentation to the repo and improve layout 2020-08-12 21:17:53 +02:00
Daniel Wiesenberg 87ed132ae4 Add README in docker folder and mention docker in Conduit's README 2020-08-11 15:38:24 +02:00
Daniel Wiesenberg 7288010e55 Move additional files into dedicated folder and make build the def...
...fault in the compose files.
2020-08-11 15:38:24 +02:00
Daniel Wiesenberg 31c725660f Add build option to compose file 2020-08-11 15:38:24 +02:00
Daniel Wiesenberg 7456caeefd Add Element-Web to compose and provide extra compose files for using..
..Conduit behind Traefik Reverse Proxy
2020-08-11 15:38:24 +02:00
Daniel Wiesenberg 5f3cb3f926 Minor modifications to compose file and update Dockerfile comments 2020-08-11 15:38:24 +02:00
Daniel Wiesenberg 0338053774 Add ability to switch between local and remote build with build arg a...
...nd add env vars to docker-compose
2020-08-11 15:38:24 +02:00
Daniel Wiesenberg ecb6416244 Image now builds and runs 🎉 Thx to the help of yzhr 2020-08-11 15:38:24 +02:00
Daniel Wiesenberg a21858758c Change labels from label-schema to opencontainer.image 2020-08-11 15:38:24 +02:00
Daniel Wiesenberg 624ff08a07 Initial docker files trinity
The image builds as is, but running it exits with: standard_init_linux.go:211: exec user process caused "no such file or directory"
2020-08-11 15:38:23 +02:00
Timo Kösters 0f1e3d8214 Merge pull request 'Make State struct constructable by lib user' (#178) from DevinR528/conduit:library-mode into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/178
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-08-04 08:03:41 +02:00
Devin Ragotzy da1c53aaef Make State struct constructable by lib user 2020-08-03 20:56:14 -04:00
Timo Kösters 4a8bc93b1a Merge pull request 'Send invites only if invited during the sync request' (#176) from gnieto/conduit:fix/send-invite-when-needed into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/176
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-08-02 10:41:05 +02:00
Guillem Nieto b575593647 Do not ignore db errors 2020-08-02 09:38:20 +02:00
Guillem Nieto 47abe6686e Send invites only if invited during the sync request
Fixes: https://git.koesters.xyz/timo/conduit/issues/175
2020-08-02 09:24:47 +02:00
Timo Kösters 935f0e6185 Merge pull request 'feat: handle /publicRooms pagination' (#174) from publicrooms-pagination into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/174
2020-07-30 22:52:23 +02:00
timokoesters 98f37302a6 feat: handle /publicRooms pagination 2020-07-30 22:51:02 +02:00
Timo Kösters 5cfda2f5d3 Merge pull request 'feat: handle inhibit_login in /register' (#173) from inhibit-login into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/173
2020-07-30 22:21:09 +02:00
timokoesters 0616acbde6 feat: handle inhibit_login in /register 2020-07-30 20:52:37 +02:00
Timo Kösters acc7b15981 Merge pull request 'refactor: put endpoints into modules' (#172) from route-files into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/172
2020-07-30 19:09:43 +02:00
timokoesters c1c62b7eb4 refactor: put endpoints into modules 2020-07-30 18:34:03 +02:00
Timo Kösters 485a24398b Merge pull request 'Implement ignore invite when inviting user is ignored' (#164) from DevinR528/conduit:ignored-list-invite into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/164
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-07-30 15:27:08 +02:00
Devin Ragotzy 7a70d8488f Rebase with master and update append_pdu call 2020-07-30 09:22:51 -04:00
Devin Ragotzy c8d7d80eb2 Fix start/end token swap left from dropped commits 2020-07-30 09:22:51 -04:00
Devin Ragotzy 99220565d4 Fix invite leave auth error by moving update_membership 2020-07-30 09:22:51 -04:00
Devin Ragotzy 25c0e75f29 Cargo fmt 2020-07-30 09:22:51 -04:00
Devin Ragotzy 8aac332b3a Move ignore invite logic into update_member 2020-07-30 09:22:51 -04:00
Devin Ragotzy f2fab27d81 Implement filtering invites if sender is ignored by receiver 2020-07-30 09:22:51 -04:00
Timo Kösters 100e3d6d6d Merge pull request 'improvement: handle limit and set limited in /user_directory/search' (#169) from user-dir-limit into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/169
2020-07-30 15:19:21 +02:00
timokoesters 52b1df6fd2 improvement: handle limit and set limited in /user_directory/search 2020-07-30 15:17:34 +02:00
Timo Kösters 18dcf44aa4 Merge pull request 'fix: send device list updates when user is in no rooms' (#170) from fix-set-up-encryption into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/170
2020-07-30 14:46:27 +02:00
timokoesters ce460ea159 fix: send device list updates when user is in no rooms 2020-07-30 14:09:05 +02:00
Timo Kösters c824652de6 Merge pull request 'Fix clippy warnings and run rustfmt' (#163) from DevinR528/conduit:clippy-fix2 into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/163
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-07-30 08:20:31 +02:00
timokoesters b67372b11b refactor: make all mods in database pub
Now they can easily export their own structs
2020-07-29 21:48:31 +02:00
Devin Ragotzy d948f896c0 Turn append_pdu args into struct PduBuilder 2020-07-29 21:47:09 +02:00
Devin Ragotzy 1c6f211933 Create media::FileMeta to represent a file and meta data 2020-07-29 21:33:48 +02:00
Devin Ragotzy 2da48b941d Convert all map_err -> expect when deserializing to Raw 2020-07-29 21:33:47 +02:00
Devin Ragotzy 62df9ca580 Fix all clippy warnings, shorten line len in client_server 2020-07-29 21:32:35 +02:00
Timo Kösters 3ccbd02081 Merge pull request 'Long polling and more' (#162) from longpoll into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/162
2020-07-29 21:17:58 +02:00
timokoesters e0d0fb4703 fix: only send device_one_time_keys_count when there are updates 2020-07-29 20:44:06 +02:00
timokoesters 66bc25fcd3 feat: implement /keys/changes 2020-07-29 18:05:16 +02:00
timokoesters 0693387769 improvement: more efficient /sync and only send device updates when sharing a room 2020-07-29 17:03:04 +02:00
timokoesters 310b0fcd86 fix ci 2020-07-29 13:05:38 +02:00
timokoesters d891bbb5dc improve: presence 2020-07-29 13:05:38 +02:00
timokoesters 05f9d927b8 fix: account data 2020-07-29 13:05:37 +02:00
timokoesters 21eb8d4fe3 fix: problems with pdu serialization 2020-07-29 12:59:40 +02:00
timokoesters dd3dab39ae feat: whoami route 2020-07-29 12:59:40 +02:00
timokoesters 489cbc0a93 refactor: use <_> instead of <_parameter_name> 2020-07-29 12:59:36 +02:00
gnieto cc411c530b Fix custom account data serialization (#165)
Stylistic change

Fix custom data serialization

Build a custom event before storing global account data

Co-authored-by: Guillem Nieto <gnieto.talo@gmail.com>
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/165
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-07-29 07:48:34 +02:00
Timo Kösters c4260bde81 Merge pull request 'Timo's Conditionally emit rocket::http_verb attr macros if lib/bin' (#157) from timo-make-lib into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/157
2020-07-27 20:40:30 +02:00
Devin Ragotzy e6a1b0b66f Add cfg_attr gate to server_server endpoints 2020-07-27 18:54:43 +02:00
Devin Ragotzy 42e0102a2a Conditionally emit rocket::http_verb attr macros if lib/bin 2020-07-27 18:54:43 +02:00
Timo Kösters b82fd02ee3 Merge pull request 'Implement /rooms/<room_id>/joined_members' (#143) from joined_members into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/143
2020-07-27 18:22:04 +02:00
CapsizeGlimmer 4d4969862a Implement /rooms/<room_id>/joined_members 2020-07-27 18:21:06 +02:00
Timo Kösters fdb7b8f0f1 Merge pull request 'Implement max_request_size config option' (#153) from media-size-config into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/153
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-07-27 18:08:50 +02:00
timokoesters 5f47cbf7dc improvement: documentation 2020-07-27 18:06:36 +02:00
CapsizeGlimmer 8fcf8e20b8 fix MR 153 requests; cargo fmt 2020-07-27 17:50:21 +02:00
CapsizeGlimmer fa2da9e048 Implement max_request_size config option 2020-07-27 17:49:11 +02:00
Timo Kösters 3451b10a4b Merge pull request 'Fix CI' (#161) from fix-ci into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/161
2020-07-27 08:21:34 +02:00
timokoesters 2765071201 Fix CI 2020-07-27 08:19:14 +02:00
Timo Kösters 75d91b9064 Merge pull request 'feat: encryption_disabled config option' (#160) from disable-encryption-config into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/160
2020-07-27 08:15:04 +02:00
timokoesters 808a7deae3 cargo fmt 2020-07-26 22:45:10 +02:00
timokoesters dc5fb7e33a feat: encryption_disabled config option
Can be used with ROCKET_ENCRYPTION_DISABLED=true
2020-07-26 22:41:29 +02:00
gnieto 5a8705bd25 Add room tags (#140)
Merge branch 'master' into task/add-tags

Add room tagging support

Co-authored-by: Timo Kösters <timo@koesters.xyz>
Co-authored-by: Guillem Nieto <gnieto.talo@gmail.com>
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/140
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-07-26 22:33:20 +02:00
Timo Kösters c3d142ad28 Merge pull request 'fix: stop /messages at to' (#159) from fix-to into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/159
2020-07-26 22:21:39 +02:00
timokoesters b7df8fe83c fix: stop /messages at to
Fixes #150
2020-07-26 22:21:05 +02:00
Timo Kösters 20ab19d828 Merge pull request 'Upgrade ruma' (#158) from jplatte/conduit:up-ruma into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/158
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-07-26 17:20:11 +02:00
Jonas Platte 09561ccea3 Upgrade ruma 2020-07-26 16:52:43 +02:00
Timo Kösters f8544bf6e3 Merge pull request 'improvement: only remove to-device events when sure the client received them' (#139) from improve-to-device-removal into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/139
2020-07-26 14:14:08 +02:00
timokoesters 16576d19cd improvement: only remove to-device events when sure the client received them
To make this work, I had to remove the recommended limit of 100
to-device events per /sync
(https://matrix.org/docs/spec/client_server/latest#id72)
2020-07-26 13:59:19 +02:00
Timo Kösters 678f33acf9 Merge pull request 'Moving to ruma-monorepo' (#133) from DevinR528/conduit:ruma-mono into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/133
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-07-25 22:02:45 +02:00
Devin Ragotzy 87fd432527 Refactor account_data to be more similar to other endpoints 2020-07-25 15:48:12 -04:00
Devin Ragotzy 60381ddcf4 Update to latest ruma/master rev 2020-07-25 14:25:24 -04:00
Devin Ragotzy 61458536ab Merge branch 'master' of https://git.koesters.xyz/timo/conduit into ruma-mono 2020-07-25 13:46:28 -04:00
aura 630196f0a3 Implement get_joined_rooms (#155)
whitelist /joined_rooms in sytest

Signed-off-by: Aurabindo Pillai <mail@aurabindo.in>

style: fmt

feat: implement /joined_rooms (#78)

Signed-off-by: Aurabindo Pillai <mail@aurabindo.in>

Co-authored-by: Aurabindo Pillai <mail@aurabindo.in>
Co-authored-by: timokoesters <timo@koesters.xyz>
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/155
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-07-25 18:35:22 +02:00
Timo Kösters be43b9557e Merge pull request 'improvement: switch to stable rust' (#151) from stable into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/151
2020-07-23 10:23:01 +02:00
timokoesters d8e1248df6 improvement: switch to stable rust 2020-07-22 22:42:01 +02:00
Devin R 84d47da392 Simplify deserialization and deconstruction for Responses 2020-07-21 16:26:01 -04:00
Devin R 33bc666859 Use sync ephemeral events in sync Resposne (remove room_id)
Bump ruma to latest master which also fixes some server name as String
to now being of type Box<ServerName>.
2020-07-21 14:04:39 -04:00
Devin R 9a993fa7c1 Convert Pdu to a validated ruma type when calling to_*_event 2020-07-18 08:22:30 -04:00
Devin R 75959cdc10 Resolve stying review issues 2020-07-18 08:21:25 -04:00
Devin R 029c60be78 Replace to_string into_boxed_str with into 2020-07-17 19:52:04 -04:00
Devin R 59cbf202e4 Cargo.lock updated while rebasing 2020-07-17 16:05:53 -04:00
Devin R d02685a4fd Update to latest ruma/ruma commit
This will most likely be the API that is released to crates.io so it
should be fairly stable...
2020-07-17 16:04:05 -04:00
Devin R 63e23154f3 Rebase with key backups and cross signing
Moved back to a fork of ruma with timo's key-backup and cross-signing
branch. Ephemeral events in sync responses are EphemeralRoomEventStub
(they also have no room_id like all of sync responses events)
2020-07-17 16:04:05 -04:00
Devin R 84dcb885a7 Return correct Errors and replace panic, fix misc review issues
Remove EventJson todo comments, clean up Cargo.toml commented ruma deps.
2020-07-17 16:03:36 -04:00
Devin R ddc7598870 Use ruma/ruma master 2020-07-17 16:03:36 -04:00
Devin R 24b6702047 Add to_*_event_stub methods to pdu, filter for correct event kind
When creating some responses (sync) an AnyRoomEventStub is needed for this
PduEvent will deserialize the JSON as a Stub event and a non stub event
when needed. Ephemeral and account events are checked to be the correct
type and filtered out if not. This requires an extra `deserialize` call
which could/should be removed.

TODO: Possibly get rid of EventJson in some places.
2020-07-17 16:03:33 -04:00
Devin R 7c38e53839 Move to depend on ruma monorepo and ruma-events0.22 2020-07-17 16:03:02 -04:00
Timo Kösters 9c095f1538 Update README, fix CI (#148)
Update 'README.md'

Update README, fix CI

Co-authored-by: timokoesters <timo@koesters.xyz>
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/148
2020-07-16 07:50:11 +02:00
Timo Kösters b9de21949d Update to rocket master (#147)
Merge branch 'master' into rocket

Update to rocket master

Co-authored-by: timokoesters <timo@koesters.xyz>
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/147
2020-07-14 18:23:26 +02:00
the0 469071e105 feat: implement /event (#144)
Merge branch 'master' into event-route

Event: Implement /event

Co-authored-by: the0 <theo@localhost>
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/144
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-07-11 14:08:37 +02:00
Timo Kösters b03d030b71 Merge pull request 'Improve README' (#145) from readme into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/145
2020-07-11 09:57:43 +02:00
timokoesters f361cb3d39 Improve README 2020-07-11 09:55:44 +02:00
Timo Kösters 8409146415 Merge pull request 'Implement /logout/all' (#141) from CapsizeGlimmer/conduit:logout-all into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/141
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-07-09 19:21:12 +02:00
CapsizeGlimmer 3a8efaeafa Whitelist logout all 2020-07-07 23:09:29 -04:00
CapsizeGlimmer 76aa44ead3 Add logout/all route to main 2020-07-05 15:35:03 -04:00
CapsizeGlimmer 7c2144c6d7 Implement /logout/all 2020-07-05 15:35:03 -04:00
the0 b81939841b feat: account deactivation (#137)
Deactivation: swap unwrap_or(false) to .ok()?

feat: implement deactivate account route

Implement error code on login to deactivated account

Deactivation: Changes requested

Add missing .clone()

Deactivation: Requested changes

Remove unneeded .filter()

Deactivation: badly named signature leads to confusion

Co-authored-by: the0 <theo@localhost>
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/137
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-07-05 07:48:19 +02:00
the0 67a1f21f5d feat: implement password changing (#138)
Password: Fixes

Password: Implement logging out all devices except current

Password: Implement password changing

Co-authored-by: the0 <theo@localhost>
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/138
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-07-02 20:38:25 +02:00
Timo Kösters e809d819ac Merge pull request 'Key backups and cross signing' (#132) from cross-signing into master
Reviewed-on: https://git.koesters.xyz/timo/conduit/pulls/132
2020-06-26 19:01:32 +02:00
timokoesters b83fba5c44 chore: update dependencies 2020-06-26 18:04:08 +02:00
timokoesters 54ad1fbed9 fix: CI 2020-06-26 16:26:29 +02:00
timokoesters 05f1f73e10 improvement: upgrade to sled 0.32
BREAKING CHANGE: old databases are not compatible anymore
2020-06-26 16:26:28 +02:00
timokoesters 24c544f650 fix: DMs show up as rooms 2020-06-26 15:16:15 +02:00
Guillem Nieto 8f06d0258a Remove is_direct flag from Join event
When I was investigating the DM issue, I found that join event contained
the `is_direct` flag. According to the spec, this flag should only be
set on "invite" events, but not on join.

Other homeservers do not have this flag on join.
2020-06-26 15:16:15 +02:00
timokoesters a49a572d76 feat: cross-signing 2020-06-26 15:16:15 +02:00
timokoesters 7031240af3 improvement: /members route 2020-06-16 23:25:15 +02:00
timokoesters 02fe030b2a improvement: better default push rules 2020-06-16 23:25:14 +02:00
Timo Kösters e7803e310a Merge pull request 'fix: update rocket version' (#127) from fix into master 2020-06-16 13:55:20 +02:00
timokoesters db685e0cf7 fix: update rocket version 2020-06-16 13:53:15 +02:00
Timo Kösters 0f72bd9f32 Merge pull request 'fix: update ruma version' (#125) from fix into master 2020-06-16 12:21:12 +02:00
timokoesters 13d474f6ee fix: update ruma version 2020-06-16 12:19:58 +02:00
Timo Kösters bc959f7634 Merge pull request 'Update 'README.md'' (#123) from timo-patch-1 into master 2020-06-16 08:44:24 +02:00
Timo Kösters 853ccd6fbf Update 'README.md' 2020-06-16 08:43:46 +02:00
Timo Kösters b0bbc049fa Merge pull request 'Update 'README.md'' (#122) from timo-bitcoin into master 2020-06-16 08:42:13 +02:00
Timo Kösters c6194b27a3 Update 'README.md' 2020-06-16 08:21:06 +02:00
Timo Kösters 7b23069943 Merge pull request 'Remove unused imports' (#119) from PublicByte/conduit:remove-unused-imports into master 2020-06-11 22:34:49 +02:00
PublicByte fa7612f069 refactor: remove unused imports 2020-06-11 21:06:43 +02:00
Timo Kösters 4c98079c4c Merge pull request 'refactor: better error handling' (#116) from error-handling into master 2020-06-11 15:21:23 +02:00
timokoesters 56d4742201 improvement: log bad database errors automatically 2020-06-11 14:58:44 +02:00
timokoesters 2368a90584 refactor: better error handling 2020-06-11 13:14:35 +02:00
Timo Kösters 80935c5826 Merge pull request 'fix' (#115) from uiaa into master 2020-06-08 15:19:48 +02:00
timokoesters f2a5d46628 fix 2020-06-08 15:17:58 +02:00
Timo Kösters c681f0c494 Merge pull request 'Uiaa + Close registration + optimizations' (#113) from uiaa into master 2020-06-08 14:30:45 +02:00
timokoesters 95047272e8 fix: let example config show how to use registration_disabled 2020-06-08 14:29:44 +02:00
timokoesters 176bd114a0 fix: use correct device in GET /devices 2020-06-08 14:23:42 +02:00
timokoesters bfe5b89ba4 style: cargo fmt 2020-06-08 11:45:22 +02:00
timokoesters 588049678b refactor: replace DeviceId with str or String 2020-06-08 11:40:19 +02:00
timokoesters b4d65ab67d improvement: optimize /sync response 2020-06-08 11:39:32 +02:00
timokoesters 0067f49d52 feat: close registration with ROCKET_REGISTRATION_DISABLED=true 2020-06-08 11:39:32 +02:00
timokoesters c85d363d71 feat: user interactive authentication 2020-06-08 11:39:30 +02:00
Timo Kösters 88d091fca1 Merge pull request 'Allow client to load history on newly joined rooms' (#111) from gnieto/conduit:fix/issue-39-history-load into master
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-06-07 11:21:53 +02:00
Guillem Nieto cc383ac932 Cargo fmt 2020-06-06 19:48:01 +02:00
Guillem Nieto 9269f009db Allow client to load history on newly joined rooms
On /sync, check if a room is a new join between `since` parameter and
now. If it's a newly joined room, set the limited flag to true, which will force
the client to load room messages via the `/messages` endpoint.

On `master`, I could not reproduce the messages not showing to others
when joining after being invited.

Fixes #39
2020-06-06 19:29:03 +02:00
Timo Kösters 4400bb93bb Merge pull request 'fix: edus will not be removed after timeout' (#108) from fix into master 2020-06-06 15:26:51 +02:00
timokoesters 8eedc12567 fix: edus will not be removed after timeout 2020-06-06 15:23:37 +02:00
Timo Kösters 8f6b446193 Merge pull request 'Switch to the ruma meta-crate' (#106) from jplatte/conduit:master into master
Reviewed-by: Timo Kösters <timo@koesters.xyz>
2020-06-06 08:58:13 +02:00
Jonas Platte 7526fd8602 Switch to the ruma meta-crate 2020-06-05 18:42:45 +02:00
Timo Kösters 3a5b292f22 Merge pull request 'feat: heroes' (#102) from fix into master 2020-06-05 10:08:47 +02:00
Timo Kösters 22a12ac6c0 Merge pull request 'Update 'README.md'' (#104) from riot-fixed into master 2020-06-05 09:31:23 +02:00
timokoesters 08d19c3e0b fix: broken dependencies 2020-06-05 09:04:51 +02:00
Timo Kösters 0a49b24322 Update 'README.md' 2020-06-04 22:51:19 +02:00
timokoesters d404f902bf fix: send presence too often 2020-06-04 22:36:48 +02:00
timokoesters 32da76b9a2 feat: heroes, don't send notifications every time 2020-06-04 19:05:11 +02:00
Timo Kösters 55e14cbf44 Merge pull request 'Replies load context, /kick, /ban, /unban work' (#101) from fix into master 2020-06-04 16:53:40 +02:00
timokoesters b7f7a39973 feat: kick,ban,unban user route 2020-06-04 16:51:36 +02:00
timokoesters a8df1acdfd feat: load replies, forward pagination 2020-06-04 13:58:55 +02:00
Timo Kösters c655870d23 Merge pull request 'Small fixes' (#98) from fix into master 2020-06-04 12:05:54 +02:00
timokoesters 168f2281fd improvement: bundle typing events and only send on changes
Fixes #67 and #49
2020-06-04 11:17:36 +02:00
timokoesters 8328eeb5ac Make sytest not fail 2020-06-04 09:53:26 +02:00
timokoesters 1c85b0fd05 remove tests in favor of sytests 2020-06-04 09:48:33 +02:00
timokoesters b192fddf2f fix: show device display names 2020-06-04 09:48:32 +02:00
timokoesters 325e373684 refactor: small changes 2020-06-03 22:30:51 +02:00
timokoesters 19c9e4b916 fix: room version 6 2020-06-03 22:30:50 +02:00
Timo Kösters 77318af563 Merge pull request 'Implement devices API (#20)' (#97) from fix into master 2020-06-03 14:12:01 +02:00
gnieto 0883c44659 Implement devices API (#20)
small improvements

Cargo fmt

Simplify insert and update methods

Review feedback

Remove has_device method calls

Load all devices with a single db call

Remove device as in logout

Put all metadata on the same tree

Create userdevice key fucntion

Implement devices API

Implement all the devices endpoints. There's a couple of pending tasks:

- Integrate the "logout" logic once it lands to master (this should
  remove the given device from the database).
- Track and store last seen timestamp and IP.

Co-authored-by: timokoesters <timo@koesters.xyz>
Co-authored-by: Guillem Nieto <gnieto.talo@gmail.com>
2020-06-03 14:09:50 +02:00
gnieto ed9b544ace Implement devices API (#20)
small improvements

Cargo fmt

Simplify insert and update methods

Review feedback

Remove has_device method calls

Load all devices with a single db call

Remove device as in logout

Put all metadata on the same tree

Create userdevice key fucntion

Implement devices API

Implement all the devices endpoints. There's a couple of pending tasks:

- Integrate the "logout" logic once it lands to master (this should
  remove the given device from the database).
- Track and store last seen timestamp and IP.

Co-authored-by: timokoesters <timo@koesters.xyz>
Co-authored-by: Guillem Nieto <gnieto.talo@gmail.com>
2020-06-03 13:41:30 +02:00
Timo Kösters 720d48bd67 Merge pull request 'get_state_events_for_key_route returns the content of the requested event instead of the all event.' (#95) from jbbouille/conduit:fix-get_state_events_for_key_route-returning-all-event into master 2020-06-03 10:27:13 +02:00
Jean-Baptiste Petit 1222289c75 get_state_events_for_key_route return the content of the requested event instead of the all event. 2020-06-03 09:30:34 +02:00
Timo Kösters 0a1c4f3649 Merge pull request 'Black list temporaly some room creation tests.' (#50) from jbbouille/conduit:blacklist_some_creation_room_tests into master 2020-06-02 14:44:51 +02:00
Jean-Baptiste Petit 75e75c3b2f Black list temporaly some room creation tests. 2020-06-02 13:57:41 +02:00
Timo Kösters 4c2c0e2458 Merge pull request 'Better notifications and fix redactions' (#44) from notification into master 2020-06-01 22:25:24 +02:00
timokoesters 5a47c75427 fix: make redactions permanent 2020-06-01 20:58:49 +02:00
timokoesters b519bc6962 fix: only show notifications for messages 2020-06-01 20:16:18 +02:00
Timo Kösters 3aa0c8ed25 Merge pull request 'Room visibility, aliases and redaction' (#40) from alias into master 2020-05-31 10:23:04 +02:00
timokoesters 4e507ef706 feat: room visibility and aliases 2020-05-31 09:46:11 +02:00
timokoesters 9c26e22ad7 improvement: load aliases from database 2020-05-31 08:01:11 +02:00
timokoesters 18bf67748c feat: redaction 2020-05-31 08:01:10 +02:00
Timo Kösters 16538a6c16 Update 'README.md' 2020-05-29 10:04:19 +02:00
Timo Kösters 55842a0e57 Update 'README.md' 2020-05-29 09:54:30 +02:00
Timo Kösters 25ebde5af8 Merge pull request 'fix: /register lowercases user ids' (#28) from lowercase into master 2020-05-27 08:26:32 +02:00
timokoesters ca77c79222 fix: /register lowercases user ids
fixes #24
2020-05-27 07:09:23 +02:00
Timo Kösters dd80a8591d Merge pull request 'Get device_id from body instead of auth data' (#27) from gnieto/conduit:fix/create-device into master 2020-05-27 07:03:21 +02:00
Guillem Nieto 4b3b562347 Get device_id from body instead of auth data
Device_id was retrieved from the auth data instead of login's body and
this was causing that a new device was created on every login.

This is (I guess) provoking that some sytests are failing (for example,
"POST /login returns the same device_id as that in the request").
2020-05-26 21:06:54 +02:00
Timo Kösters d0e5a39d1d Merge pull request 'Move create room test into blacklist - fixes #23' (#26) from jbbouille/conduit:remove_create_public_room_test into master 2020-05-26 16:57:11 +02:00
Jean-Baptiste Petit 43ed80c6c2 Move create room test into blacklist - fixes #23 2020-05-26 16:01:38 +02:00
timokoesters 58683585cc improvement: show more info in public rooms list 2020-05-25 20:16:36 +02:00
Timo Kösters 63c62a4afa Update 'README.md' 2020-05-25 17:36:54 +02:00
Timo Kösters 1096c2847b Merge pull request 'Access control' (#22) from control into master 2020-05-25 16:59:40 +02:00
timokoesters b6c0e9bfb2 feat: access control 2020-05-25 16:40:00 +02:00
timokoesters c8ba9dce01 feat: proper room creation 2020-05-25 16:39:58 +02:00
josias b106d1393b Add logout route and database methods (#21)
Condense keys

Move remove methods to remove_device

Code cleanup

Add method for removing todevice events

Remove unnecessary existence checks

Add logout route and database methods

Co-authored-by: Josias <justjosias@tutanota.com>
2020-05-24 22:10:09 +02:00
timokoesters 1014388a9c fix: one time keys are never removed 2020-05-23 19:17:55 +02:00
timokoesters 5d6542a8a6 improvement: video link in readme 2020-05-21 18:10:04 +02:00
timokoesters d95e8b4880 fix: problem with to-device for all devices 2020-05-21 13:52:54 +02:00
timokoesters 43478a5870 fix: send correct membership events when joining / creating rooms 2020-05-20 09:24:44 +02:00
timokoesters 8df2a1a072 improvement: add room topic to public room dir 2020-05-20 00:12:07 +02:00
timokoesters e0fccffde0 fix: changing avatar url now sends room events 2020-05-19 23:52:02 +02:00
timokoesters ada260bf42 fix: use png for thumbnails 2020-05-19 23:51:37 +02:00
Timo Kösters cf91996336 Merge pull request 'fix: riot sometimes freaks out when refreshing' (#18) from media into master 2020-05-19 23:02:42 +02:00
timokoesters eb4af85765 fix: riot sometimes freaks out when refreshing 2020-05-19 22:56:28 +02:00
Timo Kösters 108d8988d8 Merge pull request 'feat: image thumbnails' (#17) from media into master 2020-05-19 20:01:13 +02:00
timokoesters d544d28b6e feat: image thumbnails 2020-05-19 19:59:52 +02:00
timokoesters 61f4f2c716 improvement: implement GET publicRooms 2020-05-19 16:28:03 +02:00
timokoesters 821c608c6a feat: media 2020-05-18 22:50:42 +02:00
timokoesters 42ae433b25 fix: send devicekeyupdate users in /sync 2020-05-18 12:46:06 +02:00
timokoesters f0aed35ecf improvement: user dir search also searches in displaynames 2020-05-18 10:29:45 +02:00
timokoesters 56dd6cb16f improvement: get state 2020-05-18 09:22:58 +02:00
timokoesters 6215218c3c fix: account data json 2020-05-17 22:05:43 +02:00
timokoesters 7fc71b3968 feat: end to end encryption 2020-05-17 19:56:40 +02:00
timokoesters 4fb79ebb4c chore: update dependencies 2020-05-14 13:56:29 +02:00
timo 86e20e6401 Merge pull request 'fix: only allow valid usernames in /register' (#14) from fix-register into master 2020-05-13 18:00:18 +02:00
timokoesters d08f91d1c3 fix: only allow valid usernames in /register 2020-05-13 12:25:15 +02:00
Rudi Floren 00a9424719 feat: sytests 2020-05-11 14:44:23 +02:00
timokoesters 8e041f90dd refactor: make cargo clippy happier 2020-05-11 12:34:48 +02:00
timokoesters 1dbde0e1c1 improvement: add option to get device id from token 2020-05-10 18:30:12 +02:00
timokoesters ee0d6940bd feat: presence updates 2020-05-09 21:47:09 +02:00
timokoesters 551308e9a8 Update dependencies and send displayname updates again 2020-05-08 21:13:52 +02:00
timokoesters 8f67c01efd refactor: split database into multiple files, more error handling, cleaner code 2020-05-03 21:44:48 +02:00
timokoesters 4b191a9311 improvement: set default push rules on register 2020-05-02 09:24:09 +02:00
timo 3cd0f89729 Add /_matrix/client/r0/register/available endpoint 2020-05-01 23:25:32 +02:00
Marcel 4bc7712ee4 [ClientServer] Add /_matrix/client/r0/register/available endpoint
Took 1 hour 25 minutes
2020-05-01 23:17:25 +02:00
timokoesters 4ca1ada73e update ruma 2020-05-01 21:45:55 +02:00
timokoesters b02c568941 feat: notifications, simple permission systems 2020-05-01 20:28:13 +02:00
timokoesters 169dbe6c37 fix: send full state after joining a room 2020-04-29 12:19:09 +02:00
timo 8087ddd746 Merge pull request 'Federated room list, lots of small tweeks' (#9) from federation into master 2020-04-29 10:35:38 +02:00
timokoesters c769283953 Update readme 2020-04-29 10:27:41 +02:00
timokoesters fd1aea7e36 Update dependencies 2020-04-29 10:27:41 +02:00
timokoesters 1cdf30f38c Add hostname to Rocket.toml config 2020-04-29 10:27:40 +02:00
timokoesters 23cb550d00 forget rooms, load history 2020-04-29 10:27:40 +02:00
timokoesters 4cc0a07092 feat: user renaming 2020-04-29 10:27:40 +02:00
timokoesters 720cc0cffc feat: federated room directory 2020-04-29 10:27:39 +02:00
timokoesters 120b6f4b95 Bump dependencies and fixes 2020-04-29 10:27:39 +02:00
timokoesters 873d191569 fix: http body as content when signing 2020-04-29 10:27:39 +02:00
timokoesters 1af6dd984a More work on federation 2020-04-29 10:27:38 +02:00
timokoesters b0d9ccdb2d Signing, basis for federation 2020-04-29 10:27:38 +02:00
timokoesters 9b79798e56 start work on signing 2020-04-29 10:27:37 +02:00
timokoesters 80ddf80f17 work 2020-04-29 10:27:31 +02:00
timo 4d658b3952 Merge pull request 'Fix typo in password message' (#8) from TheCycoONE/conduit:pwd-message-typo into master 2020-04-15 22:01:45 +02:00
TheCycoONE 6d858c39ca Fix typo in password message 2020-04-15 21:17:33 +02:00
timokoesters 2f63888995 Update README.md 2020-04-14 22:44:45 +02:00
gnieto fa9e127a1e Store hashed passwords (#7)
Use if let instead of unwrap

Default to invalid password if could not calculate

Move hash password methdo and return Result

Rename get_password method

Default to empty password when no pwd is received

Store hashed passwords

Store passwords hashed with Argon2 and verify password with that stored
hash.

Co-authored-by: Guillem Nieto <gnieto.talo@gmail.com>
2020-04-14 22:25:44 +02:00
timokoesters abcce95dd8 feat: invites, better public room dir, user search 2020-04-14 13:59:25 +02:00
timokoesters af1def50ac Update README.md 2020-04-12 22:29:48 +02:00
timokoesters 3debb6203c feat: handle typing events 2020-04-12 21:12:50 +02:00
timokoesters 3b9cadeec2 feat: read receipts 2020-04-11 23:57:56 +02:00
timokoesters ab8c2f1e5e Rename pduid_pdus to pduid_pdu 2020-04-11 09:35:06 +02:00
timokoesters fd829bfa0d move client_server code into own file 2020-04-11 09:30:11 +02:00
timokoesters 040296c711 Add test support and impl dummy /read_markers 2020-04-10 13:36:57 +02:00
timokoesters 93b1d97166 Update readme and cargo.toml 2020-04-10 10:25:33 +02:00
timo 8f41a4d306 Update 'README.md' 2020-04-09 23:23:16 +02:00
timo 3f2bf208a9 Merge pull request 'Add displayname and avatar_url endpoints' (#5) from MTRNord/matrixserver:accountdata into master 2020-04-09 21:26:57 +02:00
Marcel 57264f72e9 Fix avatar_url error message if not starting with mxc://
Took 8 minutes
2020-04-09 21:19:27 +02:00
Marcel 8bcbc983c3 Change and add Comments to the profile endpoints
Add missing docs

Took 9 minutes
2020-04-09 21:11:21 +02:00
Marcel 49fe5e3271 Rename userid_avatar_url to userid_avatarurl and fix debug print
Run cargo fmt

Took 5 minutes
2020-04-09 21:01:39 +02:00
Marcel b1284fd509 Replace profile_* with userid_*
Add a missing dot in the errormessage
Require mxc:// to be present at the start of an avatar_url
Update mxc check TODO
Show displayname or avatar_url if either is available when getting the profile Endpoint
Return the correct data in case of a empty displayname or an empty avatar_url

Took 50 minutes

Took 34 seconds
2020-04-09 20:53:27 +02:00
timo 9f3368daa4 Update 'README.md' 2020-04-09 19:51:52 +02:00
timokoesters cd55220a75 fix: room directory duplicates 2020-04-09 19:39:06 +02:00
Marcel 062c5521f0 Add displayname and avatar_url endpoints
Add PUT and GET /_matrix/client/r0/profile/{userId}/displayname Endpoint
Add PUT and GET /_matrix/client/r0/profile/{userId}/avatar_url Endpoint
Add GET /_matrix/client/r0/profile/{userId} Endpoint

Took 2 hours 16 minutes
2020-04-09 18:49:27 +02:00
timo b12ae15a45 Update 'README.md' 2020-04-09 17:39:45 +02:00
timokoesters 11e75e7081 make room directory work 2020-04-09 14:39:50 +02:00
timokoesters 5ac45eac59 public rooms dir 2020-04-09 12:22:39 +02:00
timokoesters 9214a62dde better room creation 2020-04-09 11:00:58 +02:00
timokoesters a1b2b4e4fe Add liberapay, change pr template 2020-04-09 00:05:37 +02:00
timo 9d40981cce Merge pull request 'UIAA error type' (#3) from jplatte/matrixserver:master into master 2020-04-08 23:41:39 +02:00
Jonas Platte 38ab7c843e Update error type of /register route 2020-04-08 23:25:19 +02:00
Jonas Platte c60402bf0d Update ruma-client-api 2020-04-08 23:13:30 +02:00
timokoesters d0920f0fa3 Add license 2020-04-08 22:28:03 +02:00
timokoesters 8557278b90 better riot.im support 2020-04-08 22:07:31 +02:00
timokoesters fdeee7fdb5 More dummy endpoints 2020-04-08 22:04:30 +02:00
timokoesters 215a31c513 Add a few dummy endpoints to make riot progress further 2020-04-08 22:04:29 +02:00
timokoesters ddcd423e6f feat: random tokens, sessions, guest usernames and device ids 2020-04-08 22:04:29 +02:00
timokoesters 64223b8812 register login flow 2020-04-08 22:04:29 +02:00
timo eb7c5b79be Update 'README.md' 2020-04-06 19:57:04 +02:00
timokoesters e55a63629c feat: state event support 2020-04-06 14:33:02 +02:00
timokoesters 10bb96fcf7 feat: room joining, room based /sync responses 2020-04-06 13:52:46 +02:00
timokoesters 4d4cff7120 Allow all kinds of messages in /send 2020-04-05 23:06:43 +02:00
timokoesters 884dc2867d Move to rocket's async branch 2020-04-05 19:54:08 +02:00
timokoesters 8b8381bcc0 New PduEvent struct 2020-04-04 11:53:37 +02:00
timokoesters f9cfede2a8 fix: deserialize sync event body 2020-04-03 21:17:27 +02:00
timokoesters 2855d1acdf Add README.md 2020-04-03 17:58:38 +02:00
timokoesters fa3226898c feat: save pdus
PDUs are saved in a pduid -> pdus map. roomid -> pduleaves keeps track
of the leaves of the event graph and eventid -> pduid maps event ids to
pdus.
2020-04-03 17:58:38 +02:00
timokoesters 22cca206ba Todo: ruma signatures
This commit will get force pushed away later
2020-03-30 15:38:25 +02:00
timokoesters dba6c46667 Use sled::Tree::prefix_search for deviceids 2020-03-30 13:46:18 +02:00
timokoesters b508b4d1e7 Start work on message events 2020-03-30 00:10:44 +02:00
timokoesters 533260edd8 Add auth 2020-03-29 21:05:20 +02:00
timo 18ed991b93 Merge branch 'master' of jplatte/matrixserver into master 2020-03-29 14:30:59 +02:00
Jonas Platte 1183105f15 Make Endpoint bound work for ruma_wrapper::Ruma 2020-03-29 14:29:12 +02:00
timokoesters 73e04e71d7 Start work on event creation 2020-03-29 13:49:13 +02:00
timokoesters 744e0adfcf Try to impl auth in ruma_wrapper 2020-03-28 23:08:59 +01:00
timokoesters 34a53ce20a Better database structure 2020-03-28 18:50:02 +01:00
timokoesters 6d27f15516 More logging 2020-03-28 15:16:18 +01:00
timokoesters 1679da7784 RUST_LOG=info by default 2020-03-27 21:00:40 +01:00
timokoesters 6fffcecf8e Updates 2020-03-27 21:00:10 +01:00
timokoesters c2c18b4651 feat: database 2020-02-20 10:12:13 +01:00
timokoesters cd777af41c feat: simple endpoint handlers 2020-02-18 22:07:57 +01:00
timokoesters 6264628c11 Initial commit 2020-02-15 22:42:21 +01:00
433 changed files with 45968 additions and 24592 deletions
+27 -8
View File
@@ -1,9 +1,28 @@
servers
compose.yml
node_modules
# Local build and dev artifacts
target
tests
# Docker files
Dockerfile*
docker-compose*
# IDE files
.vscode
.idea
*.iml
# Git folder
.git
.gitea
.gitlab
.github
# Dot files
.env
.gitignore
Dockerfile
.svelte-kit
build
output
.git
# Toml files
rustfmt.toml
# Documentation
#*.md
-6
View File
@@ -1,6 +0,0 @@
root = true
[*.{js,ts,svelte}]
charset = utf-8
indent_style = space
indent_size = 4
+5
View File
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
use flake
PATH_add bin
-2
View File
@@ -1,2 +0,0 @@
# Auto detect text files and perform LF normalization
* text=auto
+8
View File
@@ -0,0 +1,8 @@
<!-- Please describe your changes here -->
-----------------------------------------------------------------------------
- [ ] I ran `cargo fmt`, `cargo clippy`, and `cargo test`
- [ ] I agree to release my code and all other changes of this MR under the Apache-2.0 license
+227
View File
@@ -0,0 +1,227 @@
name: CI and Artifacts
on:
pull_request:
push:
branches:
- main
env:
# Required to make some things output color
TERM: ansi
ATTIC_TOKEN: ${{ secrets.ATTIC_TOKEN }}
jobs:
ci:
name: CI and Artifacts
runs-on: ubuntu-latest
steps:
- name: Sync repository
uses: actions/checkout@v4
- name: Install Nix (with flakes and nix-command enabled)
uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
# Add the `nix-community` cachix to speed up things that leverage it
extra_nix_config: |
experimental-features = nix-command flakes
extra-substituters = https://nix-community.cachix.org
extra-trusted-public-keys = nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
extra-substituters = https://crane.cachix.org
extra-trusted-public-keys = crane.cachix.org-1:8Scfpmn9w+hGdXH/Q9tTLiYAE/2dnJYRJP7kl80GuRk=
extra-substituters = https://nix.computer.surgery/conduit
extra-trusted-public-keys = conduit:ZGAf6P6LhNvnoJJ3Me3PRg7tlLSrPxcQ2RiE5LIppjo=
extra-substituters = https://attic.kennel.juneis.dog/conduit
extra-trusted-public-keys = conduit:Isq8FGyEC6FOXH6nD+BOeAA+bKp6X6UIbupSlGEPuOg=
extra-substituters = https://attic.kennel.juneis.dog/conduwuit
extra-trusted-public-keys = conduwuit:lYPVh7o1hLu1idH4Xt2QHaRa49WRGSAqzcfFd94aOTw=
- name: Pop/push Magic Nix Cache
uses: DeterminateSystems/magic-nix-cache-action@main
- name: Configure `nix-direnv`
run: |
echo 'source $HOME/.nix-profile/share/nix-direnv/direnvrc' > "$HOME/.direnvrc"
- name: Install `direnv` and `nix-direnv`
run: nix-env -f "<nixpkgs>" -iA direnv -iA nix-direnv
- name: Pop/push downloaded crate cache
uses: actions/cache@v4
with:
key: downloaded-crates
path: ~/.cargo
- name: Pop/push compiled crate cache
uses: actions/cache@v4
with:
key: compiled-crates-${{runner.os}}
path: target
# Do this to shorten the logs for the real CI step
- name: Populate `/nix/store`
run: nix develop --command true
- name: Perform continuous integration
run: |
direnv allow
direnv exec . engage
- name: Build static-x86_64-unknown-linux-musl
run: |
./bin/nix-build-and-cache .#static-x86_64-unknown-linux-musl
- name: Upload artifact static-x86_64-unknown-linux-musl
uses: actions/upload-artifact@v4
with:
name: static-x86_64-unknown-linux-musl
path: result/bin/conduit
if-no-files-found: error
- name: Build static-aarch64-unknown-linux-musl
run: |
./bin/nix-build-and-cache .#static-aarch64-unknown-linux-musl
- name: Upload artifact static-aarch64-unknown-linux-musl
uses: actions/upload-artifact@v4
with:
name: static-aarch64-unknown-linux-musl
path: result/bin/conduit
if-no-files-found: error
- name: Build oci-image-x86_64-unknown-linux-gnu
run: |
./bin/nix-build-and-cache .#oci-image
cp -f result oci-image-amd64.tar.gz
- name: Upload artifact oci-image-x86_64-unknown-linux-gnu
uses: actions/upload-artifact@v4
with:
name: oci-image-x86_64-unknown-linux-gnu
path: oci-image-amd64.tar.gz
# don't compress again
compression-level: 0
- name: Build oci-image-aarch64-unknown-linux-musl
run: |
./bin/nix-build-and-cache .#oci-image-aarch64-unknown-linux-musl
cp -f result oci-image-arm64v8.tar.gz
- name: Upload artifact oci-image-aarch64-unknown-linux-musl
uses: actions/upload-artifact@v4
with:
name: oci-image-aarch64-unknown-linux-musl
path: oci-image-arm64v8.tar.gz
if-no-files-found: error
# don't compress again
compression-level: 0
- name: Build deb-x86_64-unknown-linux-gnu
run: |
sudo apt-get update && sudo apt-get install -y --no-install-recommends libclang-dev
cargo install cargo-deb
cargo deb
- name: Upload artifact deb-x86_64-unknown-linux-gnu
uses: actions/upload-artifact@v4
with:
name: deb-x86_64-unknown-linux-gnu
path: target/debian/*.deb
if-no-files-found: error
- name: Extract metadata for Dockerhub
env:
REGISTRY: registry.hub.docker.com
IMAGE_NAME: ${{ github.repository }}
id: meta-dockerhub
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Extract metadata for GitHub Container Registry
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
id: meta-ghcr
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Login to Dockerhub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: girlbossceo
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
env:
REGISTRY: ghcr.io
with:
registry: ${{ env.REGISTRY }}
username: girlbossceo
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Dockerhub
if: github.event_name != 'pull_request'
env:
IMAGE_NAME: docker.io/${{ github.repository }}
IMAGE_SUFFIX_AMD64: amd64
IMAGE_SUFFIX_ARM64V8: arm64v8
run: |
docker load -i oci-image-amd64.tar.gz
IMAGE_ID_AMD64=$(docker images -q conduit:main)
docker load -i oci-image-arm64v8.tar.gz
IMAGE_ID_ARM64V8=$(docker images -q conduit:main)
# Tag and push the architecture specific images
docker tag $IMAGE_ID_AMD64 $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_AMD64
docker tag $IMAGE_ID_ARM64V8 $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_ARM64V8
docker push $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_AMD64
docker push $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_ARM64V8
# Tag the multi-arch image
docker manifest create $IMAGE_NAME:$GITHUB_SHA --amend $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_AMD64 --amend $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_ARM64V8
docker manifest push $IMAGE_NAME:$GITHUB_SHA
# Tag and push the git ref
docker manifest create $IMAGE_NAME:$GITHUB_REF_NAME --amend $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_AMD64 --amend $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_ARM64V8
docker manifest push $IMAGE_NAME:$GITHUB_REF_NAME
# Tag git tags as 'latest'
if [[ -n "$GITHUB_REF_NAME" ]]; then
docker manifest create $IMAGE_NAME:latest --amend $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_AMD64 --amend $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_ARM64V8
docker manifest push $IMAGE_NAME:latest
fi
- name: Publish to GitHub Container Registry
if: github.event_name != 'pull_request'
env:
IMAGE_NAME: ghcr.io/${{ github.repository }}
IMAGE_SUFFIX_AMD64: amd64
IMAGE_SUFFIX_ARM64V8: arm64v8
run: |
docker load -i oci-image-amd64.tar.gz
IMAGE_ID_AMD64=$(docker images -q conduit:main)
docker load -i oci-image-arm64v8.tar.gz
IMAGE_ID_ARM64V8=$(docker images -q conduit:main)
# Tag and push the architecture specific images
docker tag $IMAGE_ID_AMD64 $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_AMD64
docker tag $IMAGE_ID_ARM64V8 $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_ARM64V8
docker push $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_AMD64
docker push $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_ARM64V8
# Tag the multi-arch image
docker manifest create $IMAGE_NAME:$GITHUB_SHA --amend $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_AMD64 --amend $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_ARM64V8
docker manifest push $IMAGE_NAME:$GITHUB_SHA
# Tag and push the git ref
docker manifest create $IMAGE_NAME:$GITHUB_REF_NAME --amend $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_AMD64 --amend $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_ARM64V8
docker manifest push $IMAGE_NAME:$GITHUB_REF_NAME
# Tag git tags as 'latest'
if [[ -n "$GITHUB_REF_NAME" ]]; then
docker manifest create $IMAGE_NAME:latest --amend $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_AMD64 --amend $IMAGE_NAME:$GITHUB_SHA-$IMAGE_SUFFIX_ARM64V8
docker manifest push $IMAGE_NAME:latest
fi
+40
View File
@@ -0,0 +1,40 @@
name: Trivy code and vulnerability scanning
on:
pull_request:
push:
branches:
- main
schedule:
- cron: '00 12 * * *'
permissions:
contents: read
jobs:
trivy-scan:
name: Trivy Scan
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run Trivy code and vulnerability scanner on repo
uses: aquasecurity/trivy-action@0.17.0
with:
scan-type: repo
format: sarif
output: trivy-results.sarif
severity: CRITICAL,HIGH,MEDIUM,LOW
- name: Run Trivy code and vulnerability scanner on filesystem
uses: aquasecurity/trivy-action@0.17.0
with:
scan-type: fs
format: sarif
output: trivy-results.sarif
severity: CRITICAL,HIGH,MEDIUM,LOW
+75 -3
View File
@@ -1,4 +1,76 @@
node_modules
# CMake
cmake-build-*/
servers/*.ign
.parcel-cache
# IntelliJ
.idea/
out/
*.iml
modules.xml
*.ipr
# mpeltonen/sbt-idea plugin
.idea_modules/
# Linux backup files
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
# Rust
/target/
### vscode ###
.vscode/*
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
### Windows ###
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows shortcuts
*.lnk
# Conduit
conduit.toml
conduit.db
# Etc.
**/*.rs.bk
cached_target
# Nix artifacts
/result*
# Direnv cache
/.direnv
test-conduit/
test-conduit.toml
# Gitlab CI cache
/.gitlab-ci.d
+164
View File
@@ -0,0 +1,164 @@
stages:
- ci
- artifacts
- publish
variables:
# Makes some things print in color
TERM: ansi
NIX_CONFIG: |
experimental-features = nix-command flake
extra-substituters = https://nix.computer.surgery/conduit
extra-trusted-public-keys = conduit:ZGAf6P6LhNvnoJJ3Me3PRg7tlLSrPxcQ2RiE5LIppjo=
extra-substituters = https://crane.cachix.org
extra-trusted-public-keys = crane.cachix.org-1:8Scfpmn9w+hGdXH/Q9tTLiYAE/2dnJYRJP7kl80GuRk=
extra-substituters = https://nix-community.cachix.org
extra-trusted-public-keys = nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
extra-substituters = https://attic.kennel.juneis.dog/conduit
extra-trusted-public-keys = conduit:Isq8FGyEC6FOXH6nD+BOeAA+bKp6X6UIbupSlGEPuOg=
extra-substituters = https://attic.kennel.juneis.dog/conduwuit
extra-trusted-public-keys = conduwuit:lYPVh7o1hLu1idH4Xt2QHaRa49WRGSAqzcfFd94aOTw=
before_script:
# Install direnv and nix-direnv
- if command -v nix > /dev/null; then nix-env -iA nixpkgs.direnv nixpkgs.nix-direnv nixpkgs.engage; fi
# Allow .envrc
- if command -v nix > /dev/null; then direnv allow; fi
# Set CARGO_HOME to a cacheable path
- export CARGO_HOME="$(git rev-parse --show-toplevel)/.gitlab-ci.d/cargo"
ci:
stage: ci
image: nixos/nix:2.20.2
script:
- direnv exec . engage
cache:
key: nix
paths:
- target
- .gitlab-ci.d
static:x86_64-unknown-linux-musl:
stage: artifacts
image: nixos/nix:2.20.2
script:
# Push artifacts and build requirements to binary cache
- ./bin/nix-build-and-cache .#static-x86_64-unknown-linux-musl
# Make the output less difficult to find
- cp result/bin/conduit conduit
artifacts:
paths:
- conduit
static:aarch64-unknown-linux-musl:
stage: artifacts
image: nixos/nix:2.20.2
script:
# Push artifacts and build requirements to binary cache
- ./bin/nix-build-and-cache .#static-aarch64-unknown-linux-musl
# Make the output less difficult to find
- cp result/bin/conduit conduit
artifacts:
paths:
- conduit
# Note that although we have an `oci-image-x86_64-unknown-linux-musl` output,
# we don't build it because it would be largely redundant to this one since it's
# all containerized anyway.
oci-image:x86_64-unknown-linux-gnu:
stage: artifacts
image: nixos/nix:2.20.2
script:
# Push artifacts and build requirements to binary cache
#
# Since the OCI image package is based on the binary package, this has the
# fun side effect of uploading the normal binary too. Conduit users who are
# deploying with Nix can leverage this fact by adding our binary cache to
# their systems.
- ./bin/nix-build-and-cache .#oci-image
# Make the output less difficult to find
- cp result oci-image-amd64.tar.gz
artifacts:
paths:
- oci-image-amd64.tar.gz
oci-image:aarch64-unknown-linux-musl:
stage: artifacts
needs:
# Wait for the static binary job to finish before starting so we don't have
# to build that twice for no reason
- static:aarch64-unknown-linux-musl
image: nixos/nix:2.20.2
script:
# Push artifacts and build requirements to binary cache
- ./bin/nix-build-and-cache .#oci-image-aarch64-unknown-linux-musl
# Make the output less difficult to find
- cp result oci-image-arm64v8.tar.gz
artifacts:
paths:
- oci-image-arm64v8.tar.gz
debian:x86_64-unknown-linux-gnu:
stage: artifacts
# See also `rust-toolchain.toml`
image: rust:1.75.0
script:
- cargo install cargo-deb
- cargo deb
# Make the output less difficult to find
- mv target/debian/*.deb conduit.deb
artifacts:
paths:
- conduit.deb
cache:
key: debian
paths:
- target
- .gitlab-ci.d
docker-publish:
stage: publish
image: docker:25.0.3
services:
- docker:25.0.3-dind
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE/conduwuit
IMAGE_SUFFIX_AMD64: amd64
IMAGE_SUFFIX_ARM64V8: arm64v8
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker load -i oci-image-amd64.tar.gz
- IMAGE_ID_AMD64=$(docker images -q conduit:main)
- docker load -i oci-image-arm64v8.tar.gz
- IMAGE_ID_ARM64V8=$(docker images -q conduit:main)
# Tag and push the architecture specific images
- docker tag $IMAGE_ID_AMD64 $IMAGE_NAME:$CI_COMMIT_SHA-$IMAGE_SUFFIX_AMD64
- docker tag $IMAGE_ID_ARM64V8 $IMAGE_NAME:$CI_COMMIT_SHA-$IMAGE_SUFFIX_ARM64V8
- docker push $IMAGE_NAME:$CI_COMMIT_SHA-$IMAGE_SUFFIX_AMD64
- docker push $IMAGE_NAME:$CI_COMMIT_SHA-$IMAGE_SUFFIX_ARM64V8
# Tag the multi-arch image
- docker manifest create $IMAGE_NAME:$CI_COMMIT_SHA --amend $IMAGE_NAME:$CI_COMMIT_SHA-$IMAGE_SUFFIX_AMD64 --amend $IMAGE_NAME:$CI_COMMIT_SHA-$IMAGE_SUFFIX_ARM64V8
- docker manifest push $IMAGE_NAME:$CI_COMMIT_SHA
# Tag and push the git ref
- docker manifest create $IMAGE_NAME:$CI_COMMIT_REF_NAME --amend $IMAGE_NAME:$CI_COMMIT_SHA-$IMAGE_SUFFIX_AMD64 --amend $IMAGE_NAME:$CI_COMMIT_SHA-$IMAGE_SUFFIX_ARM64V8
- docker manifest push $IMAGE_NAME:$CI_COMMIT_REF_NAME
# Tag git tags as 'latest'
- |
if [[ -n "$CI_COMMIT_TAG" ]]; then
docker manifest create $IMAGE_NAME:latest --amend $IMAGE_NAME:$CI_COMMIT_SHA-$IMAGE_SUFFIX_AMD64 --amend $IMAGE_NAME:$CI_COMMIT_SHA-$IMAGE_SUFFIX_ARM64V8
docker manifest push $IMAGE_NAME:latest
fi
dependencies:
- oci-image:x86_64-unknown-linux-gnu
- oci-image:aarch64-unknown-linux-musl
only:
- main
- tags
+8
View File
@@ -0,0 +1,8 @@
<!-- Please describe your changes here -->
-----------------------------------------------------------------------------
- [ ] I ran `cargo fmt`, `cargo clippy`, and `cargo test`
- [ ] I agree to release my code and all other changes of this MR under the Apache-2.0 license
+10
View File
@@ -0,0 +1,10 @@
{
"recommendations": [
"rust-lang.rust-analyzer",
"ms-azuretools.vscode-docker",
"eamodio.gitlens",
"serayuzgur.crates",
"vadimcn.vscode-lldb",
"timonwong.shellcheck"
]
}
+35
View File
@@ -0,0 +1,35 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lldb",
"request": "launch",
"name": "Debug conduit",
"sourceLanguages": ["rust"],
"cargo": {
"args": [
"build",
"--bin=conduit",
"--package=conduit"
],
"filter": {
"name": "conduit",
"kind": "bin"
}
},
"args": [],
"env": {
"RUST_BACKTRACE": "1",
"CONDUIT_CONFIG": "",
"CONDUIT_SERVER_NAME": "localhost",
"CONDUIT_DATABASE_PATH": "/tmp",
"CONDUIT_ADDRESS": "0.0.0.0",
"CONDUIT_PORT": "6167"
},
"cwd": "${workspaceFolder}"
}
]
}
+61
View File
@@ -0,0 +1,61 @@
# Setting up Appservices
## Getting help
If you run into any problems while setting up an Appservice, write an email to `timo@koesters.xyz`, ask us in [#conduit:fachschaften.org](https://matrix.to/#/#conduit:fachschaften.org) or [open an issue on GitLab](https://gitlab.com/famedly/conduit/-/issues/new).
## Set up the appservice - general instructions
Follow whatever instructions are given by the appservice. This usually includes
downloading, changing its config (setting domain, homeserver url, port etc.)
and later starting it.
At some point the appservice guide should ask you to add a registration yaml
file to the homeserver. In Synapse you would do this by adding the path to the
homeserver.yaml, but in Conduit you can do this from within Matrix:
First, go into the #admins room of your homeserver. The first person that
registered on the homeserver automatically joins it. Then send a message into
the room like this:
@conduit:your.server.name: register-appservice
```
paste
the
contents
of
the
yaml
registration
here
```
You can confirm it worked by sending a message like this:
`@conduit:your.server.name: list-appservices`
The @conduit bot should answer with `Appservices (1): your-bridge`
Then you are done. Conduit will send messages to the appservices and the
appservice can send requests to the homeserver. You don't need to restart
Conduit, but if it doesn't work, restarting while the appservice is running
could help.
## Appservice-specific instructions
### Remove an appservice
To remove an appservice go to your admin room and execute
`@conduit:your.server.name: unregister-appservice <name>`
where `<name>` one of the output of `list-appservices`.
### Tested appservices
These appservices have been tested and work with Conduit without any extra steps:
- [matrix-appservice-discord](https://github.com/Half-Shot/matrix-appservice-discord)
- [mautrix-hangouts](https://github.com/mautrix/hangouts/)
- [mautrix-telegram](https://github.com/mautrix/telegram/)
- [mautrix-signal](https://github.com/mautrix/signal/) from version `0.2.2` forward.
- [heisenbridge](https://github.com/hifi/heisenbridge/)
+134
View File
@@ -0,0 +1,134 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement over email at
strawberry@puppygock.gay or over Matrix at @strawberry:puppygock.gay.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
Generated
+3658
View File
File diff suppressed because it is too large Load Diff
+245
View File
@@ -0,0 +1,245 @@
[package]
name = "conduit"
description = "a cool fork of Conduit, a Matrix homeserver written in Rust"
license = "Apache-2.0"
authors = ["strawberry <strawberry@puppygock.gay>", "timokoesters <timo@koesters.xyz>"]
homepage = "https://puppygock.gay/conduwuit"
repository = "https://gitlab.com/girlbossceo/conduwuit"
readme = "README.md"
version = "0.7.0-alpha+conduwuit-0.1.3"
edition = "2021"
# See also `rust-toolchain.toml`
rust-version = "1.75.0"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# Web framework
axum = { version = "0.6.20", default-features = false, features = ["form", "headers", "http1", "http2", "json", "matched-path"], optional = true }
axum-server = { version = "0.5.1", features = ["tls-rustls"] }
tower = { version = "0.4.13", features = ["util"] }
tower-http = { version = "0.4.4", features = ["add-extension", "cors", "sensitive-headers", "trace", "util", "compression-zstd"] }
# Used for matrix spec type definitions and helpers
#ruma = { version = "0.4.0", features = ["compat", "rand", "appservice-api-c", "client-api", "federation-api", "push-gateway-api-c", "state-res", "unstable-pre-spec", "unstable-exhaustive-types"] }
#ruma = { git = "https://github.com/ruma/ruma", rev = "4d9f754657a099df8e61533787b8eebd12946435", features = ["compat", "rand", "appservice-api-c", "client-api", "federation-api", "push-gateway-api-c", "state-res", "unstable-msc2448", "unstable-msc3575", "unstable-exhaustive-types", "ring-compat", "unstable-unspecified", "unstable-msc2870", "unstable-msc3061", "unstable-msc2867", "unstable-extensible-events"] }
ruma = { git = "https://github.com/girlbossceo/ruma", rev = "788ea6b00fab49b04a17d88caa0c840b7d74aa13", features = ["compat", "rand", "appservice-api-c", "client-api", "federation-api", "push-gateway-api-c", "state-res", "unstable-msc2448", "unstable-msc3575", "unstable-exhaustive-types", "ring-compat", "unstable-unspecified", "unstable-msc2870", "unstable-msc3061", "unstable-msc2867", "unstable-extensible-events"] }
#ruma = { path = "../ruma/crates/ruma", features = ["compat", "rand", "appservice-api-c", "client-api", "federation-api", "push-gateway-api-c", "state-res", "unstable-msc2448", "unstable-msc3575", "unstable-exhaustive-types", "ring-compat", "unstable-unspecified" ] }
# Async runtime and utilities
hyperlocal = { git = "https://github.com/softprops/hyperlocal", rev = "2ee4d149644600d326559af0d2b235c945b05c04", features = [
"server",
] }
hyper = { version = "0.14", features = ["server", "http1", "http2"] }
tokio = { version = "1.36.0", features = ["fs", "macros", "signal", "sync"] }
# Used for the http request / response body type for Ruma endpoints used with reqwest
bytes = "1.5.0"
http = "0.2.11"
# Used for ruma wrapper
serde_json = { version = "1.0.114", features = ["raw_value"] }
# Used for appservice registration files
serde_yaml = "0.9.32"
# Used for pdu definition
serde = { version = "1.0.197", features = ["rc"] }
# Used for secure identifiers
rand = "0.8.5"
# Used to hash passwords
argon2 = "0.5.3"
reqwest = { version = "0.11.24", default-features = false, features = ["rustls-tls-native-roots", "socks"] }
# Used for conduit::Error type
thiserror = "1.0.57"
# Used to generate thumbnails for images
image = { version = "0.24.8", default-features = false, features = ["jpeg", "png", "gif", "webp"] }
# Used to encode server public key
base64 = "0.21.7"
# Used when hashing the state
ring = "0.17.8"
# Used when querying the SRV record of other servers
trust-dns-resolver = "0.23.2"
# Used to find matching events for appservices
regex = "1.10.3"
# Used to load forbidden room/user regex from config
serde_regex = "1.1.0"
itertools = "0.12.1"
# jwt jsonwebtokens
jsonwebtoken = "9.2.0"
# Performance measurements
tracing = { version = "0.1.40", features = [] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tracing-flame = "0.2.0"
opentelemetry = "0.21.0"
opentelemetry_sdk = { version = "0.21.2", features = ["rt-tokio"] }
opentelemetry-jaeger = { version = "0.20.0", features = ["rt-tokio"] }
tracing-opentelemetry = "0.22.0"
lru-cache = "0.1.2"
rusqlite = { git = "https://github.com/rusqlite/rusqlite", rev = "ccfbc28ae1edc3090fb1b331fdc145f052ec73b9", optional = true, features = ["bundled"] }
parking_lot = { version = "0.12.1", optional = true }
num_cpus = "1.16.0"
threadpool = "1.8.1"
# Used for ruma wrapper
serde_html_form = "0.2.4"
thread_local = "1.1.7"
# used for TURN server authentication
hmac = "0.12.1"
sha-1 = "0.10.1"
sha2 = { version = "0.10.8" }
# used for conduit's CLI and admin room command parsing
clap = { version = "4.5.1", default-features = false, features = ["std", "derive", "help", "usage", "error-context"] }
futures-util = { version = "0.3.30", default-features = false }
# Used for reading the configuration from conduit.toml & environment variables
figment = { version = "0.10.14", features = ["env", "toml"] }
tikv-jemalloc-ctl = { version = "0.5.4", features = ["use_std"], optional = true }
tikv-jemallocator = { version = "0.5.4", features = ["unprefixed_malloc_on_supported_platforms"], optional = true }
lazy_static = "1.4.0"
async-trait = "0.1.77"
# used for checking if an IP is in specific subnets / CIDR ranges
ipaddress = "0.1.3"
sd-notify = { version = "0.4.1", optional = true }
webpage = { version = "2.0", default-features = false }
rocksdb = { version = "0.22.0", default-features = true, features = ["multi-threaded-cf", "zstd"], optional = true }
[target.'cfg(unix)'.dependencies]
nix = { version = "0.27.1", features = ["resource"] }
[features]
default = ["conduit_bin", "backend_rocksdb", "systemd", "zstd_compression"]
backend_sqlite = ["sqlite"]
backend_rocksdb = ["rocksdb"]
jemalloc = ["tikv-jemalloc-ctl", "tikv-jemallocator"]
sqlite = ["rusqlite", "parking_lot", "tokio/signal"]
conduit_bin = ["axum"]
systemd = ["sd-notify"]
#gzip_compression = ["tower-http/compression-gzip"]
zstd_compression = []
#brotli_compression = ["tower-http/compression-br"]
#compression = ["tower-http/compression-full"]
sha256_media = []
io_uring = ["rocksdb/io-uring"]
[[bin]]
name = "conduit"
path = "src/main.rs"
required-features = ["conduit_bin"]
[lib]
name = "conduit"
path = "src/lib.rs"
[package.metadata.deb]
name = "matrix-conduit"
maintainer = "strawberry <strawberry@puppygock.gay>"
copyright = "2024, Timo Kösters <timo@koesters.xyz>"
license-file = ["LICENSE", "3"]
depends = "$auto, ca-certificates"
extended-description = """\
a cool fork of Conduit, a Matrix homeserver written in Rust"""
section = "net"
priority = "optional"
assets = [
["debian/README.md", "usr/share/doc/matrix-conduit/README.Debian", "644"],
["README.md", "usr/share/doc/matrix-conduit/", "644"],
["target/release/conduit", "usr/sbin/matrix-conduit", "755"],
]
conf-files = [
"/etc/matrix-conduit/conduit.toml"
]
maintainer-scripts = "debian/"
systemd-units = { unit-name = "matrix-conduit" }
[profile.dev]
debug = 0
lto = 'off'
incremental = true
# default release profile
[profile.release]
lto = 'thin'
incremental = false
opt-level = 3
overflow-checks = true
strip = "symbols"
panic = "abort"
debug = 0
# high performance release profile which uses fat LTO across all crates, 1 codegen unit, max opt-level, and optimises across all crates
[profile.release-high-perf]
inherits = "release"
lto = 'fat'
codegen-units = 1
# For releases also try to max optimizations for dependencies:
[profile.release-high-perf.build-override]
debug = 0
opt-level = 3
codegen-units = 1
[profile.release-high-perf.package."*"]
debug = 0
opt-level = 3
codegen-units = 1
[lints]
workspace = true
[workspace.lints.rust]
missing_abi = "warn"
# missing_docs = "warn"
noop_method_call = "warn"
pointer_structural_match = "warn"
explicit_outlives_requirements = "warn"
# unreachable_pub = "warn"
unused_extern_crates = "warn"
unused_import_braces = "warn"
# unused_lifetimes = "warn"
unused_qualifications = "warn"
dead_code = "warn"
[workspace.lints.clippy]
suspicious = "warn" # assume deny in practice
perf = "warn" # assume deny in practice
redundant_clone = "warn"
cloned_instead_of_copied = "warn"
expl_impl_clone_on_copy = "warn"
# pedantic = "warn"
unnecessary_cast = "warn"
cast_lossless = "warn"
ptr_as_ptr = "warn"
mut_mut = "warn"
char_lit_as_u8 = "warn"
dbg_macro = "warn"
empty_structs_with_brackets = "warn"
get_unwrap = "warn"
# if_then_some_else_none = "warn"
# let_underscore_must_use = "warn"
# map_err_ignore = "warn"
# missing_docs_in_private_items = "warn"
negative_feature_names = "warn"
pub_without_shorthand = "warn"
rc_buffer = "warn"
rc_mutex = "warn"
redundant_feature_names = "warn"
redundant_type_annotations = "warn"
# ref_patterns = "warn"
rest_pat_in_fully_bound_structs = "warn"
str_to_string = "warn"
# string_add = "warn"
# string_slice = "warn"
string_to_string = "warn"
tests_outside_test_module = "warn"
undocumented_unsafe_blocks = "warn"
unneeded_field_pattern = "warn"
unseparated_literal_suffix = "warn"
# unwrap_used = "warn"
# expect_used = "warn"
wildcard_dependencies = "warn"
# or_fun_call = "warn"
unnecessary_lazy_evaluations = "warn"
+330
View File
@@ -0,0 +1,330 @@
# Deploying Conduit
### Please note that this documentation is not fully representative of conduwuit at the moment. Assume majority of it is outdated.
> ## Getting help
>
> If you run into any problems while setting up conduwuit, ask us
> in `#conduwuit:puppygock.gay` or [open an issue on GitHub](https://github.com/girlbossceo/conduwuit/issues/new).
## Installing conduwuit
You may simply download the binary that fits your machine. Run `uname -m` to see what you need. Now copy the appropriate URL:
**Stable versions:**
| CPU Architecture | Download stable version |
| ------------------------------------------- | --------------------------------------------------------------- |
| x84_64 / amd64 (Most servers and computers) | [Binary][x84_64-glibc-master] / [.deb][x84_64-glibc-master-deb] |
| armv7 (e.g. Raspberry Pi by default) | [Binary][armv7-glibc-master] / [.deb][armv7-glibc-master-deb] |
| armv8 / aarch64 | [Binary][armv8-glibc-master] / [.deb][armv8-glibc-master-deb] |
[x84_64-glibc-master]: https://gitlab.com/famedly/conduit/-/jobs/artifacts/master/raw/build-output/linux_amd64/conduit?job=docker:master
[armv7-glibc-master]: https://gitlab.com/famedly/conduit/-/jobs/artifacts/master/raw/build-output/linux_arm_v7/conduit?job=docker:master
[armv8-glibc-master]: https://gitlab.com/famedly/conduit/-/jobs/artifacts/master/raw/build-output/linux_arm64/conduit?job=docker:master
[x84_64-glibc-master-deb]: https://gitlab.com/famedly/conduit/-/jobs/artifacts/master/raw/build-output/linux_amd64/conduit.deb?job=docker:master
[armv7-glibc-master-deb]: https://gitlab.com/famedly/conduit/-/jobs/artifacts/master/raw/build-output/linux_arm_v7/conduit.deb?job=docker:master
[armv8-glibc-master-deb]: https://gitlab.com/famedly/conduit/-/jobs/artifacts/master/raw/build-output/linux_arm64/conduit.deb?job=docker:master
**Latest versions:**
| Target | Type | Download |
|-|-|-|
| `x86_64-unknown-linux-gnu` | Dynamically linked Debian package | [link](https://gitlab.com/api/v4/projects/famedly%2Fconduit/jobs/artifacts/next/raw/conduit.deb?job=debian:x86_64-unknown-linux-gnu) |
| `x86_64-unknown-linux-musl` | Statically linked binary | [link](https://gitlab.com/api/v4/projects/famedly%2Fconduit/jobs/artifacts/next/raw/conduit?job=static:x86_64-unknown-linux-musl) |
| `aarch64-unknown-linux-musl` | Statically linked binary | [link](https://gitlab.com/api/v4/projects/famedly%2Fconduit/jobs/artifacts/next/raw/conduit?job=static:aarch64-unknown-linux-musl) |
| `x86_64-unknown-linux-musl` | OCI image | [link](https://gitlab.com/api/v4/projects/famedly%2Fconduit/jobs/artifacts/next/raw/oci-image-amd64.tar.gz?job=oci-image:x86_64-unknown-linux-musl) |
| `aarch64-unknown-linux-musl` | OCI image | [link](https://gitlab.com/api/v4/projects/famedly%2Fconduit/jobs/artifacts/next/raw/oci-image-arm64v8.tar.gz?job=oci-image:aarch64-unknown-linux-musl) |
```bash
$ sudo wget -O /usr/local/bin/matrix-conduit <url>
$ sudo chmod +x /usr/local/bin/matrix-conduit
```
Alternatively, you may compile the binary yourself. First, install any dependencies:
```bash
# Debian
$ sudo apt install libclang-dev build-essential
# RHEL
$ sudo dnf install clang
```
Then, `cd` into the source tree of conduit-next and run:
```bash
$ cargo build --release
```
If you want to cross compile Conduit to another architecture, read the guide below.
<details>
<summary>Cross compilation</summary>
As easiest way to compile conduit for another platform [cross-rs](https://github.com/cross-rs/cross) is recommended, so install it first.
In order to use RockDB as storage backend append `-latomic` to linker flags.
For example, to build a binary for Raspberry Pi Zero W (ARMv6) you need `arm-unknown-linux-gnueabihf` as compilation
target.
```bash
git clone https://gitlab.com/famedly/conduit.git
cd conduit
export RUSTFLAGS='-C link-arg=-lgcc -Clink-arg=-latomic -Clink-arg=-static-libgcc'
cross build --release --no-default-features --features conduit_bin,backend_rocksdb --target=arm-unknown-linux-gnueabihf
```
</details>
## Adding a Conduit user
While Conduit can run as any user it is usually better to use dedicated users for different services. This also allows
you to make sure that the file permissions are correctly set up.
In Debian or RHEL, you can use this command to create a Conduit user:
```bash
sudo adduser --system conduit --group --disabled-login --no-create-home
```
## Forwarding ports in the firewall or the router
Conduit uses the ports 443 and 8448 both of which need to be open in the firewall.
If Conduit runs behind a router or in a container and has a different public IP address than the host system these public ports need to be forwarded directly or indirectly to the port mentioned in the config.
## Optional: Avoid port 8448
If Conduit runs behind Cloudflare reverse proxy, which doesn't support port 8448 on free plans, [delegation](https://matrix-org.github.io/synapse/latest/delegate.html) can be set up to have federation traffic routed to port 443:
```apache
# .well-known delegation on Apache
<Files "/.well-known/matrix/server">
ErrorDocument 200 '{"m.server": "your.server.name:443"}'
Header always set Content-Type application/json
Header always set Access-Control-Allow-Origin *
</Files>
```
[SRV DNS record](https://spec.matrix.org/latest/server-server-api/#resolving-server-names) delegation is also [possible](https://www.cloudflare.com/en-gb/learning/dns/dns-records/dns-srv-record/).
## Setting up a systemd service
Now we'll set up a systemd service for Conduit, so it's easy to start/stop Conduit and set it to autostart when your
server reboots. Simply paste the default systemd service you can find below into
`/etc/systemd/system/conduit.service`.
```systemd
[Unit]
Description=Conduit Matrix Server
After=network.target
[Service]
Environment="CONDUIT_CONFIG=/etc/matrix-conduit/conduit.toml"
User=conduit
Group=conduit
RuntimeDirectory=conduit
RuntimeDirectoryMode=0750
Restart=always
ExecStart=/usr/local/bin/matrix-conduit
[Install]
WantedBy=multi-user.target
```
Finally, run
```bash
$ sudo systemctl daemon-reload
```
## Creating the Conduit configuration file
Now we need to create the Conduit's config file in `/etc/conduwuit/conduwuit.toml`. Paste this in **and take a moment
to read it. You need to change at least the server name.**
You can also choose to use a different database backend, but right now only `rocksdb` and `sqlite` are recommended.
See the following example config at [conduwuit-example.toml](conduwuit-example.toml)
## Setting the correct file permissions
As we are using a Conduit specific user we need to allow it to read the config. To do that you can run this command on
Debian or RHEL:
```bash
sudo chown -R root:root /etc/matrix-conduit
sudo chmod 755 /etc/matrix-conduit
```
If you use the default database path you also need to run this:
```bash
sudo mkdir -p /var/lib/matrix-conduit/
sudo chown -R conduit:conduit /var/lib/matrix-conduit/
sudo chmod 700 /var/lib/matrix-conduit/
```
## Setting up the Reverse Proxy
This depends on whether you use Apache, Caddy, Nginx or another web server.
### Apache
Create `/etc/apache2/sites-enabled/050-conduit.conf` and copy-and-paste this:
```apache
# Requires mod_proxy and mod_proxy_http
#
# On Apache instance compiled from source,
# paste into httpd-ssl.conf or httpd.conf
Listen 8448
<VirtualHost *:443 *:8448>
ServerName your.server.name # EDIT THIS
AllowEncodedSlashes NoDecode
# TCP
ProxyPass /_matrix/ http://127.0.0.1:6167/_matrix/ timeout=300 nocanon
ProxyPassReverse /_matrix/ http://127.0.0.1:6167/_matrix/
# UNIX socket
#ProxyPass /_matrix/ unix:/run/conduit/conduit.sock|http://127.0.0.1:6167/_matrix/ nocanon
#ProxyPassReverse /_matrix/ unix:/run/conduit/conduit.sock|http://127.0.0.1:6167/_matrix/
</VirtualHost>
```
**You need to make some edits again.** When you are done, run
```bash
# Debian
$ sudo systemctl reload apache2
# Installed from source
$ sudo apachectl -k graceful
```
### Caddy
Create `/etc/caddy/conf.d/conduit_caddyfile` and enter this (substitute for your server name).
```caddy
your.server.name, your.server.name:8448 {
# TCP
reverse_proxy /_matrix/* 127.0.0.1:6167
# UNIX socket
#reverse_proxy /_matrix/* unix//run/conduit/conduit.sock
}
```
That's it! Just start or enable the service and you're set.
```bash
$ sudo systemctl enable caddy
```
### Nginx
If you use Nginx and not Apache, add the following server section inside the http section of `/etc/nginx/nginx.conf`
```nginx
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
listen 8448 ssl http2;
listen [::]:8448 ssl http2;
server_name your.server.name; # EDIT THIS
merge_slashes off;
# Nginx defaults to only allow 1MB uploads
# Increase this to allow posting large files such as videos
client_max_body_size 20M;
# UNIX socket
#upstream backend {
# server unix:/run/conduit/conduit.sock;
#}
location /_matrix/ {
# TCP
proxy_pass http://127.0.0.1:6167$request_uri;
# UNIX socket
#proxy_pass http://backend;
proxy_set_header Host $http_host;
proxy_buffering off;
proxy_read_timeout 5m;
}
ssl_certificate /etc/letsencrypt/live/your.server.name/fullchain.pem; # EDIT THIS
ssl_certificate_key /etc/letsencrypt/live/your.server.name/privkey.pem; # EDIT THIS
ssl_trusted_certificate /etc/letsencrypt/live/your.server.name/chain.pem; # EDIT THIS
include /etc/letsencrypt/options-ssl-nginx.conf;
}
```
**You need to make some edits again.** When you are done, run
```bash
$ sudo systemctl reload nginx
```
## SSL Certificate
If you chose Caddy as your web proxy SSL certificates are handled automatically and you can skip this step.
The easiest way to get an SSL certificate, if you don't have one already, is to [install](https://certbot.eff.org/instructions) `certbot` and run this:
```bash
# To use ECC for the private key,
# paste into /etc/letsencrypt/cli.ini:
# key-type = ecdsa
# elliptic-curve = secp384r1
$ sudo certbot -d your.server.name
```
[Automated renewal](https://eff-certbot.readthedocs.io/en/stable/using.html#automated-renewals) is usually preconfigured.
If using Cloudflare, configure instead the edge and origin certificates in dashboard. In case youre already running a website on the same Apache server, you can just copy-and-paste the SSL configuration from your main virtual host on port 443 into the above-mentioned vhost.
## You're done!
Now you can start Conduit with:
```bash
$ sudo systemctl start conduit
```
Set it to start automatically when your system boots with:
```bash
$ sudo systemctl enable conduit
```
## How do I know it works?
You can open <https://app.element.io>, enter your homeserver and try to register.
You can also use these commands as a quick health check.
```bash
$ curl https://your.server.name/_matrix/client/versions
# If using port 8448
$ curl https://your.server.name:8448/_matrix/client/versions
```
- To check if your server can talk with other homeservers, you can use the [Matrix Federation Tester](https://federationtester.matrix.org/).
If you can register but cannot join federated rooms check your config again and also check if the port 8448 is open and forwarded correctly.
# What's next?
## Audio/Video calls
For Audio/Video call functionality see the [TURN Guide](TURN.md).
## Appservices
If you want to set up an appservice, take a look at the [Appservice Guide](APPSERVICES.md).
+71
View File
@@ -0,0 +1,71 @@
### list of features, bug fixes, etc that conduwuit does that upstream does not:
- GitLab CI ported to GitHub Actions
- Fixed every single clippy (default lints) and rustc warnings, including some that were performance related or potential safety issues / unsoundness
- Has Renovate and significantly updates all dependencies possible
- Uses proper argon2 crate instead of questionable rust-argon2 crate
- Improved and cleaned up logging (less noisy dead server logging, registration attempts, more useful troubleshooting logging, etc)
- Attempts and interest in removing extreme and unnecessary panics/unwraps/expects that can lead to denial of service or such (upstream and upstream contributors want this unusual behaviour for some reason)
- Merged and cleaned up upstream MRs that have been sitting for 6-12 months
- Configurable RocksDB logging (`LOG` files) with proper defaults (rotate, max size, verbosity, etc) to stop LOG files from accumulating so much
- Federated presence support and configurable local presence (via upstream MR)
- Concurrency support for key fetching for faster remote room joins and room joins that will error less frequently (via upstream MR)
- Experimental room version 11 support (via upstream MR)
- Enabled all non-officially-supported room versions as experimental so we can at least attempt to join them
- Configurable guest registration including forbidding guest registrations if no admin user is created yet, respects allow registration setting, and an optional override setting with a default of no guest registrations allowed.
- Explicit startup error/warning if your configuration allows open registration without a token or such like Synapse
- Improved RocksDB defaults to use new features that help with performance significantly, uses settings tailored to SSDs, and a conduwuit setting to tell RocksDB to use settings that are tailored to HDDs or slow spinning rust storage.
- Updated Ruma to latest commit where possible, and add some unstable MSCs (some still require an implementation though)
- conduwuit allows MXIDs with `+` in them (thanks to Ruma update)
- Revamped admin room infrastructure and commands (via upstream MR)
- Admin room commands to delete room aliases and unpublish rooms from our room directory (via upstream MR)
- Make spaces/hierarchy cache use cache_capacity_modifier instead of hardcoded small value
- Make PDU appending, building, etc asynchronous
- Add *optional* feature flag to use SHA256 key names for media instead of base64 to overcome filesystem file name length limitations (OS error file name too long) (via upstream MR)
- Add *optional* feature flag to enable zstd HTTP body compression
- Add support for querying both Matrix SRV records, the deprecated `_matrix` record and `_matrix-fed` record if necessary
- Add config option for device name federation with a privacy-friendly default (disabled)
- Add config option for requiring authentication to the `/publicRooms` endpoint (room directory) with a default enabled for privacy
- Add config option for federating `/publicRooms` endpoint (room directory) to other servers with a default disabled for privacy
- Add support for listening on a UNIX socket for performance and host security with proper default permissions (660)
- Add missing `destination` key to all `X-Matrix` `Authorization` requests (spec compliance issue)
- Fix spec compliance issue with servers being able to fetch remote user profiles over federation for users who don't belong to our server (`/_matrix/federation/v1/query/profile`)
- Use aggressive build-time performance optimisations for release builds (1 codegen unit, no debug, fat LTO, etc, and optimise all crates with same)
- Raise various hardcoded timeouts in codebase that were way too short, making some things like room joins and client bugs error less or none at all than they should
- Add debug admin command to force update user device lists (could potentially resolve some E2EE flukes) (`ForceDeviceListUpdates`)
- Declare various missing Matrix versions and features at `/_matrix/client/versions`
- Add support for serving server and client well-known files from conduwuit using `well_known_client` and `well_known_server` options
- Add non-standard sliding sync proxy health check (?) endpoint at `/client/server.json` that some clients such as Element Web query using the `well_known_client` or `well_known_server` config options
- Send a User-Agent on all of our requests (`conduwuit/0.7.0-alpha+conduwuit-0.1.1`) which strangely was not done upstream since forever. Some providers consider no User-Agent suspicious and block said requests.
- Safer and cleaner shutdowns on both database side as we run cleanup on shutdown and exits database loop better (no potential hanging issues in database loop), overall cleaner shutdown logic
- Basic binary commands like `conduwuit --version` work (interested in expanding it more)
- Allow HEAD HTTP requests in CORS for clients (despite not being explicity mentioned in Matrix spec, HTTP spec says all HEAD requests need to behave the same as GET requests, Synapse supports HEAD requests)
- Purge unmaintained/irrelevant/broken database backends (heed, sled, persy)
- webp support for images
- Support for suggesting servers to join at `/_matrix/client/v3/directory/room/{roomAlias}`
- Prevent admin credential commands like reset password and deactivate user from modifying non-local users (https://gitlab.com/famedly/conduit/-/issues/377)
- Fixed spec compliance issue with room version 8 - 11 joins (https://github.com/matrix-org/synapse/issues/16717 / https://github.com/matrix-org/matrix-spec/issues/1708)
- Add basic cache eviction for true destinations when requests fail if we use a cached destination (e.g. a server has modified their well-known and we're still connecting to the old destination)
- Only follow 6 redirects total in our default reqwest ClientBuilder
- Generate passwords with 25 characters instead of 15
- Add missing `reason` field to user ban events (`/ban`)
- For all [`/report`](https://spec.matrix.org/v1.9/client-server-api/#post_matrixclientv3roomsroomidreporteventid) requests: check if the reported event ID belongs to the reported room ID, raise report reasoning character limit to 750, fix broken formatting, make a small delayed random response per spec suggestion on privacy, and check if the sender user is in the reported room.
- Support blocking servers from downloading remote media from
- Support sending `well_known` response to client logins if using config option `well_known_client`
- Send `avatar_url` on invite room membership events/changes
- Revamp example config, adding a lot of config options available (still some missing)
- Return joined member count of rooms for push rules/conditions instead of a hardcoded value of 10
- Respect *most* client parameters for `/media/` requests (`allow_redirect` still needs work)
- Config option `ip_range_denylist` to support refusing to send requests (typically federation) to specific IP ranges, typically RFC 1918, non-routable, testnet, etc addresses like Synapse for security.
- Support for creating rooms with custom room IDs like Maunium Synapse (`room_id` request body field to `/createRoom`)
- Assume well-knowns are broken if they exceed past 10000 characters.
- Basic validation/checks on user-specified room aliases and custom room ID creations
- Warn on unknown config options specified
- Add support for preventing certain room alias names and usernames using regex (via upstream MR) and extended to custom room IDs
- Revamp appservice registration to ruma's `Registration` type which fixes various appservice registration issues, including fixing crashing upon no URL specified (via upstream MR)
- URL preview support (via upstream MR) with various improvements
- Increased graceful shutdown timeout from a low 60 seconds to 180 seconds to avoid killing connections and let the remaining ones finish processing, and ask systemd for more time to shutdown if needed to prevent systemd's default [`TimeoutStopSec=`](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#TimeoutStopSec=) of 90 seconds from killing conduwuit
- Bumped default max_concurrent_requests to 500
- Add support for the deprecated `user` identifier field for all `/login` requests
- Query parameter `?format=event|content` for returning either the room state event's content (default) for the full room state event on ` /_matrix/client/v3/rooms/{roomId}/state/{eventType}[/{stateKey}]` requests (see https://github.com/matrix-org/matrix-spec/issues/1047)
- Add admin commands for banning (blocking) room IDs from our local users joining (admins are always allowed) and evicts all our local users from that room, in addition to bulk room banning support, as a moderation feature
+202
View File
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2023 June
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
+90
View File
@@ -0,0 +1,90 @@
# conduwuit
### a well maintained fork of [Conduit](https://conduit.rs/)
#### What is Matrix?
[Matrix](https://matrix.org) is an open network for secure and decentralized
communication. Users from every Matrix homeserver can chat with users from all
other Matrix servers. You can even use bridges (also called Matrix appservices)
to communicate with users outside of Matrix, like a community on Discord.
#### What is the goal?
An efficient Matrix homeserver that's easy to set up and just works. You can install
it on a mini-computer like the Raspberry Pi to host Matrix for your family,
friends or company.
#### Can I try it out?
There are no public conduwuit homeservers available, however conduwuit is incredibly simple to install. It's just a binary, a config file, and a database path.
#### What is the current status?
conduwuit is a fork of Conduit which is in beta, meaning you can join and participate in most
Matrix rooms, but not all features are supported and you might run into bugs
from time to time. conduwuit attempts to fix and improve the majority of upstream Conduit bugs
or UX issues that are taking too long to be resolved, or unnecessary Matrix or developer
politics halting simple things from being merged or fixed, and general inactivity.
There are still a few nice to have features missing that some users may notice:
- Outgoing read receipts and typing indicators (receiving works)
#### What's different about your fork than upstream Conduit?
See [DIFFERENCES.md](DIFFERENCES.md)
#### Why does this fork exist? Why don't you contribute back upstream?
I have tried, but:
- unnecessary Matrix / developer politics
- bikeshedding unnecessary or irrelevant things in MRs
- disagreement with how the upstream project is maintained including the codebase
- upstream maintainer inactivity
- questionable community members
- lack of MR reviews or issue triaging and no upstream maintainer interest in receiving help
- severe bugs, including denial of service and other likely vulnerabilities, not being merged due to things mentioned above
- no interest in adding co-maintainers to help out
are what are keeping me from contributing. If the state of the upstream project improves, I'm
willing to start contributing again. As is, I think if folks want a more polished and well-kept version of Conduit, conduwuit exists for that.
#### How can I deploy my own?
- Simple install (this was tested the most): [DEPLOY.md](DEPLOY.md)
- Nix/NixOS: [nix/README.md](nix/README.md)
If you want to connect an Appservice to Conduit, take a look at [APPSERVICES.md](APPSERVICES.md).
#### How can I contribute?
1. Look for an issue you would like to work on and make sure it's not assigned
to other users
2. Ask someone to assign the issue to you (comment on the issue or chat in
[#conduwuit:puppygock.gay](https://matrix.to/#/#conduwuit:puppygock.gay))
3. Fork the repo and work on the issue.
4. Submit a PR (please keep contributions to the GitHub repo, main development is done here,
not the GitLab repo which exists just as a mirror.)
#### Contact
If you run into any question, feel free to
- Ask us in `#conduwuit:puppygock.gay` on Matrix
- [Open an issue on GitHub](https://github.com/girlbossceo/conduwuit/issues/new)
#### Donate
Liberapay: <https://liberapay.com/girlbossceo>\
Ko-fi: <https://ko-fi.com/puppygock>\
GitHub Sponsors: <https://github.com/sponsors/girlbossceo>
#### Logo
No official conduwuit logo exists. Repo and Matrix room picture is from bran (<3).
#### Mirrors of conduwuit
GitHub: https://github.com/girlbossceo/conduwuit
GitLab: https://gitlab.com/girlbossceo/conduwuit
git.gay: https://git.gay/june/conduwuit
Codeberg: https://codeberg.org/girlbossceo/conduwuit
sourcehut: https://git.sr.ht/~girlbossceo/conduwuit
+25
View File
@@ -0,0 +1,25 @@
# Setting up TURN/STURN
## General instructions
* It is assumed you have a [Coturn server](https://github.com/coturn/coturn) up and running. See [Synapse reference implementation](https://github.com/matrix-org/synapse/blob/develop/docs/turn-howto.md).
## Edit/Add a few settings to your existing conduit.toml
```
# Refer to your Coturn settings.
# `your.turn.url` has to match the REALM setting of your Coturn as well as `transport`.
turn_uris = ["turn:your.turn.url?transport=udp", "turn:your.turn.url?transport=tcp"]
# static-auth-secret of your turnserver
turn_secret = "ADD SECRET HERE"
# If you have your TURN server configured to use a username and password
# you can provide these information too. In this case comment out `turn_secret above`!
#turn_username = ""
#turn_password = ""
```
## Apply settings
Restart Conduit.
+37
View File
@@ -0,0 +1,37 @@
#!/usr/bin/env bash
set -euo pipefail
# Path to Complement's source code
COMPLEMENT_SRC="$1"
# A `.jsonl` file to write test logs to
LOG_FILE="$2"
# A `.jsonl` file to write test results to
RESULTS_FILE="$3"
OCI_IMAGE="complement-conduit:dev"
env \
-C "$(git rev-parse --show-toplevel)" \
docker build \
--tag "$OCI_IMAGE" \
--file complement/Dockerfile \
.
# It's okay (likely, even) that `go test` exits nonzero
set +o pipefail
env \
-C "$COMPLEMENT_SRC" \
COMPLEMENT_BASE_IMAGE="$OCI_IMAGE" \
go test -json ./tests | tee "$LOG_FILE"
set -o pipefail
# Post-process the results into an easy-to-compare format
cat "$LOG_FILE" | jq -c '
select(
(.Action == "pass" or .Action == "fail" or .Action == "skip")
and .Test != null
) | {Action: .Action, Test: .Test}
' | sort > "$RESULTS_FILE"
+50
View File
@@ -0,0 +1,50 @@
#!/usr/bin/env bash
set -euo pipefail
# The first argument must be the desired installable
INSTALLABLE="$1"
# Build the installable and forward any other arguments too
nix build -L "$@"
if [ ! -z ${ATTIC_TOKEN+x} ]; then
nix run --inputs-from . attic -- login \
conduit \
https://attic.kennel.juneis.dog/conduit \
"$ATTIC_TOKEN"
push_args=(
# Attic and its build dependencies
"$(nix path-info --inputs-from . attic)"
"$(nix path-info --inputs-from . attic --derivation)"
# The target installable and its build dependencies
"$(nix path-info "$INSTALLABLE" --derivation)"
"$(nix path-info "$INSTALLABLE")"
)
nix run --inputs-from . attic -- push conduit "${push_args[@]}"
# push to "conduwuit" too
nix run --inputs-from . attic -- login \
conduwuit \
https://attic.kennel.juneis.dog/conduwuit \
"$ATTIC_TOKEN"
push_args=(
# Attic and its build dependencies
"$(nix path-info --inputs-from . attic)"
"$(nix path-info --inputs-from . attic --derivation)"
# The target installable and its build dependencies
"$(nix path-info "$INSTALLABLE" --derivation)"
"$(nix path-info "$INSTALLABLE")"
)
nix run --inputs-from . attic -- push conduwuit "${push_args[@]}"
else
echo "\$ATTIC_TOKEN is unset, skipping uploading to the binary cache"
fi
+46
View File
@@ -0,0 +1,46 @@
FROM rust:1.75.0
WORKDIR /workdir
RUN apt-get update && apt-get install -y --no-install-recommends \
libclang-dev
COPY Cargo.toml Cargo.toml
COPY Cargo.lock Cargo.lock
COPY src src
RUN cargo build --release \
&& mv target/release/conduit conduit \
&& rm -rf target
# Install caddy
RUN apt-get update \
&& apt-get install -y \
debian-keyring \
debian-archive-keyring \
apt-transport-https \
curl \
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/testing/gpg.key' \
| gpg --dearmor -o /usr/share/keyrings/caddy-testing-archive-keyring.gpg \
&& curl -1sLf 'https://dl.cloudsmith.io/public/caddy/testing/debian.deb.txt' \
| tee /etc/apt/sources.list.d/caddy-testing.list \
&& apt-get update \
&& apt-get install -y caddy
COPY conduit-example.toml conduit.toml
COPY complement/caddy.json caddy.json
ENV SERVER_NAME=localhost
ENV CONDUIT_CONFIG=/workdir/conduit.toml
RUN sed -i "s/port = 6167/port = 8008/g" conduit.toml
RUN echo "log = \"warn,_=off,sled=off\"" >> conduit.toml
RUN sed -i "s/address = \"127.0.0.1\"/address = \"0.0.0.0\"/g" conduit.toml
EXPOSE 8008 8448
CMD uname -a && \
sed -i "s/#server_name = \"your.server.name\"/server_name = \"${SERVER_NAME}\"/g" conduit.toml && \
sed -i "s/your.server.name/${SERVER_NAME}/g" caddy.json && \
caddy start --config caddy.json > /dev/null && \
/workdir/conduit
+12
View File
@@ -0,0 +1,12 @@
# Complement
## What's that?
Have a look at [its repository](https://github.com/matrix-org/complement).
## How do I use it with Conduit?
The script at [`../bin/complement`](../bin/complement) has automation for this.
It takes a few command line arguments, you can read the script to find out what
those are.
+72
View File
@@ -0,0 +1,72 @@
{
"logging": {
"logs": {
"default": {
"level": "WARN"
}
}
},
"apps": {
"http": {
"https_port": 8448,
"servers": {
"srv0": {
"listen": [":8448"],
"routes": [{
"match": [{
"host": ["your.server.name"]
}],
"handle": [{
"handler": "subroute",
"routes": [{
"handle": [{
"handler": "reverse_proxy",
"upstreams": [{
"dial": "127.0.0.1:8008"
}]
}]
}]
}],
"terminal": true
}],
"tls_connection_policies": [{
"match": {
"sni": ["your.server.name"]
}
}]
}
}
},
"pki": {
"certificate_authorities": {
"local": {
"name": "Complement CA",
"root": {
"certificate": "/complement/ca/ca.crt",
"private_key": "/complement/ca/ca.key"
},
"intermediate": {
"certificate": "/complement/ca/ca.crt",
"private_key": "/complement/ca/ca.key"
}
}
}
},
"tls": {
"automation": {
"policies": [{
"subjects": ["your.server.name"],
"issuers": [{
"module": "internal"
}],
"on_demand": true
}, {
"issuers": [{
"module": "internal",
"ca": "local"
}]
}]
}
}
}
}
-114
View File
@@ -1,114 +0,0 @@
# podman save --format oci-archive jade-website-frontend:latest | gzip | ssh core@176.126.240.240 -T "zcat | podman load"
# podman compose create
# let containers = podman ps -a --format json | from json | where Labels."com.docker.compose.project" == "jade-website"
# podman compose create; let containers = podman ps -a --format json | from json | where Labels."com.docker.compose.project" == "jade-website"; podman kube generate ($containers | get Id) | save deployment.yml
# echo deployment.yml | ssh core@176.126.240.240 -T "cat > deployment.yml"
# $containers.1.Labels | to yaml
# podman kube generate -s ($containers | get Id) --podman-only | ssh core@176.126.240.240 -T "cat > deployment.yml"
version: '2'
services:
jade-website-frontend:
image: jade-website-frontend:latest
build:
context: .
dockerfile: packages/website/Dockerfile
restart: unless-stopped
# ports:
# - 3000:3000
networks:
- proxy
# deploy:
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy" # Change this to the name of your Traefik docker proxy network
# - "traefik.http.routers.to-website.rule=Host(`jade.ellis.link`)"
# - "traefik.http.routers.to-website.entrypoints=http"
- "traefik.http.routers.to-website.rule=Host(`jade.ellis.link.localhost`)"
- "traefik.http.routers.to-website.entrypoints=http"
# - "traefik.http.routers.to-website.tls=true"
# - "traefik.http.routers.to-website.tls.certresolver=letsencrypt"
# - "traefik.http.routers.to-website.middlewares=cors-headers@docker"
# - "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"
traefik:
image: "traefik:latest"
container_name: "traefik"
restart: "unless-stopped"
# privileged: true
security_opt:
- "label=type:container_runtime_t"
command:
- "--log.level=DEBUG"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.http.address=:8080"
# - "--entrypoints.https.address=:443"
# - "--acme"
# - "--certificatesresolvers.letsencrypt.acme.email='jade@ellis.link'"
# - "--certificatesresolvers.letsencrypt.acme.storage=/certificates/acme.json"
# - "--certificatesresolvers.letsencrypt.acme.httpchallenge=true"
# - "--certificatesresolvers.letsencrypt.acme.httpChallenge.entryPoint=http"
# - "--certificatesresolvers.lets-encrypt.acme.tlschallenge=true"
# - "--entrypoints.http.http.redirections.entryPoint.to=https"
# - "--entrypoints.http.http.redirections.entryPoint.scheme=https"
# - --api.dashboard=true
# - --api.insecure=true
ports:
# - "80:80"
# - "443:443"
- "8080:8080"
volumes:
- "/run/user/1000/podman/podman.sock:/var/run/docker.sock"
# - "/var/run/docker.sock:/var/run/docker.sock:ro"
- "traefik-public-certificates:/certificates"
# - "./traefik_config:/etc/traefik"
# 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=http"
# - "traefik.http.routers.redirs.middlewares=redirect-to-https"
networks:
- proxy
networks:
proxy:
# external: true
enable_ipv6: true
volumes:
traefik-public-certificates:
# mkdir -p ~/.config/containers/systemd
# nano ~/.config/containers/systemd/deployment.kube
# [Unit]
# Description=Deployment via kubernetes
# Before=local-fs.target
# [Kube]
# Yaml=/var/home/core/deployment.yml
# [Install]
# # Start by default on boot
# WantedBy=multi-user.target default.target
# systemctl --user daemon-reload
# systemctl --user start deployment.service
+277
View File
@@ -0,0 +1,277 @@
# =============================================================================
# This is the official example config for conduwuit.
# If you use it for your server, you will need to adjust it to your own needs.
# At the very least, change the server_name field!
# =============================================================================
[global]
# The server_name is the pretty name of this server. It is used as a suffix for user
# and room ids. Examples: matrix.org, conduit.rs
# The Conduit server needs all /_matrix/ requests to be reachable at
# https://your.server.name/ on port 443 (client-server) and 8448 (federation).
# If that's not possible for you, you can create /.well-known files to redirect
# requests (delegation). See
# https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient
# and
# https://spec.matrix.org/v1.9/server-server-api/#getwell-knownmatrixserver
# for more information
# YOU NEED TO EDIT THIS
#server_name = "your.server.name"
# Servers listed here will be used to gather public keys of other servers.
# Generally, copying this exactly should be enough. (Currently, conduwuit doesn't
# support batched key requests, so this list should only contain Synapse
# servers.) Defaults to `matrix.org`
# trusted_servers = ["matrix.org"]
### Database configuration
# This is the only directory where conduwuit will save its data, including media
database_path = "/var/lib/conduwuit/"
# Database backend: Only rocksdb and sqlite are supported. Please note that sqlite
# will perform significantly worse than rocksdb as it is not intended to be used the
# way it is by conduwuit. sqlite only exists for historical reasons.
database_backend = "rocksdb"
### Network
# The port conduwuit will be running on. You need to set up a reverse proxy such as
# Caddy or Nginx so all requests to /_matrix on port 443 and 8448 will be
# forwarded to the conduwuit instance running on this port
# Docker users: Don't change this, you'll need to map an external port to this.
port = 6167
# default address (IPv4 or IPv6) conduwuit will listen on. Generally you want this to be
# localhost (127.0.0.1 / ::1). If you are using Docker or a container NAT networking setup, you
# likely need this to be 0.0.0.0.
address = "127.0.0.1"
# How many requests conduwuit sends to other servers at the same time concurrently. Default is 500
# Note that because conduwuit is very fast unlike other homeserver implementations, setting this too
# high could inadvertently result in ratelimits kicking in, or overloading lower-end homeservers out there.
#
# A valid use-case for enabling this is if you have a significant amount of overall federation activity
# such as many rooms joined/tracked, and many servers in the true destination cache caused by that. Upon
# rebooting conduwuit, depending on how fast your resources are, client and incoming federation requests
# may timeout or be "stalled" for a period of time due to hitting the max concurrent requests limit from
# refreshing federation/destination caches and such.
#
# If you have a lot of active users on your homeserver, you will definitely need to raise this.
#
# No this will not speed up room joins.
#max_concurrent_requests = 500
# Max request size for file uploads
max_request_size = 20_000_000 # in bytes
# Uncomment unix_socket_path to listen on a UNIX socket at the specified path.
# If listening on a UNIX socket, you must remove/comment the 'address' key if defined and add your
# reverse proxy to the 'conduwuit' group, unless world RW permissions are specified with unix_socket_perms (666 minimum).
#unix_socket_path = "/run/conduwuit/conduwuit.sock"
#unix_socket_perms = 660
# Set this to true for conduwuit to compress HTTP response bodies using zstd.
# Please be aware that enabling HTTP compression may weaken or even defeat TLS.
# Most users should not need to enable this.
# See https://breachattack.com/ and https://wikipedia.org/wiki/BREACH before deciding to enable this.
zstd_compression = false
# Vector list of IPv4 and IPv6 CIDR ranges / subnets *in quotes* that you do not want conduwuit to send outbound requests to.
# Defaults to RFC1918, unroutable, loopback, multicast, and testnet addresses for security.
#
# To disable, set this to be an empty vector (`[]`).
#
# Currently this does not account for proxies in use like Synapse does.
ip_range_denylist = [
"127.0.0.0/8",
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
"100.64.0.0/10",
"192.0.0.0/24",
"169.254.0.0/16",
"192.88.99.0/24",
"198.18.0.0/15",
"192.0.2.0/24",
"198.51.100.0/24",
"203.0.113.0/24",
"224.0.0.0/4",
"::1/128",
"fe80::/10",
"fc00::/7",
"2001:db8::/32",
"ff00::/8",
"fec0::/10",
]
### Moderation / Privacy / Security
# Set to true to allow user type "guest" registrations. Element attempts to register guest users automatically.
# For private homeservers, this is best at false.
allow_guest_registration = false
# Vector list of servers that conduwuit will refuse to download remote media from.
# No default.
# prevent_media_downloads_from = ["example.com", "example.local"]
# Enables open registration. If set to false, no users can register on this
# server.
# If set to true without a token configured, users can register with no form of 2nd-
# step only if you set
# `yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse` to
# true in your config. If you would like
# registration only via token reg, please configure the `registration_token` key.
allow_registration = false
# Please note that an open registration homeserver with no second-step verification
# is highly prone to abuse and potential defederation by homeservers, including
# matrix.org.
# A static registration token that new users will have to provide when creating
# an account. If unset and `allow_registration` is true, registration is open
# without any condition. YOU NEED TO EDIT THIS.
registration_token = "change this token for something specific to your server"
# controls whether federation is allowed or not
# defaults to true
# allow_federation = true
# controls whether users are allowed to create rooms.
# appservices and admins are always allowed to create rooms
# defaults to true
# allow_room_creation = true
# Set this to true to allow your server's public room directory to be federated.
# Set this to false to protect against /publicRooms spiders, but will forbid external users
# from viewing your server's public room directory. If federation is disabled entirely
# (`allow_federation`), this is inherently false.
allow_public_room_directory_over_federation = false
# Set this to true to allow your server's public room directory to be queried without client
# authentication (access token) through the Client APIs. Set this to false to protect against /publicRooms spiders.
allow_public_room_directory_without_auth = false
# Set this to true to allow federating device display names / allow external users to see your device display name.
# If federation is disabled entirely (`allow_federation`), this is inherently false. For privacy, this is best disabled.
allow_device_name_federation = false
# Vector list of domains allowed to send requests to for URL previews. Defaults to none.
# Note: this is a *contains* match, not an explicit match. Putting "google.com" will match "https://google.com" and "http://mymaliciousdomainexamplegoogle.com"
# Setting this to "*" will allow all URL previews. Please note that this opens up significant attack surface to your server, you are expected to be aware of the risks by doing so.
url_preview_domain_contains_allowlist = []
# Vector list of explicit domains allowed to send requests to for URL previews. Defaults to none.
# Note: This is an *explicit* match, not a ccontains match. Putting "google.com" will match "https://google.com", "http://google.com", but not "https://mymaliciousdomainexamplegoogle.com"
# Setting this to "*" will allow all URL previews. Please note that this opens up significant attack surface to your server, you are expected to be aware of the risks by doing so.
url_preview_domain_explicit_allowlist = []
# Vector list of URLs allowed to send requests to for URL previews. Defaults to none.
# Note that this is a *contains* match, not an explicit match. Putting "google.com" will match "https://google.com/", "https://google.com/url?q=https://mymaliciousdomainexample.com", and "https://mymaliciousdomainexample.com/hi/google.com"
# Setting this to "*" will allow all URL previews. Please note that this opens up significant attack surface to your server, you are expected to be aware of the risks by doing so.
url_preview_url_contains_allowlist = []
# Maximum amount of bytes allowed in a URL preview body size when spidering. Defaults to 1MB (1_000_000 bytes)
url_preview_max_spider_size = 1_000_000
# Option to decide whether you would like to run the domain allowlist checks (contains and explicit) on the root domain or not. Does not apply to URL contains allowlist. Defaults to false.
# Example: If this is enabled and you have "wikipedia.org" allowed in the explicit and/or contains domain allowlist, it will allow all subdomains under "wikipedia.org" such as "en.m.wikipedia.org" as the root domain is checked and matched.
# Useful if the domain contains allowlist is still too broad for you but you still want to allow all the subdomains under a root domain.
url_preview_check_root_domain = false
### Misc
# max log level for conduwuit. allows debug, info, warn, or error
#log = "warn"
# controls whether encrypted rooms and events are allowed (default true)
#allow_encryption = false
# conduwuit will send a simple GET request periodically to `https://pupbrain.dev/check-for-updates/stable`
# for any new announcements made. Despite the name, this is not an update check
# endpoint, it is simply an announcement check endpoint. I don't plan on using
# this so feel free to disable it.
allow_check_for_updates = true
# Enables adding the lightning bolt emoji (⚡️) to all newly registered users'
# initial display names.
enable_lightning_bolt = false
# If you are using delegation via well-known files and you cannot serve them from your reverse proxy, you can
# uncomment these to serve them directly from conduwuit. This requires proxying all requests to conduwuit, not just `/_matrix` to work.
#well_known_server = "matrix.example.com:443"
#well_known_client = "https://matrix.example.com"
# Note that whatever you put will show up in the well-known JSON values.
# Set to false to disable users from joining or creating room versions that aren't 100% officially supported by conduwuit.
# conduwuit officially supports room versions 6 - 10. conduwuit has experimental/unstable support for 1 - 5, and 11.
# Defaults to true.
#allow_unstable_room_versions = true
# Set this to any float value to multiply conduwuit's in-memory LRU caches with.
# May be useful if you have significant memory to spare to increase performance.
# Defaults to 1.0.
#conduit_cache_capacity_modifier = 1.0
# Set this to any float value in megabytes for conduwuit to tell the database engine that this much memory is available for database-related caches.
# May be useful if you have significant memory to spare to increase performance.
# Defaults to 300.0
#db_cache_capacity_mb = 300.0
### RocksDB options
# Set this to true to use RocksDB config options that are tailored to HDDs (slower device storage)
#rocksdb_optimize_for_spinning_disks = false
# RocksDB log level. This is not the same as conduwuit's log level. This is the log level for RocksDB itself
# which show up in your database folder/path as `LOG` files. Defaults to warn. conduwuit will typically log RocksDB errors.
#rocksdb_log_level = "warn"
# Max RocksDB `LOG` file size before rotating in bytes. Defaults to 4MB.
#rocksdb_max_log_file_size = 4194304
# Time in seconds before RocksDB will forcibly rotate logs. Defaults to 0.
#rocksdb_log_time_to_roll = 0
### Presence
# Config option to control local (your server only) presence updates/requests. Defaults to false.
# Note that presence on conduwuit is very fast unlike Synapse's.
# If using outgoing presence, this MUST be enabled.
#allow_local_presence = false
# Config option to control incoming federated presence updates/requests. Defaults to false.
# This option receives presence updates from other servers, but does not send any unless `allow_outgoing_presence` is true.
# Note that presence on conduwuit is very fast unlike Synapse's.
#allow_incoming_presence = false
# Config option to control outgoing presence updates/requests. Defaults to false.
# This option sends presence updates to other servers, but does not receive any unless `allow_incoming_presence` is true.
# Note that presence on conduwuit is very fast unlike Synapse's.
# If using outgoing presence, you MUST enable `allow_local_presence` as well.
#
# Warning: Outgoing federated presence is not spec compliant due to relying on PDUs and EDUs combined.
# Outgoing presence will not be very reliable due to this and any issues with federated outgoing presence are very likely attributed to this issue.
# Incoming presence and local presence are unaffected.
#allow_outgoing_presence = false
# Config option to control how many seconds before presence updates that you are idle. Defaults to 5 minutes.
#presence_idle_timeout_s = 300
# Config option to control how many seconds before presence updates that you are offline. Defaults to 30 minutes.
#presence_offline_timeout_s = 1800
+37
View File
@@ -0,0 +1,37 @@
conduwuit for Debian
==================
Installation
------------
Information about downloading, building and deploying the Debian package, see
the "Installing Conduit" section in [DEPLOY.md](../DEPLOY.md).
All following sections until "Setting up the Reverse Proxy" be ignored because
this is handled automatically by the packaging.
Configuration
-------------
When installed, Debconf generates the configuration of the homeserver
(host)name, the address and port it listens on. This configuration ends up in
`/etc/matrix-conduit/conduit.toml`.
You can tweak more detailed settings by uncommenting and setting the variables
in `/etc/matrix-conduit/conduit.toml`. This involves settings such as the maximum
file size for download/upload, enabling federation, etc.
Running
-------
The package uses the `matrix-conduit.service` systemd unit file to start and
stop Conduit. It loads the configuration file mentioned above to set up the
environment before running the server.
This package assumes by default that Conduit will be placed behind a reverse
proxy such as Apache or nginx. This default deployment entails just listening
on `127.0.0.1` and the free port `6167` and is reachable via a client using the URL
<http://localhost:6167>.
At a later stage this packaging may support also setting up TLS and running
stand-alone. In this case, however, you need to set up some certificates and
renewal, for it to work properly.
+17
View File
@@ -0,0 +1,17 @@
#!/bin/sh
set -e
# Source debconf library.
. /usr/share/debconf/confmodule
# Ask for the Matrix homeserver name, address and port.
db_input high matrix-conduit/hostname || true
db_go
db_input low matrix-conduit/address || true
db_go
db_input medium matrix-conduit/port || true
db_go
exit 0
+57
View File
@@ -0,0 +1,57 @@
[Unit]
Description=Conduit Matrix homeserver
After=network-online.target
[Service]
DynamicUser=yes
User=_matrix-conduit
Group=_matrix-conduit
Type=notify
AmbientCapabilities=
CapabilityBoundingSet=
DevicePolicy=closed
LockPersonality=yes
MemoryDenyWriteExecute=yes
NoNewPrivileges=yes
ProcSubset=pid
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectProc=invisible
ProtectSystem=strict
PrivateDevices=yes
PrivateMounts=yes
PrivateTmp=yes
PrivateUsers=yes
PrivateIPC=yes
RemoveIPC=yes
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
SystemCallFilter=~@clock @debug @module @mount @reboot @swap @cpu-emulation @obsolete @timer @chown @setuid @resources @privileged @keyring @ipc
SystemCallErrorNumber=EPERM
StateDirectory=matrix-conduit
RuntimeDirectory=conduit
RuntimeDirectoryMode=0750
Environment="CONDUIT_CONFIG=/etc/matrix-conduit/conduit.toml"
ExecStart=/usr/sbin/matrix-conduit
Restart=on-failure
RestartSec=5
StartLimitInterval=1m
StartLimitBurst=5
[Install]
WantedBy=multi-user.target
+321
View File
@@ -0,0 +1,321 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
CONDUIT_CONFIG_PATH=/etc/matrix-conduit
CONDUIT_CONFIG_FILE="${CONDUIT_CONFIG_PATH}/conduit.toml"
CONDUIT_DATABASE_PATH=/var/lib/matrix-conduit/
case "$1" in
configure)
# Create the `_matrix-conduit` user if it does not exist yet.
if ! getent passwd _matrix-conduit > /dev/null ; then
echo 'Adding system user for the Conduit Matrix homeserver' 1>&2
adduser --system --group --quiet \
--home "$CONDUIT_DATABASE_PATH" \
--disabled-login \
--force-badname \
_matrix-conduit
fi
# Create the database path if it does not exist yet and fix up ownership
# and permissions.
mkdir -p "$CONDUIT_DATABASE_PATH"
chown _matrix-conduit "$CONDUIT_DATABASE_PATH"
chmod 700 "$CONDUIT_DATABASE_PATH"
if [ ! -e "$CONDUIT_CONFIG_FILE" ]; then
# Write the debconf values in the config.
db_get matrix-conduit/hostname
CONDUIT_SERVER_NAME="$RET"
db_get matrix-conduit/address
CONDUIT_ADDRESS="$RET"
db_get matrix-conduit/port
CONDUIT_PORT="$RET"
mkdir -p "$CONDUIT_CONFIG_PATH"
cat > "$CONDUIT_CONFIG_FILE" << EOF
# =============================================================================
# This is the official example config for conduwuit.
# If you use it for your server, you will need to adjust it to your own needs.
# At the very least, change the server_name field!
# =============================================================================
[global]
# The server_name is the pretty name of this server. It is used as a suffix for user
# and room ids. Examples: matrix.org, conduit.rs
# The Conduit server needs all /_matrix/ requests to be reachable at
# https://your.server.name/ on port 443 (client-server) and 8448 (federation).
# If that's not possible for you, you can create /.well-known files to redirect
# requests (delegation). See
# https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient
# and
# https://spec.matrix.org/v1.9/server-server-api/#getwell-knownmatrixserver
# for more information
# YOU NEED TO EDIT THIS
server_name = "${CONDUIT_SERVER_NAME}"
# Servers listed here will be used to gather public keys of other servers.
# Generally, copying this exactly should be enough. (Currently, conduwuit doesn't
# support batched key requests, so this list should only contain Synapse
# servers.) Defaults to `matrix.org`
# trusted_servers = ["matrix.org"]
### Database configuration
# This is the only directory where conduwuit will save its data, including media
database_path = "${CONDUIT_DATABASE_PATH}"
# Database backend: Only rocksdb and sqlite are supported. Please note that sqlite
# will perform significantly worse than rocksdb as it is not intended to be used the
# way it is by conduwuit. sqlite only exists for historical reasons.
database_backend = "rocksdb"
### Network
# The port conduwuit will be running on. You need to set up a reverse proxy such as
# Caddy or Nginx so all requests to /_matrix on port 443 and 8448 will be
# forwarded to the conduwuit instance running on this port
# Docker users: Don't change this, you'll need to map an external port to this.
port = ${CONDUIT_PORT}
# default address (IPv4 or IPv6) conduwuit will listen on. Generally you want this to be
# localhost (127.0.0.1 / ::1). If you are using Docker or a container NAT networking setup, you
# likely need this to be 0.0.0.0.
address = "${CONDUIT_ADDRESS}"
# How many requests conduwuit sends to other servers at the same time concurrently. Default is 500
# Note that because conduwuit is very fast unlike other homeserver implementations, setting this too
# high could inadvertently result in ratelimits kicking in, or overloading lower-end homeservers out there.
#
# A valid use-case for enabling this is if you have a significant amount of overall federation activity
# such as many rooms joined/tracked, and many servers in the true destination cache caused by that. Upon
# rebooting conduwuit, depending on how fast your resources are, client and incoming federation requests
# may timeout or be "stalled" for a period of time due to hitting the max concurrent requests limit from
# refreshing federation/destination caches and such.
#
# If you have a lot of active users on your homeserver, you will definitely need to raise this.
#
# No this will not speed up room joins.
#max_concurrent_requests = 500
# Max request size for file uploads
max_request_size = 20_000_000 # in bytes
# Uncomment unix_socket_path to listen on a UNIX socket at the specified path.
# If listening on a UNIX socket, you must remove/comment the 'address' key if defined and add your
# reverse proxy to the 'conduwuit' group, unless world RW permissions are specified with unix_socket_perms (666 minimum).
#unix_socket_path = "/run/conduwuit/conduwuit.sock"
#unix_socket_perms = 660
# Set this to true for conduwuit to compress HTTP response bodies using zstd.
# Please be aware that enabling HTTP compression may weaken or even defeat TLS.
# Most users should not need to enable this.
# See https://breachattack.com/ and https://wikipedia.org/wiki/BREACH before deciding to enable this.
zstd_compression = false
# Vector list of IPv4 and IPv6 CIDR ranges / subnets *in quotes* that you do not want conduwuit to send outbound requests to.
# Defaults to RFC1918, unroutable, loopback, multicast, and testnet addresses for security.
#
# To disable, set this to be an empty vector (`[]`).
#
# Currently this does not account for proxies in use like Synapse does.
ip_range_denylist = [
"127.0.0.0/8",
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
"100.64.0.0/10",
"192.0.0.0/24",
"169.254.0.0/16",
"192.88.99.0/24",
"198.18.0.0/15",
"192.0.2.0/24",
"198.51.100.0/24",
"203.0.113.0/24",
"224.0.0.0/4",
"::1/128",
"fe80::/10",
"fc00::/7",
"2001:db8::/32",
"ff00::/8",
"fec0::/10",
]
### Moderation / Privacy / Security
# Set to true to allow user type "guest" registrations. Element attempts to register guest users automatically.
# For private homeservers, this is best at false.
allow_guest_registration = false
# Vector list of servers that conduwuit will refuse to download remote media from.
# No default.
# prevent_media_downloads_from = ["example.com", "example.local"]
# Enables open registration. If set to false, no users can register on this
# server.
# If set to true without a token configured, users can register with no form of 2nd-
# step only if you set
# `yes_i_am_very_very_sure_i_want_an_open_registration_server_prone_to_abuse` to
# true in your config. If you would like
# registration only via token reg, please configure the `registration_token` key.
allow_registration = false
# Please note that an open registration homeserver with no second-step verification
# is highly prone to abuse and potential defederation by homeservers, including
# matrix.org.
# A static registration token that new users will have to provide when creating
# an account. If unset and `allow_registration` is true, registration is open
# without any condition. YOU NEED TO EDIT THIS.
registration_token = "change this token for something specific to your server"
# controls whether federation is allowed or not
# defaults to true
# allow_federation = true
# controls whether users are allowed to create rooms.
# appservices and admins are always allowed to create rooms
# defaults to true
# allow_room_creation = true
# Set this to true to allow your server's public room directory to be federated.
# Set this to false to protect against /publicRooms spiders, but will forbid external users
# from viewing your server's public room directory. If federation is disabled entirely
# (`allow_federation`), this is inherently false.
allow_public_room_directory_over_federation = false
# Set this to true to allow your server's public room directory to be queried without client
# authentication (access token) through the Client APIs. Set this to false to protect against /publicRooms spiders.
allow_public_room_directory_without_auth = false
# Set this to true to allow federating device display names / allow external users to see your device display name.
# If federation is disabled entirely (`allow_federation`), this is inherently false. For privacy, this is best disabled.
allow_device_name_federation = false
# Vector list of domains allowed to send requests to for URL previews. Defaults to none.
# Note: this is a *contains* match, not an explicit match. Putting "google.com" will match "https://google.com" and "http://mymaliciousdomainexamplegoogle.com"
# Setting this to "*" will allow all URL previews. Please note that this opens up significant attack surface to your server, you are expected to be aware of the risks by doing so.
url_preview_domain_contains_allowlist = []
# Vector list of explicit domains allowed to send requests to for URL previews. Defaults to none.
# Note: This is an *explicit* match, not a ccontains match. Putting "google.com" will match "https://google.com", "http://google.com", but not "https://mymaliciousdomainexamplegoogle.com"
# Setting this to "*" will allow all URL previews. Please note that this opens up significant attack surface to your server, you are expected to be aware of the risks by doing so.
url_preview_domain_explicit_allowlist = []
# Vector list of URLs allowed to send requests to for URL previews. Defaults to none.
# Note that this is a *contains* match, not an explicit match. Putting "google.com" will match "https://google.com/", "https://google.com/url?q=https://mymaliciousdomainexample.com", and "https://mymaliciousdomainexample.com/hi/google.com"
# Setting this to "*" will allow all URL previews. Please note that this opens up significant attack surface to your server, you are expected to be aware of the risks by doing so.
url_preview_url_contains_allowlist = []
# Maximum amount of bytes allowed in a URL preview body size when spidering. Defaults to 1MB (1_000_000 bytes)
url_preview_max_spider_size = 1_000_000
# Option to decide whether you would like to run the domain allowlist checks (contains and explicit) on the root domain or not. Does not apply to URL contains allowlist. Defaults to false.
# Example: If this is enabled and you have "wikipedia.org" allowed in the explicit and/or contains domain allowlist, it will allow all subdomains under "wikipedia.org" such as "en.m.wikipedia.org" as the root domain is checked and matched.
# Useful if the domain contains allowlist is still too broad for you but you still want to allow all the subdomains under a root domain.
url_preview_check_root_domain = false
### Misc
# max log level for conduwuit. allows debug, info, warn, or error
#log = "warn"
# controls whether encrypted rooms and events are allowed (default true)
#allow_encryption = false
# conduwuit will send a simple GET request periodically to `https://pupbrain.dev/check-for-updates/stable`
# for any new announcements made. Despite the name, this is not an update check
# endpoint, it is simply an announcement check endpoint. I don't plan on using
# this so feel free to disable it.
allow_check_for_updates = true
# Enables adding the lightning bolt emoji (⚡️) to all newly registered users'
# initial display names.
enable_lightning_bolt = false
# If you are using delegation via well-known files and you cannot serve them from your reverse proxy, you can
# uncomment these to serve them directly from conduwuit. This requires proxying all requests to conduwuit, not just `/_matrix` to work.
#well_known_server = "matrix.example.com:443"
#well_known_client = "https://matrix.example.com"
# Note that whatever you put will show up in the well-known JSON values.
# Set to false to disable users from joining or creating room versions that aren't 100% officially supported by conduwuit.
# conduwuit officially supports room versions 6 - 10. conduwuit has experimental/unstable support for 1 - 5, and 11.
# Defaults to true.
#allow_unstable_room_versions = true
# Set this to any float value to multiply conduwuit's in-memory LRU caches with.
# May be useful if you have significant memory to spare to increase performance.
# Defaults to 1.0.
#conduit_cache_capacity_modifier = 1.0
# Set this to any float value in megabytes for conduwuit to tell the database engine that this much memory is available for database-related caches.
# May be useful if you have significant memory to spare to increase performance.
# Defaults to 900.0
#db_cache_capacity_mb = 900.0
### RocksDB options
# Set this to true to use RocksDB config options that are tailored to HDDs (slower device storage)
#rocksdb_optimize_for_spinning_disks = false
# RocksDB log level. This is not the same as conduwuit's log level. This is the log level for RocksDB itself
# which show up in your database folder/path as `LOG` files. Defaults to warn. conduwuit will typically log RocksDB errors.
#rocksdb_log_level = "warn"
# Max RocksDB `LOG` file size before rotating in bytes. Defaults to 4MB.
#rocksdb_max_log_file_size = 4194304
# Time in seconds before RocksDB will forcibly rotate logs. Defaults to 0.
#rocksdb_log_time_to_roll = 0
### Presence
# Config option to control local (your server only) presence updates/requests. Defaults to false.
# Note that presence on conduwuit is very fast unlike Synapse's.
# If using outgoing presence, this MUST be enabled.
#allow_local_presence = false
# Config option to control incoming federated presence updates/requests. Defaults to false.
# This option receives presence updates from other servers, but does not send any unless `allow_outgoing_presence` is true.
# Note that presence on conduwuit is very fast unlike Synapse's.
#allow_incoming_presence = false
# Config option to control outgoing presence updates/requests. Defaults to false.
# This option sends presence updates to other servers, but does not receive any unless `allow_incoming_presence` is true.
# Note that presence on conduwuit is very fast unlike Synapse's.
# If using outgoing presence, you MUST enable `allow_local_presence` as well.
#
# Warning: Outgoing federated presence is not spec compliant due to relying on PDUs and EDUs combined.
# Outgoing presence will not be very reliable due to this and any issues with federated outgoing presence are very likely attributed to this issue.
# Incoming presence and local presence are unaffected.
#allow_outgoing_presence = false
# Config option to control how many seconds before presence updates that you are idle. Defaults to 5 minutes.
#presence_idle_timeout_s = 300
# Config option to control how many seconds before presence updates that you are offline. Defaults to 30 minutes.
#presence_offline_timeout_s = 1800
EOF
fi
;;
esac
#DEBHELPER#
+27
View File
@@ -0,0 +1,27 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
CONDUIT_CONFIG_PATH=/etc/matrix-conduit
CONDUIT_DATABASE_PATH=/var/lib/matrix-conduit
case $1 in
purge)
# Remove debconf changes from the db
db_purge
# Per https://www.debian.org/doc/debian-policy/ch-files.html#behavior
# "configuration files must be preserved when the package is removed, and
# only deleted when the package is purged."
if [ -d "$CONDUIT_CONFIG_PATH" ]; then
rm -r "$CONDUIT_CONFIG_PATH"
fi
if [ -d "$CONDUIT_DATABASE_PATH" ]; then
rm -r "$CONDUIT_DATABASE_PATH"
fi
;;
esac
#DEBHELPER#
+21
View File
@@ -0,0 +1,21 @@
Template: matrix-conduit/hostname
Type: string
Default: localhost
Description: The server (host)name of the Matrix homeserver
This is the hostname the homeserver will be reachable at via a client.
.
If set to "localhost", you can connect with a client locally and clients
from other hosts and also other homeservers will not be able to reach you!
Template: matrix-conduit/address
Type: string
Default: 127.0.0.1
Description: The listen address of the Matrix homeserver
This is the address the homeserver will listen on. Leave it set to 127.0.0.1
when using a reverse proxy.
Template: matrix-conduit/port
Type: string
Default: 6167
Description: The port of the Matrix homeserver
This port is most often just accessed by a reverse proxy.
+10
View File
@@ -0,0 +1,10 @@
(import
(
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
fetchTarball {
url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
)
{ src = ./.; }
).defaultNix
-2
View File
@@ -1,2 +0,0 @@
podman build . -f packages/website/Dockerfile -t jade-website-frontend:latest;
podman save --format oci-archive jade-website-frontend:latest | gzip | ssh fedora@213.32.25.24 -T "sudo sh -c ' zcat > /opt/images/jade-website-frontend'"
+218
View File
@@ -0,0 +1,218 @@
# Deploy using Docker
> **Note:** To run and use Conduit you should probably use it with a Domain or Subdomain behind a reverse proxy (like Nginx, Traefik, Apache, ...) with a Lets Encrypt certificate.
## Docker
To run conduwuit with Docker you can either build the image yourself or pull it from a registry.
### Use a registry
OCI images for conduwuit are available in the registries listed below. We recommend using the image tagged as `latest` from GitLab's own registry.
| Registry | Image | Size | Notes |
| --------------- | --------------------------------------------------------------- | ----------------------------- | ---------------------- |
| GitHub Registry | [ghcr.io/girlbossceo/conduwuit:latest][gh] | ![Image Size][shield-latest] | Stable image. |
| Docker Hub | [docker.io/girlbossceo/conduwuit:latest][dh] | ![Image Size][shield-latest] | Stable image. |
| GitHub Registry | [ghcr.io/girlbossceo/conduwuit:main][gh] | ![Image Size][shield-main] | Development version. |
| Docker Hub | [docker.io/girlbossceo/conduwuit:main][dh] | ![Image Size][shield-main] | Development version. |
[dh]: https://hub.docker.com/repository/docker/girlbossceo/conduwuit
[gh]: https://github.com/girlbossceo/conduwuit/pkgs/container/conduwuit
[shield-latest]: https://img.shields.io/docker/image-size/girlbossceo/conduwuit/latest
[shield-main]: https://img.shields.io/docker/image-size/girlbossceo/conduwuit/main
Use
```bash
docker image pull <link>
```
to pull it to your machine.
### Build using a dockerfile
The Dockerfile provided by Conduit has two stages, each of which creates an image.
1. **Builder:** Builds the binary from local context or by cloning a git revision from the official repository.
2. **Runner:** Copies the built binary from **Builder** and sets up the runtime environment, like creating a volume to persist the database and applying the correct permissions.
To build the image you can use the following command
```bash
docker build --tag girlbossceo/conduwuit:main .
```
which also will tag the resulting image as `girlbossceo/conduwuit:main`.
### Run
When you have the image you can simply run it with
```bash
docker run -d -p 8448:6167 \
-v db:/var/lib/matrix-conduit/ \
-e CONDUIT_SERVER_NAME="your.server.name" \
-e CONDUIT_DATABASE_BACKEND="rocksdb" \
-e CONDUIT_ALLOW_REGISTRATION=true \
-e CONDUIT_ALLOW_FEDERATION=true \
-e CONDUIT_MAX_REQUEST_SIZE="20000000" \
-e CONDUIT_TRUSTED_SERVERS="[\"matrix.org\"]" \
-e CONDUIT_MAX_CONCURRENT_REQUESTS="500" \
-e CONDUIT_LOG="warn,ruma_state_res=warn" \
--name conduit <link>
```
or you can use [docker-compose](#docker-compose).
The `-d` flag lets the container run in detached mode. You now need to supply a `conduit.toml` config file, an example can be found [here](../conduit-example.toml).
You can pass in different env vars to change config values on the fly. You can even configure Conduit completely by using env vars, but for that you need
to pass `-e CONDUIT_CONFIG=""` into your container. For an overview of possible values, please take a look at the `docker-compose.yml` file.
If you just want to test Conduit for a short time, you can use the `--rm` flag, which will clean up everything related to your container after you stop it.
### Docker-compose
If the `docker run` command is not for you or your setup, you can also use one of the provided `docker-compose` files.
Depending on your proxy setup, you can use one of the following files;
- If you already have a `traefik` instance set up, use [`docker-compose.for-traefik.yml`](docker-compose.for-traefik.yml)
- If you don't have a `traefik` instance set up (or any other reverse proxy), use [`docker-compose.with-traefik.yml`](docker-compose.with-traefik.yml)
- For any other reverse proxy, use [`docker-compose.yml`](docker-compose.yml)
When picking the traefik-related compose file, rename it so it matches `docker-compose.yml`, and
rename the override file to `docker-compose.override.yml`. Edit the latter with the values you want
for your server.
Additional info about deploying Conduit can be found [here](../DEPLOY.md).
### Build
To build the Conduit image with docker-compose, you first need to open and modify the `docker-compose.yml` file. There you need to comment the `image:` option and uncomment the `build:` option. Then call docker-compose with:
```bash
docker-compose up
```
This will also start the container right afterwards, so if want it to run in detached mode, you also should use the `-d` flag.
### Run
If you already have built the image or want to use one from the registries, you can just start the container and everything else in the compose file in detached mode with:
```bash
docker-compose up -d
```
> **Note:** Don't forget to modify and adjust the compose file to your needs.
### Use Traefik as Proxy
As a container user, you probably know about Traefik. It is a easy to use reverse proxy for making
containerized app and services available through the web. With the two provided files,
[`docker-compose.for-traefik.yml`](docker-compose.for-traefik.yml) (or
[`docker-compose.with-traefik.yml`](docker-compose.with-traefik.yml)) and
[`docker-compose.override.yml`](docker-compose.override.yml), it is equally easy to deploy
and use Conduit, with a little caveat. If you already took a look at the files, then you should have
seen the `well-known` service, and that is the little caveat. Traefik is simply a proxy and
loadbalancer and is not able to serve any kind of content, but for Conduit to federate, we need to
either expose ports `443` and `8448` or serve two endpoints `.well-known/matrix/client` and
`.well-known/matrix/server`.
With the service `well-known` we use a single `nginx` container that will serve those two files.
So...step by step:
1. Copy [`docker-compose.for-traefik.yml`](docker-compose.for-traefik.yml) (or
[`docker-compose.with-traefik.yml`](docker-compose.with-traefik.yml)) and [`docker-compose.override.yml`](docker-compose.override.yml) from the repository and remove `.for-traefik` (or `.with-traefik`) from the filename.
2. Open both files and modify/adjust them to your needs. Meaning, change the `CONDUIT_SERVER_NAME` and the volume host mappings according to your needs.
3. Create the `conduit.toml` config file, an example can be found [here](../conduit-example.toml), or set `CONDUIT_CONFIG=""` and configure Conduit per env vars.
4. Uncomment the `element-web` service if you want to host your own Element Web Client and create a `element_config.json`.
5. Create the files needed by the `well-known` service.
- `./nginx/matrix.conf` (relative to the compose file, you can change this, but then also need to change the volume mapping)
```nginx
server {
server_name <SUBDOMAIN>.<DOMAIN>;
listen 80 default_server;
location /.well-known/matrix/server {
return 200 '{"m.server": "<SUBDOMAIN>.<DOMAIN>:443"}';
types { } default_type "application/json; charset=utf-8";
}
location /.well-known/matrix/client {
return 200 '{"m.homeserver": {"base_url": "https://<SUBDOMAIN>.<DOMAIN>"}}';
types { } default_type "application/json; charset=utf-8";
add_header "Access-Control-Allow-Origin" *;
}
location / {
return 404;
}
}
```
6. Run `docker-compose up -d`
7. Connect to your homeserver with your preferred client and create a user. You should do this immediately after starting Conduit, because the first created user is the admin.
## Voice communication
In order to make or receive calls, a TURN server is required. Conduit suggests using [Coturn](https://github.com/coturn/coturn) for this purpose, which is also available as a Docker image. Before proceeding with the software installation, it is essential to have the necessary configurations in place.
### Configuration
Create a configuration file called `coturn.conf` containing:
```conf
use-auth-secret
static-auth-secret=<a secret key>
realm=<your server domain>
```
A common way to generate a suitable alphanumeric secret key is by using `pwgen -s 64 1`.
These same values need to be set in conduit. You can either modify conduit.toml to include these lines:
```
turn_uris = ["turn:<your server domain>?transport=udp", "turn:<your server domain>?transport=tcp"]
turn_secret = "<secret key from coturn configuration>"
```
or append the following to the docker environment variables dependig on which configuration method you used earlier:
```yml
CONDUIT_TURN_URIS: '["turn:<your server domain>?transport=udp", "turn:<your server domain>?transport=tcp"]'
CONDUIT_TURN_SECRET: "<secret key from coturn configuration>"
```
Restart Conduit to apply these changes.
### Run
Run the [Coturn](https://hub.docker.com/r/coturn/coturn) image using
```bash
docker run -d --network=host -v $(pwd)/coturn.conf:/etc/coturn/turnserver.conf coturn/coturn
```
or docker-compose. For the latter, paste the following section into a file called `docker-compose.yml`
and run `docker-compose up -d` in the same directory.
```yml
version: 3
services:
turn:
container_name: coturn-server
image: docker.io/coturn/coturn
restart: unless-stopped
network_mode: "host"
volumes:
- ./coturn.conf:/etc/coturn/turnserver.conf
```
To understand why the host networking mode is used and explore alternative configuration options, please visit the following link: https://github.com/coturn/coturn/blob/master/docker/coturn/README.md.
For security recommendations see Synapse's [Coturn documentation](https://github.com/matrix-org/synapse/blob/develop/docs/setup/turn/coturn.md#configuration).
+69
View File
@@ -0,0 +1,69 @@
# Conduit - Behind Traefik Reverse Proxy
version: '3'
services:
homeserver:
### If you already built the Conduit image with 'docker build' or want to use the Docker Hub image,
### then you are ready to go.
image: girlbossceo/conduwuit:latest
### If you want to build a fresh image from the sources, then comment the image line and uncomment the
### build lines. If you want meaningful labels in your built Conduit image, you should run docker-compose like this:
### CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml) docker-compose up -d
# build:
# context: .
# args:
# CREATED: '2021-03-16T08:18:27Z'
# VERSION: '0.1.0'
# LOCAL: 'false'
# GIT_REF: origin/master
restart: unless-stopped
volumes:
- db:/var/lib/matrix-conduit/
networks:
- proxy
environment:
CONDUIT_SERVER_NAME: your.server.name # EDIT THIS
CONDUIT_DATABASE_PATH: /var/lib/matrix-conduit/
CONDUIT_DATABASE_BACKEND: rocksdb
CONDUIT_PORT: 6167
CONDUIT_MAX_REQUEST_SIZE: 20_000_000 # in bytes, ~20 MB
CONDUIT_ALLOW_REGISTRATION: 'true'
CONDUIT_ALLOW_FEDERATION: 'true'
CONDUIT_ALLOW_CHECK_FOR_UPDATES: 'true'
CONDUIT_TRUSTED_SERVERS: '["matrix.org"]'
#CONDUIT_MAX_CONCURRENT_REQUESTS: 100
#CONDUIT_LOG: warn,state_res=warn
CONDUIT_ADDRESS: 0.0.0.0
CONDUIT_CONFIG: '' # Ignore this
# We need some way to server the client and server .well-known json. The simplest way is to use a nginx container
# to serve those two as static files. If you want to use a different way, delete or comment the below service, here
# and in the docker-compose override file.
well-known:
image: nginx:latest
restart: unless-stopped
volumes:
- ./nginx/matrix.conf:/etc/nginx/conf.d/matrix.conf # the config to serve the .well-known/matrix files
- ./nginx/www:/var/www/ # location of the client and server .well-known-files
### Uncomment if you want to use your own Element-Web App.
### Note: You need to provide a config.json for Element and you also need a second
### Domain or Subdomain for the communication between Element and Conduit
### Config-Docs: https://github.com/vector-im/element-web/blob/develop/docs/config.md
# element-web:
# image: vectorim/element-web:latest
# restart: unless-stopped
# volumes:
# - ./element_config.json:/app/config.json
# networks:
# - proxy
# depends_on:
# - homeserver
volumes:
db:
networks:
# 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:
external: true
+45
View File
@@ -0,0 +1,45 @@
# Conduit - Traefik Reverse Proxy Labels
version: '3'
services:
homeserver:
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy" # Change this to the name of your Traefik docker proxy network
- "traefik.http.routers.to-conduit.rule=Host(`<SUBDOMAIN>.<DOMAIN>`)" # Change to the address on which Conduit is hosted
- "traefik.http.routers.to-conduit.tls=true"
- "traefik.http.routers.to-conduit.tls.certresolver=letsencrypt"
- "traefik.http.routers.to-conduit.middlewares=cors-headers@docker"
- "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"
# We need some way to server the client and server .well-known json. The simplest way is to use a nginx container
# to serve those two as static files. If you want to use a different way, delete or comment the below service, here
# and in the docker-compose file.
well-known:
labels:
- "traefik.enable=true"
- "traefik.docker.network=proxy"
- "traefik.http.routers.to-matrix-wellknown.rule=Host(`<SUBDOMAIN>.<DOMAIN>`) && PathPrefix(`/.well-known/matrix`)"
- "traefik.http.routers.to-matrix-wellknown.tls=true"
- "traefik.http.routers.to-matrix-wellknown.tls.certresolver=letsencrypt"
- "traefik.http.routers.to-matrix-wellknown.middlewares=cors-headers@docker"
- "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"
### Uncomment this if you uncommented Element-Web App in the docker-compose.yml
# element-web:
# labels:
# - "traefik.enable=true"
# - "traefik.docker.network=proxy" # Change this to the name of your Traefik docker proxy network
# - "traefik.http.routers.to-element-web.rule=Host(`<SUBDOMAIN>.<DOMAIN>`)" # Change to the address on which Element-Web is hosted
# - "traefik.http.routers.to-element-web.tls=true"
# - "traefik.http.routers.to-element-web.tls.certresolver=letsencrypt"
+98
View File
@@ -0,0 +1,98 @@
# Conduit - Behind Traefik Reverse Proxy
version: '3'
services:
homeserver:
### If you already built the Conduit image with 'docker build' or want to use the Docker Hub image,
### then you are ready to go.
image: girlbossceo/conduwuit:latest
### If you want to build a fresh image from the sources, then comment the image line and uncomment the
### build lines. If you want meaningful labels in your built Conduit image, you should run docker-compose like this:
### CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml) docker-compose up -d
# build:
# context: .
# args:
# CREATED: '2021-03-16T08:18:27Z'
# VERSION: '0.1.0'
# LOCAL: 'false'
# GIT_REF: origin/master
restart: unless-stopped
volumes:
- db:/srv/conduit/.local/share/conduit
### Uncomment if you want to use conduit.toml to configure Conduit
### Note: Set env vars will override conduit.toml values
# - ./conduit.toml:/srv/conduit/conduit.toml
networks:
- proxy
environment:
CONDUIT_SERVER_NAME: localhost:6167 # replace with your own name
CONDUIT_TRUSTED_SERVERS: '["matrix.org"]'
CONDUIT_ALLOW_REGISTRATION : 'true'
### Uncomment and change values as desired
# CONDUIT_ADDRESS: 0.0.0.0
# CONDUIT_PORT: 6167
# CONDUIT_CONFIG: '/srv/conduit/conduit.toml' # if you want to configure purely by env vars, set this to an empty string ''
# Available levels are: error, warn, info, debug, trace - more info at: https://docs.rs/env_logger/*/env_logger/#enabling-logging
# CONDUIT_LOG: info # default is: "warn,state_res=warn"
# CONDUIT_ALLOW_JAEGER: 'false'
# CONDUIT_ALLOW_ENCRYPTION: 'true'
# CONDUIT_ALLOW_FEDERATION: 'true'
# CONDUIT_ALLOW_CHECK_FOR_UPDATES: 'true'
# CONDUIT_DATABASE_PATH: /srv/conduit/.local/share/conduit
# CONDUIT_WORKERS: 10
# CONDUIT_MAX_REQUEST_SIZE: 20_000_000 # in bytes, ~20 MB
# We need some way to server the client and server .well-known json. The simplest way is to use a nginx container
# to serve those two as static files. If you want to use a different way, delete or comment the below service, here
# and in the docker-compose override file.
well-known:
image: nginx:latest
restart: unless-stopped
volumes:
- ./nginx/matrix.conf:/etc/nginx/conf.d/matrix.conf # the config to serve the .well-known/matrix files
- ./nginx/www:/var/www/ # location of the client and server .well-known-files
### Uncomment if you want to use your own Element-Web App.
### Note: You need to provide a config.json for Element and you also need a second
### Domain or Subdomain for the communication between Element and Conduit
### Config-Docs: https://github.com/vector-im/element-web/blob/develop/docs/config.md
# element-web:
# image: vectorim/element-web:latest
# restart: unless-stopped
# volumes:
# - ./element_config.json:/app/config.json
# networks:
# - proxy
# depends_on:
# - homeserver
traefik:
image: "traefik:latest"
container_name: "traefik"
restart: "unless-stopped"
ports:
- "80:80"
- "443:443"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
# - "./traefik_config:/etc/traefik"
- "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=http"
- "traefik.http.routers.redirs.middlewares=redirect-to-https"
networks:
- proxy
volumes:
db:
acme:
networks:
proxy:
+54
View File
@@ -0,0 +1,54 @@
# Conduit
version: '3'
services:
homeserver:
### If you already built the Conduit image with 'docker build' or want to use a registry image,
### then you are ready to go.
image: girlbossceo/conduwuit:latest
### If you want to build a fresh image from the sources, then comment the image line and uncomment the
### build lines. If you want meaningful labels in your built Conduit image, you should run docker-compose like this:
### CREATED=$(date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION=$(grep -m1 -o '[0-9].[0-9].[0-9]' Cargo.toml) docker-compose up -d
# build:
# context: .
# args:
# CREATED: '2021-03-16T08:18:27Z'
# VERSION: '0.1.0'
# LOCAL: 'false'
# GIT_REF: origin/master
restart: unless-stopped
ports:
- 8448:6167
volumes:
- db:/var/lib/matrix-conduit/
environment:
CONDUIT_SERVER_NAME: your.server.name # EDIT THIS
CONDUIT_DATABASE_PATH: /var/lib/matrix-conduit/
CONDUIT_DATABASE_BACKEND: rocksdb
CONDUIT_PORT: 6167
CONDUIT_MAX_REQUEST_SIZE: 20_000_000 # in bytes, ~20 MB
CONDUIT_ALLOW_REGISTRATION: 'true'
CONDUIT_ALLOW_FEDERATION: 'true'
CONDUIT_ALLOW_CHECK_FOR_UPDATES: 'true'
CONDUIT_TRUSTED_SERVERS: '["matrix.org"]'
#CONDUIT_MAX_CONCURRENT_REQUESTS: 400
#CONDUIT_LOG: warn,state_res=warn
CONDUIT_ADDRESS: 0.0.0.0
CONDUIT_CONFIG: '' # Ignore this
#
### Uncomment if you want to use your own Element-Web App.
### Note: You need to provide a config.json for Element and you also need a second
### Domain or Subdomain for the communication between Element and Conduit
### Config-Docs: https://github.com/vector-im/element-web/blob/develop/docs/config.md
# element-web:
# image: vectorim/element-web:latest
# restart: unless-stopped
# ports:
# - 8009:80
# volumes:
# - ./element_config.json:/app/config.json
# depends_on:
# - homeserver
volumes:
db:
+19
View File
@@ -0,0 +1,19 @@
#!/bin/sh
# If the config file does not contain a default port and the CONDUIT_PORT env is not set, create
# try to get port from process list
if [ -z "${CONDUIT_PORT}" ]; then
CONDUIT_PORT=$(ss -tlpn | grep conduit | grep -m1 -o ':[0-9]*' | grep -m1 -o '[0-9]*')
fi
# If CONDUIT_ADDRESS is not set try to get the address from the process list
if [ -z "${CONDUIT_ADDRESS}" ]; then
CONDUIT_ADDRESS=$(ss -tlpn | awk -F ' +|:' '/conduit/ { print $4 }')
fi
# The actual health check.
# We try to first get a response on HTTP and when that fails on HTTPS and when that fails, we exit with code 1.
# TODO: Change this to a single wget call. Do we have a config value that we can check for that?
wget --no-verbose --tries=1 --spider "http://${CONDUIT_ADDRESS}:${CONDUIT_PORT}/_matrix/client/versions" || \
wget --no-verbose --tries=1 --spider "https://${CONDUIT_ADDRESS}:${CONDUIT_PORT}/_matrix/client/versions" || \
exit 1
+79
View File
@@ -0,0 +1,79 @@
interpreter = ["bash", "-euo", "pipefail", "-c"]
[[task]]
name = "engage"
group = "versions"
script = "engage --version"
[[task]]
name = "nix"
group = "versions"
script = "nix --version"
[[task]]
name = "direnv"
group = "versions"
script = "direnv --version"
[[task]]
name = "rustc"
group = "versions"
script = "rustc --version"
[[task]]
name = "cargo"
group = "versions"
script = "cargo --version"
[[task]]
name = "cargo-fmt"
group = "versions"
script = "cargo fmt --version"
[[task]]
name = "rustdoc"
group = "versions"
script = "rustdoc --version"
[[task]]
name = "cargo-clippy"
group = "versions"
script = "cargo clippy -- --version"
[[task]]
name = "cargo-fmt"
group = "lints"
script = "cargo fmt --check -- --color=always"
[[task]]
name = "cargo-doc"
group = "lints"
script = """
RUSTDOCFLAGS="-D warnings" cargo doc \
--workspace \
--no-deps \
--document-private-items \
--color always
"""
[[task]]
name = "cargo-clippy"
group = "lints"
script = "cargo clippy --workspace --all-targets --color=always -- -D warnings"
[[task]]
name = "cargo"
group = "tests"
script = """
cargo test \
--workspace \
--all-targets \
--color=always \
-- \
--color=always
"""
[[task]]
name = "cargo-audit"
group = "security"
script = "cargo audit -D warnings -D unmaintained -D unsound -D yanked"
Generated
+263
View File
@@ -0,0 +1,263 @@
{
"nodes": {
"attic": {
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1707922053,
"narHash": "sha256-wSZjK+rOXn+UQiP1NbdNn5/UW6UcBxjvlqr2wh++MbM=",
"owner": "zhaofengli",
"repo": "attic",
"rev": "6eabc3f02fae3683bffab483e614bebfcd476b21",
"type": "github"
},
"original": {
"owner": "zhaofengli",
"ref": "main",
"repo": "attic",
"type": "github"
}
},
"crane": {
"inputs": {
"nixpkgs": [
"attic",
"nixpkgs"
]
},
"locked": {
"lastModified": 1702918879,
"narHash": "sha256-tWJqzajIvYcaRWxn+cLUB9L9Pv4dQ3Bfit/YjU5ze3g=",
"owner": "ipetkov",
"repo": "crane",
"rev": "7195c00c272fdd92fc74e7d5a0a2844b9fadb2fb",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"crane_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1707685877,
"narHash": "sha256-XoXRS+5whotelr1rHiZle5t5hDg9kpguS5yk8c8qzOc=",
"owner": "ipetkov",
"repo": "crane",
"rev": "2c653e4478476a52c6aa3ac0495e4dea7449ea0e",
"type": "github"
},
"original": {
"owner": "ipetkov",
"ref": "master",
"repo": "crane",
"type": "github"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1707891749,
"narHash": "sha256-SeikNYElHgv8uVMbiA9/pU3Cce7ssIsiM8CnEiwd1Nc=",
"owner": "nix-community",
"repo": "fenix",
"rev": "3115aab064ef38cccd792c45429af8df43d6d277",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nix-filter": {
"locked": {
"lastModified": 1705332318,
"narHash": "sha256-kcw1yFeJe9N4PjQji9ZeX47jg0p9A0DuU4djKvg1a7I=",
"owner": "numtide",
"repo": "nix-filter",
"rev": "3449dc925982ad46246cfc36469baf66e1b64f17",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "nix-filter",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1702539185,
"narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1702780907,
"narHash": "sha256-blbrBBXjjZt6OKTcYX1jpe9SRof2P9ZYWPzq22tzXAA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1e2e384c5b7c50dbf8e9c441a9e58d85f408b01f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1707689078,
"narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"attic": "attic",
"crane": "crane_2",
"fenix": "fenix",
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_2",
"nix-filter": "nix-filter",
"nixpkgs": "nixpkgs_2"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1707849817,
"narHash": "sha256-If6T0MDErp3/z7DBlpG4bV46IPP+7BWSlgTI88cmbw0=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "a02a219773629686bd8ff123ca1aa995fa50d976",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
+269
View File
@@ -0,0 +1,269 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
nix-filter.url = "github:numtide/nix-filter";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
crane = {
url = "github:ipetkov/crane?ref=master";
inputs.nixpkgs.follows = "nixpkgs";
};
attic.url = "github:zhaofengli/attic?ref=main";
};
outputs =
{ self
, nixpkgs
, flake-utils
, nix-filter
, fenix
, crane
, ...
}: flake-utils.lib.eachDefaultSystem (system:
let
pkgsHost = nixpkgs.legacyPackages.${system};
rocksdb' = pkgs: pkgs.rocksdb.overrideAttrs (old:
{
src = pkgs.fetchFromGitHub {
owner = "facebook";
repo = "rocksdb";
rev = "v8.10.0";
hash = "sha256-KGsYDBc1fz/90YYNGwlZ0LUKXYsP1zyhP29TnRQwgjQ=";
};
});
# Nix-accessible `Cargo.toml`
cargoToml = builtins.fromTOML (builtins.readFile ./Cargo.toml);
# The Rust toolchain to use
toolchain = fenix.packages.${system}.fromToolchainFile {
file = ./rust-toolchain.toml;
# See also `rust-toolchain.toml`
sha256 = "sha256-SXRtAuO4IqNOQq+nLbrsDFbVk+3aVA8NNpSZsKlVH/8=";
};
builder = pkgs:
((crane.mkLib pkgs).overrideToolchain toolchain).buildPackage;
nativeBuildInputs = pkgs: [
# bindgen needs the build platform's libclang. Apparently due to
# "splicing weirdness", pkgs.rustPlatform.bindgenHook on its own doesn't
# quite do the right thing here.
pkgs.buildPackages.rustPlatform.bindgenHook
];
env = pkgs: {
ROCKSDB_INCLUDE_DIR = "${rocksdb' pkgs}/include";
ROCKSDB_LIB_DIR = "${rocksdb' pkgs}/lib";
}
// pkgs.lib.optionalAttrs pkgs.stdenv.hostPlatform.isStatic {
ROCKSDB_STATIC = "";
}
// {
CARGO_BUILD_RUSTFLAGS = let inherit (pkgs) lib stdenv; in
lib.concatStringsSep " " ([]
++ lib.optionals
# This disables PIE for static builds, which isn't great in terms
# of security. Unfortunately, my hand is forced because nixpkgs'
# `libstdc++.a` is built without `-fPIE`, which precludes us from
# leaving PIE enabled.
stdenv.hostPlatform.isStatic
["-C" "relocation-model=static"]
++ lib.optionals
(stdenv.buildPlatform.config != stdenv.hostPlatform.config)
["-l" "c"]
++ lib.optionals
# This check has to match the one [here][0]. We only need to set
# these flags when using a different linker. Don't ask me why,
# though, because I don't know. All I know is it breaks otherwise.
#
# [0]: https://github.com/NixOS/nixpkgs/blob/612f97239e2cc474c13c9dafa0df378058c5ad8d/pkgs/build-support/rust/lib/default.nix#L36-L39
(
# Nixpkgs doesn't check for x86_64 here but we do, because I
# observed a failure building statically for x86_64 without
# including it here. Linkers are weird.
(stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isx86_64)
&& stdenv.hostPlatform.isStatic
&& !stdenv.isDarwin
&& !stdenv.cc.bintools.isLLVM
)
[
"-l"
"stdc++"
"-L"
"${stdenv.cc.cc.lib}/${stdenv.hostPlatform.config}/lib"
]
);
}
# What follows is stolen from [here][0]. Its purpose is to properly
# configure compilers and linkers for various stages of the build, and
# even covers the case of build scripts that need native code compiled and
# run on the build platform (I think).
#
# [0]: https://github.com/NixOS/nixpkgs/blob/612f97239e2cc474c13c9dafa0df378058c5ad8d/pkgs/build-support/rust/lib/default.nix#L64-L78
// (
let
inherit (pkgs.rust.lib) envVars;
in
pkgs.lib.optionalAttrs
(pkgs.stdenv.targetPlatform.rust.rustcTarget
!= pkgs.stdenv.hostPlatform.rust.rustcTarget)
(
let
inherit (pkgs.stdenv.targetPlatform.rust) cargoEnvVarTarget;
in
{
"CC_${cargoEnvVarTarget}" = envVars.ccForTarget;
"CXX_${cargoEnvVarTarget}" = envVars.cxxForTarget;
"CARGO_TARGET_${cargoEnvVarTarget}_LINKER" =
envVars.linkerForTarget;
}
)
// (
let
inherit (pkgs.stdenv.hostPlatform.rust) cargoEnvVarTarget rustcTarget;
in
{
"CC_${cargoEnvVarTarget}" = envVars.ccForHost;
"CXX_${cargoEnvVarTarget}" = envVars.cxxForHost;
"CARGO_TARGET_${cargoEnvVarTarget}_LINKER" = envVars.linkerForHost;
CARGO_BUILD_TARGET = rustcTarget;
}
)
// (
let
inherit (pkgs.stdenv.buildPlatform.rust) cargoEnvVarTarget;
in
{
"CC_${cargoEnvVarTarget}" = envVars.ccForBuild;
"CXX_${cargoEnvVarTarget}" = envVars.cxxForBuild;
"CARGO_TARGET_${cargoEnvVarTarget}_LINKER" = envVars.linkerForBuild;
HOST_CC = "${pkgs.buildPackages.stdenv.cc}/bin/cc";
HOST_CXX = "${pkgs.buildPackages.stdenv.cc}/bin/c++";
}
));
package = pkgs: builder pkgs {
src = nix-filter {
root = ./.;
include = [
"src"
"Cargo.toml"
"Cargo.lock"
];
};
# This is redundant with CI
doCheck = false;
env = env pkgs;
nativeBuildInputs = nativeBuildInputs pkgs;
meta.mainProgram = cargoToml.package.name;
};
mkOciImage = pkgs: package:
pkgs.dockerTools.buildImage {
name = package.pname;
tag = "main";
copyToRoot = [
pkgs.dockerTools.caCertificates
];
config = {
# Use the `tini` init system so that signals (e.g. ctrl+c/SIGINT)
# are handled as expected
Entrypoint = [
"${pkgs.lib.getExe' pkgs.tini "tini"}"
"--"
];
Cmd = [
"${pkgs.lib.getExe package}"
];
};
};
in
{
packages = {
default = package pkgsHost;
oci-image = mkOciImage pkgsHost self.packages.${system}.default;
}
//
builtins.listToAttrs
(builtins.concatLists
(builtins.map
(crossSystem:
let
binaryName = "static-${crossSystem}";
pkgsCrossStatic =
(import nixpkgs {
inherit system;
crossSystem = {
config = crossSystem;
};
}).pkgsStatic;
in
[
# An output for a statically-linked binary
{
name = binaryName;
value = package pkgsCrossStatic;
}
# An output for an OCI image based on that binary
{
name = "oci-image-${crossSystem}";
value = mkOciImage
pkgsCrossStatic
self.packages.${system}.${binaryName};
}
]
)
[
"x86_64-unknown-linux-musl"
"aarch64-unknown-linux-musl"
]
)
);
devShells.default = pkgsHost.mkShell {
env = env pkgsHost // {
# Rust Analyzer needs to be able to find the path to default crate
# sources, and it can read this environment variable to do so. The
# `rust-src` component is required in order for this to work.
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
};
# Development tools
nativeBuildInputs = nativeBuildInputs pkgsHost ++ [
# Always use nightly rustfmt because most of its options are unstable
#
# This needs to come before `toolchain` in this list, otherwise
# `$PATH` will have stable rustfmt instead.
fenix.packages.${system}.latest.rustfmt
toolchain
] ++ (with pkgsHost; [
engage
# Needed for Complement
go
olm
# Needed for our script for Complement
jq
]);
};
});
}
-2
View File
@@ -1,2 +0,0 @@
podman build -t misc-webserver -f "Dockerfile"
podman save --format oci-archive localhost/misc-webserver:latest | gzip | ssh fedora@213.32.25.24 -T "zcat | sudo podman load"
+198
View File
@@ -0,0 +1,198 @@
# Conduit for Nix/NixOS
This guide assumes you have a recent version of Nix (^2.4) installed.
Since Conduit ships as a Nix flake, you'll first need to [enable
flakes][enable_flakes].
You can now use the usual Nix commands to interact with Conduit's flake. For
example, `nix run gitlab:famedly/conduit` will run Conduit (though you'll need
to provide configuration and such manually as usual).
If your NixOS configuration is defined as a flake, you can depend on this flake
to provide a more up-to-date version than provided by `nixpkgs`. In your flake,
add the following to your `inputs`:
```nix
conduit = {
url = "gitlab:famedly/conduit";
# Assuming you have an input for nixpkgs called `nixpkgs`. If you experience
# build failures while using this, try commenting/deleting this line. This
# will probably also require you to always build from source.
inputs.nixpkgs.follows = "nixpkgs";
};
```
Next, make sure you're passing your flake inputs to the `specialArgs` argument
of `nixpkgs.lib.nixosSystem` [as explained here][specialargs]. This guide will
assume you've named the group `flake-inputs`.
Now you can configure Conduit and a reverse proxy for it. Add the following to
a new Nix file and include it in your configuration:
```nix
{ config
, pkgs
, flake-inputs
, ...
}:
let
# You'll need to edit these values
# The hostname that will appear in your user and room IDs
server_name = "example.com";
# The hostname that Conduit actually runs on
#
# This can be the same as `server_name` if you want. This is only necessary
# when Conduit is running on a different machine than the one hosting your
# root domain. This configuration also assumes this is all running on a single
# machine, some tweaks will need to be made if this is not the case.
matrix_hostname = "matrix.${server_name}";
# An admin email for TLS certificate notifications
admin_email = "admin@${server_name}";
# These ones you can leave alone
# Build a dervation that stores the content of `${server_name}/.well-known/matrix/server`
well_known_server = pkgs.writeText "well-known-matrix-server" ''
{
"m.server": "${matrix_hostname}"
}
'';
# Build a dervation that stores the content of `${server_name}/.well-known/matrix/client`
well_known_client = pkgs.writeText "well-known-matrix-client" ''
{
"m.homeserver": {
"base_url": "https://${matrix_hostname}"
}
}
'';
in
{
# Configure Conduit itself
services.matrix-conduit = {
enable = true;
# This causes NixOS to use the flake defined in this repository instead of
# the build of Conduit built into nixpkgs.
package = flake-inputs.conduit.packages.${pkgs.system}.default;
settings.global = {
inherit server_name;
};
};
# Configure automated TLS acquisition/renewal
security.acme = {
acceptTerms = true;
defaults = {
email = admin_email;
};
};
# ACME data must be readable by the NGINX user
users.users.nginx.extraGroups = [
"acme"
];
# Configure NGINX as a reverse proxy
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
"${matrix_hostname}" = {
forceSSL = true;
enableACME = true;
listen = [
{
addr = "0.0.0.0";
port = 443;
ssl = true;
}
{
addr = "[::]";
port = 443;
ssl = true;
} {
addr = "0.0.0.0";
port = 8448;
ssl = true;
}
{
addr = "[::]";
port = 8448;
ssl = true;
}
];
locations."/_matrix/" = {
proxyPass = "http://backend_conduit$request_uri";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header Host $host;
proxy_buffering off;
'';
};
extraConfig = ''
merge_slashes off;
'';
};
"${server_name}" = {
forceSSL = true;
enableACME = true;
locations."=/.well-known/matrix/server" = {
# Use the contents of the derivation built previously
alias = "${well_known_server}";
extraConfig = ''
# Set the header since by default NGINX thinks it's just bytes
default_type application/json;
'';
};
locations."=/.well-known/matrix/client" = {
# Use the contents of the derivation built previously
alias = "${well_known_client}";
extraConfig = ''
# Set the header since by default NGINX thinks it's just bytes
default_type application/json;
# https://matrix.org/docs/spec/client_server/r0.4.0#web-browser-clients
add_header Access-Control-Allow-Origin "*";
'';
};
};
};
upstreams = {
"backend_conduit" = {
servers = {
"[::1]:${toString config.services.matrix-conduit.settings.global.port}" = { };
};
};
};
};
# Open firewall ports for HTTP, HTTPS, and Matrix federation
networking.firewall.allowedTCPPorts = [ 80 443 8448 ];
networking.firewall.allowedUDPPorts = [ 80 443 8448 ];
}
```
Now you can rebuild your system configuration and you should be good to go!
[enable_flakes]: https://nixos.wiki/wiki/Flakes#Enable_flakes
[specialargs]: https://nixos.wiki/wiki/Flakes#Using_nix_flakes_with_NixOS
-10
View File
@@ -1,10 +0,0 @@
{
"name": "workspace-root",
"private": true,
"pnpm": {
"patchedDependencies": {
"mdsvex@0.11.2": "patches/mdsvex@0.11.2.patch"
}
},
"packageManager": "pnpm@9.0.6+sha512.f6d863130973207cb7a336d6b439a242a26ac8068077df530d6a86069419853dc1ffe64029ec594a9c505a3a410d19643c870aba6776330f5cfddcf10a9c1617"
}
-2
View File
@@ -1,2 +0,0 @@
dist
node_modules
-43
View File
@@ -1,43 +0,0 @@
{
"name": "remark-callouts",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "dist/index.esm.js",
"exports": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"types": "dist/index.d.ts",
"scripts": {
"build": "rollup -c",
"prepublish": "rollup -c",
"dev": "rollup -c -w",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.6",
"@types/mdast": "^4.0.4",
"@types/node": "^20.14.2",
"@types/svg-parser": "^2.0.6",
"@types/trim": "^0.1.3",
"@types/unist": "^3.0.2",
"mdast": "^3.0.0",
"rollup": "^4.18.0",
"rollup-plugin-dts": "^6.1.1",
"unified": "^6.2.0"
},
"files": [
"dist"
],
"dependencies": {
"mdast-util-from-markdown": "^1.3.1",
"svg-parser": "^2.0.4",
"trim": "^0.0.1",
"unist-util-visit": "^4.1.2"
}
}
-20
View File
@@ -1,20 +0,0 @@
// rollup.config.js
import typescript from '@rollup/plugin-typescript';
import { dts } from "rollup-plugin-dts";
import pkg from './package.json' with { type: "json" };
export default [
{
input: 'src/index.ts',
output: [
{ file: pkg.exports.require, format: 'cjs' },
{ file: pkg.exports.import, format: 'es' }
],
plugins: [typescript()]
},
{
input: 'src/index.ts',
output: [{ file: pkg.exports.types, format: 'es' }],
plugins: [dts()],
}
];
-324
View File
@@ -1,324 +0,0 @@
import { visit } from "unist-util-visit";
import { fromMarkdown } from "mdast-util-from-markdown";
// @ts-ignore
import type { Plugin } from "unified";
import type { Node, Data, Parent } from "unist";
import type { Blockquote, Heading, Text, BlockContent } from "mdast";
import { parse } from "svg-parser";
// import { calloutTypes } from "./calloutTypes";
// escape regex special characters
function escapeRegExp(s: string) {
return s.replace(new RegExp(`[-[\\]{}()*+?.\\\\^$|/]`, "g"), "\\$&");
}
import tok from "./tokeniseCallout"
function trim(str: string){
return str.replace(/^\s*|\s*$/g, '');
}
export interface Config {
// classNameMaps: {
// block: ClassNameMap;
// title: ClassNameMap;
// };
// dataMaps: {
// block: (data: Data) => Data;
// title: (data: Data) => Data;
// };
// types: { [index: string]: string | object };
}
export const defaultConfig: Config = {
// classNameMaps: {
// block: "callout",
// title: "callout-title",
// },
// dataMaps: {
// block: (data) => data,
// title: (data) => data,
// },
// types: { ...calloutTypes },
};
type ClassNames = string | string[];
type ClassNameMap = ClassNames | ((title: string) => ClassNames);
function formatClassNameMap(gen: ClassNameMap) {
return (title: string) => {
const classNames = typeof gen == "function" ? gen(title) : gen;
return typeof classNames == "object" ? classNames.join(" ") : classNames;
};
}
export const callouts: Plugin = function (providedConfig?: Partial<Config>) {
const config: Config = { ...defaultConfig, ...providedConfig };
// const defaultKeywords: string = Object.keys(config.types)
// .map(escapeRegExp)
// .join("|");
// @ts-ignore
const Parser = this.Parser
const blockTokenizers = Parser.prototype.blockTokenizers
const blockMethods = Parser.prototype.blockMethods
// console.log(blockMethods, blockTokenizers)
blockTokenizers.callout = tok
// console.log(blockTokenizers.blockquote.toString())
var insertPoint = blockMethods.indexOf('fencedCode') + 1
blockMethods.splice(insertPoint, 0, 'callout')
// @ts-ignore
const Compiler = this.Compiler
if (Compiler != null) {
const visitors = Compiler.prototype.visitors
if (visitors) {
visitors.callout = function (node: { keyword: string; title: string; }) {
var values = this.block(node).split('\n');
var result = [];
var length = values.length;
var index = -1;
var value;
while (++index < length) {
value = values[index];
result[index] = (value ? ' ' : '') + value;
}
return '> [!'+node.keyword+'] ' + node.title + '\n' + result.join('\n>');
}
}
}
// return function (tree) {
// visit(tree, (node: Node, index, parent: Parent) => {
// // Filter required elems
// if (node.type !== "blockquote") return;
// /** add breaks to text without needing spaces or escapes (turns enters into <br>)
// * code taken directly from remark-breaks,
// * see https://github.com/remarkjs/remark-breaks for more info on what this does.
// */
// // visit(node, "text", (node: Text, index: number, parent: Parent) => {
// // const result = [];
// // let start = 0;
// // find.lastIndex = 0;
// // let match = find.exec(node.value);
// // while (match) {
// // const position = match.index;
// // if (start !== position) {
// // result.push({
// // type: "text",
// // value: node.value.slice(start, position),
// // });
// // }
// // result.push({ type: "break" });
// // start = position + match[0].length;
// // match = find.exec(node.value);
// // }
// // if (result.length > 0 && parent && typeof index === "number") {
// // if (start < node.value.length) {
// // result.push({ type: "text", value: node.value.slice(start) });
// // }
// // parent.children.splice(index, 1, ...result);
// // return index + result.length;
// // }
// // });
// /** add classnames to headings within blockquotes,
// * mainly to identify when using other plugins that
// * might interfere. for eg, rehype-auto-link-headings.
// */
// visit(node, "heading", (node) => {
// const heading = node as Heading;
// heading.data = {
// hProperties: {
// className: "blockquote-heading",
// },
// };
// });
// // wrap blockquote in a div
// const wrapper = {
// ...node,
// type: "element",
// tagName: "div",
// data: {
// hProperties: {},
// },
// children: [node],
// };
// parent.children.splice(Number(index), 1, wrapper);
// const blockquote = wrapper.children[0] as Blockquote;
// blockquote.data = {
// hProperties: {
// className: "blockquote",
// },
// };
// console.log(blockquote)
// // check for callout syntax starts here
// if (
// blockquote.children.length <= 0 ||
// blockquote.children[0].type !== "paragraph"
// )
// return;
// const paragraph = blockquote.children[0];
// console.log(paragraph)
// if (
// paragraph.children.length <= 0 ||
// paragraph.children[0].type !== "text"
// )
// return;
// const [t, ...rest] = paragraph.children;
// const regex = new RegExp(
// `^\\[!(?<keyword>(.*?))\\][\t\f ]?(?<title>.*?)$`,
// "gi"
// );
// const m = regex.exec(t.value);
// // if no callout syntax, forget about it.
// if (!m) return;
// const [key, title] = [m.groups?.keyword, m.groups?.title];
// // if there's nothing inside the brackets, is it really a callout ?
// if (!key) return;
// const keyword = key.toLowerCase();
// // const isOneOfKeywords: boolean = new RegExp(defaultKeywords).test(
// // keyword
// // );
// if (title) {
// const mdast = fromMarkdown(title.trim()).children[0];
// if (mdast.type === "heading") {
// mdast.data = {
// ...mdast.data,
// hProperties: {
// className: "blockquote-heading",
// },
// };
// }
// blockquote.children.unshift(mdast as BlockContent);
// } else {
// t.value =
// typeof keyword.charAt(0) === "string"
// ? keyword.charAt(0).toUpperCase() + keyword.slice(1)
// : keyword;
// }
// const entry: { [index: string]: string } = {};
// // if (isOneOfKeywords) {
// // if (typeof config?.types[keyword] === "string") {
// // const e = String(config?.types[keyword]);
// // Object.assign(entry, config?.types[e]);
// // } else {
// // Object.assign(entry, config?.types[keyword]);
// // }
// // } else {
// // Object.assign(entry, config?.types["note"]);
// // }
// let parsedSvg;
// if (entry && entry.svg) {
// parsedSvg = parse(entry.svg);
// }
// // create icon and title node wrapped in div
// const titleNode: object = {
// type: "element",
// children: [
// {
// type: "element",
// tagName: "span",
// data: {
// hName: "span",
// hProperties: {
// style: `color:${entry?.color}`,
// className: "callout-icon",
// },
// hChildren: parsedSvg?.children ? parsedSvg.children : [],
// },
// },
// {
// type: "element",
// children: title ? [blockquote.children[0]] : [t],
// data: {
// hName: "strong",
// },
// },
// ],
// data: {
// ...blockquote.children[0]?.data,
// hProperties: {
// className: `${formatClassNameMap(config.classNameMaps.title)(
// keyword
// )} ${"note"}`,
// style: `background-color: ${entry?.color}1a;`,
// },
// },
// };
// // remove the callout paragraph from the content body
// if (title) {
// blockquote.children.shift();
// }
// if (rest.length > 0) {
// rest.shift();
// paragraph.children = rest;
// } else {
// blockquote.children.shift();
// }
// // wrap blockquote content in div
// const contentNode: object = {
// type: "element",
// children: blockquote.children,
// data: {
// hProperties: {
// className: "callout-content",
// style:
// parent.type !== "root"
// ? `border-right:1px solid ${entry?.color}33;
// border-bottom:1px solid ${entry?.color}33;`
// : "",
// },
// },
// };
// if (blockquote.children.length > 0)
// blockquote.children = [contentNode] as BlockContent[];
// blockquote.children.unshift(titleNode as BlockContent);
// // Add classes for the callout block
// blockquote.data = config.dataMaps.block({
// ...blockquote.data,
// hProperties: {
// className: formatClassNameMap(config.classNameMaps.block)(
// keyword.toLowerCase()
// ),
// style: `border-left-color:${entry?.color};`,
// },
// });
// });
// };
};
export default callouts;
@@ -1,245 +0,0 @@
'use strict';
import trim from "trim";
export default blockquote;
var C_NEWLINE = '\n';
var C_TAB = '\t';
var C_SPACE = ' ';
var C_GT = '>';
// TODO:
// - Grow/shrink support
// - Customise AST output
/* Tokenise a blockquote. */
function blockquote(eat: { (arg0: string): any; (arg0: string): any; now: any; }, value: string, silent: boolean) {
var self = this;
var offsets = self.offset;
var tokenizers = self.blockTokenizers;
var interruptors = [
['indentedCode', { commonmark: true }],
['fencedCode', { commonmark: true }],
['atxHeading', { commonmark: true }],
['setextHeading', { commonmark: true }],
['thematicBreak', { commonmark: true }],
['html', { commonmark: true }],
['list', { commonmark: true }],
['definition', { commonmark: false }],
['footnote', { commonmark: false }]
];
var now = eat.now();
var currentLine = now.line;
var length = value.length;
var values = [];
var contents = [];
var indents = [];
var add;
var index = 0;
var character;
var rest;
var nextIndex;
var content;
var line;
var startIndex;
var prefixed;
var exit;
while (index < length) {
character = value.charAt(index);
if (character !== C_SPACE && character !== C_TAB) {
break;
}
index++;
}
if (value.charAt(index) !== C_GT) {
return;
}
const regex = /^>\s*\[!(?<keyword>(.*?))\][\t\f ]?(?<title>.*?)$/i;
nextIndex = value.indexOf(C_NEWLINE, index);
content = value.slice(index, nextIndex);
const m = regex.exec(content); // value.slice(index)
if (!m) {
return;
}
if (!m.groups?.keyword) return;
if (silent) {
return true;
}
index = 0;
let titleLine = true
while (index < length) {
nextIndex = value.indexOf(C_NEWLINE, index);
startIndex = index;
prefixed = false;
if (nextIndex === -1) {
nextIndex = length;
}
while (index < length) {
character = value.charAt(index);
if (character !== C_SPACE && character !== C_TAB) {
break;
}
index++;
}
if (value.charAt(index) === C_GT) {
index++;
prefixed = true;
if (value.charAt(index) === C_SPACE) {
index++;
}
} else {
index = startIndex;
}
// regex.lastIndex = index
content = value.slice(index, nextIndex);
if (!prefixed && !trim(content)) {
index = startIndex;
break;
}
if (!prefixed) {
rest = value.slice(index);
/* Check if the following code contains a possible
* block. */
if (interrupt(interruptors, tokenizers, self, [eat, rest, true])) {
break;
}
}
line = startIndex === index ? content : value.slice(startIndex, nextIndex);
indents.push(index - startIndex);
values.push(line);
if (titleLine) {
titleLine = false
} else {
contents.push(content);
}
index = nextIndex + 1;
}
index = -1;
length = indents.length;
add = eat(values.join(C_NEWLINE));
while (++index < length) {
offsets[currentLine] = (offsets[currentLine] || 0) + indents[index];
currentLine++;
}
exit = self.enterBlock();
const title = self.tokenizeInline(m.groups?.title, now);
contents = self.tokenizeBlock(contents.join(C_NEWLINE), now);
exit();
// console.log(title,)
return add({
type: 'callout',
children: [{
type: "heading",
children: title,
data: { hName: 'svelte:fragment',
hProperties: {
slot: "title"
} }
}, {
type: "block",
children: contents,
data: { hName: 'svelte:fragment',
hProperties: {
slot: "body"
} }
}],
keyword: m.groups?.keyword,
data: {
hName: 'Components.Callout',
hProperties: {
"calloutType": m.groups?.keyword
},
}
});
// return add({
// type: 'callout',
// children: [{
// type: "heading",
// children: title,
// data: { hName: 'div',
// hProperties: {
// className: "callout-title"
// } }
// }, {
// type: "block",
// children: contents,
// data: { hName: 'div',
// hProperties: {
// className: "callout-content"
// } }
// }],
// keyword: m.groups?.keyword,
// data: {
// hName: 'div',
// hProperties: {
// className: "callout",
// "data-callout": m.groups?.keyword
// },
// }
// });
}
function interrupt(interruptors, tokenizers, ctx, params) {
var bools = ['pedantic', 'commonmark'];
var count = bools.length;
var length = interruptors.length;
var index = -1;
var interruptor;
var config;
var fn;
var offset;
var bool;
var ignore;
while (++index < length) {
interruptor = interruptors[index];
config = interruptor[1] || {};
fn = interruptor[0];
offset = -1;
ignore = false;
while (++offset < count) {
bool = bools[offset];
if (config[bool] !== undefined && config[bool] !== ctx.options[bool]) {
ignore = true;
break;
}
}
if (ignore) {
continue;
}
if (tokenizers[fn].apply(ctx, params)) {
return true;
}
}
return false;
}
-14
View File
@@ -1,14 +0,0 @@
{
"compilerOptions": {
"target": "es2020",
"module": "esnext",
"strict": true,
"esModuleInterop": true,
"moduleResolution": "node",
"skipLibCheck": true,
"noImplicitAny": true,
"allowJs": true,
"noEmit": true,
"resolveJsonModule": true
}
}
@@ -1,2 +0,0 @@
dist
node_modules
@@ -1,38 +0,0 @@
{
"name": "vite-plugin-thumbhash-svg",
"version": "1.0.0",
"description": "",
"type": "module",
"main": "dist/index.esm.js",
"exports": {
"import": "./dist/index.esm.js",
"require": "./dist/index.cjs.js",
"types": "./dist/index.d.ts"
},
"types": "dist/index.d.ts",
"scripts": {
"build": "rollup -c",
"prepublish": "rollup -c",
"dev": "rollup -c -w",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.6",
"@types/node": "^20.14.2",
"rollup": "^4.18.0",
"rollup-plugin-dts": "^6.1.1",
"vite": "^5.3.1"
},
"files": [
"dist"
],
"dependencies": {
"@napi-rs/canvas": "^0.1.53",
"@resvg/resvg-js": "^2.6.2",
"@rollup/pluginutils": "^5.1.0",
"thumbhash-node": "^0.1.3"
}
}
@@ -1,20 +0,0 @@
// rollup.config.js
import typescript from '@rollup/plugin-typescript';
import { dts } from "rollup-plugin-dts";
import pkg from './package.json' with { type: "json" };
export default [
{
input: 'src/index.ts',
output: [
{ file: pkg.exports.require, format: 'cjs' },
{ file: pkg.exports.import, format: 'es' }
],
plugins: [typescript()]
},
{
input: 'src/index.ts',
output: [{ file: pkg.exports.types, format: 'es' }],
plugins: [dts()],
}
];
@@ -1,236 +0,0 @@
import { createFilter } from '@rollup/pluginutils'
import { basename } from 'node:path'
import { relative } from 'node:path/posix'
import { readFile, access } from 'node:fs/promises'
import { constants } from 'node:fs'
import { extname } from 'node:path';
import { loadImage, createCanvas, ImageData } from '@napi-rs/canvas'
import { Resvg } from '@resvg/resvg-js'
import { rgbaToThumbHash, thumbHashToRGBA } from 'thumbhash-node'
import type { Plugin, ResolvedConfig } from 'vite'
export type OutputExtension = 'png' | 'jpg' | 'webp' | 'avif'
export type Options =
| {
include?: Array<string | RegExp> | string | RegExp
exclude?: Array<string | RegExp> | string | RegExp
outputExtension?: OutputExtension
}
| undefined
interface LoaderParams {
thumbSrc: string
thumbWidth: number
thumbHeight: number
originalSrc: string
originalWidth: number
originalHeight: number
}
const loader = (params: LoaderParams) => {
return `export default ${JSON.stringify(params)}`
}
async function loadImageAndConvertToRgba(path: string) {
const maxSize = 100
const imgPath = path
let image;
// console.log(path, extname(path))
if (extname(path) === ".svg") {
const svg = await readFile(imgPath);
const resvg = new Resvg(svg)
const render = resvg.render()
image = await loadImage(render.asPng())
} else {
// canvas handles all file loading for us
image = await loadImage(imgPath)
}
const width = image.width
const height = image.height
const scale = maxSize / Math.max(width, height)
const resizedWidth = Math.round(width * scale)
const resizedHeight = Math.round(height * scale)
const canvas = createCanvas(resizedWidth, resizedHeight)
const ctx = canvas.getContext('2d')
ctx.drawImage(image, 0, 0, resizedWidth, resizedHeight)
const imageData = ctx.getImageData(0, 0, resizedWidth, resizedHeight)
const rgba = new Uint8Array(imageData.data)
return {
originalWidth: width,
originalHeight: height,
height: imageData.height,
width: imageData.width,
rgba,
}
}
const fromRGBAToImageBuffer = (
rgba: Uint8Array,
mimeType: MimeType,
width: number,
height: number
) => {
const thumb = rgbaToThumbHash(width, height, rgba)
const transformedRgba = thumbHashToRGBA(thumb)
const imageData = new ImageData(
new Uint8ClampedArray(transformedRgba.rgba),
transformedRgba.width,
transformedRgba.height
)
const canvas = createCanvas(transformedRgba.width, transformedRgba.height)
const context = canvas.getContext('2d')
//@ts-ignore
context.putImageData(imageData, 0, 0)
//@ts-ignore
const buffer = canvas.toBuffer(mimeType)
return buffer
}
type MimeType = 'image/webp' | 'image/jpeg' | 'image/avif' | 'image/png'
const extToMimeTypeMap: Record<OutputExtension, MimeType> = {
avif: 'image/avif',
jpg: 'image/jpeg',
png: 'image/png',
webp: 'image/webp',
}
export const blurRE = /(?:\?|&)th(umb)?(?:&|$)/
const isThumbHash = (id: string) => {
return !!id.match(blurRE)
}
const cleanId = (id: string) => id.replace(blurRE, '')
const buildViteAsset = (referenceId: string) => `__VITE_ASSET__${referenceId}__`
const buildDataURL = (buf: Buffer, mimeType: MimeType) => {
const dataPrefix = `data:${mimeType};base64,`
const dataURL = `${dataPrefix}${buf.toString('base64')}`
return dataURL
}
async function exists(path: string) {
try {
await access(path, constants.F_OK)
return true
} catch {
return false
}
}
const thumbHash = (options: Options = {}): Plugin => {
const { include, exclude, outputExtension = 'png' } = options
const bufferMimeType = extToMimeTypeMap[outputExtension]
const filter = createFilter(include, exclude)
let config: ResolvedConfig
const cache = new Map<string, importItem>()
type importItem = {
thumbSrc: string;
thumbWidth: number;
thumbHeight: number;
originalSrc: string;
originalWidth: number;
originalHeight: number;
}
return {
name: 'vite-plugin-thumbhash',
enforce: 'pre',
configResolved(cfg) {
config = cfg
},
async load(id) {
if (!filter(id)) {
return null
}
if (isThumbHash(id)) {
const cleanedId = cleanId(id)
if (cache.has(id)) {
let loadedSource = cache.get(id) as importItem
if (config.command !== 'serve') {
const originalRefId = this.emitFile({
type: 'asset',
name: basename(cleanedId),
source: await readFile(cleanedId),
})
loadedSource.originalSrc = buildViteAsset(originalRefId);
}
return loader(loadedSource)
}
const { rgba, width, height, originalHeight, originalWidth } =
await loadImageAndConvertToRgba(cleanedId)
const buffer = fromRGBAToImageBuffer(
rgba,
bufferMimeType,
width,
height
)
const dataURL = buildDataURL(buffer, bufferMimeType)
// const referenceId = this.emitFile({
// type: 'asset',
// name: basename(cleanedId).replace(
// /\.(jpg)|(jpeg)|(png)|(webp)|(avif)|(svg)/g,
// `.${outputExtension}`
// ),
// source: buffer,
// })
const originalSrc = relative(config.root, cleanedId);
const loadedSource = {
thumbSrc: dataURL,
thumbWidth: width,
thumbHeight: height,
originalSrc,
originalWidth: originalWidth,
originalHeight: originalHeight,
}
cache.set(id, loadedSource)
if (config.command !== 'serve') {
const originalRefId = this.emitFile({
type: 'asset',
name: basename(cleanedId),
source: await readFile(cleanedId),
})
loadedSource.originalSrc = buildViteAsset(originalRefId);
}
return loader(loadedSource)
// import.meta.ROLLUP_FILE_URL_
}
return null
},
}
}
export { thumbHash }
@@ -1,14 +0,0 @@
{
"compilerOptions": {
"target": "es2020",
"module": "esnext",
"strict": true,
"esModuleInterop": true,
"moduleResolution": "node",
"skipLibCheck": true,
"noImplicitAny": true,
"allowJs": true,
"noEmit": true,
"resolveJsonModule": true
}
}
-14
View File
@@ -1,14 +0,0 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
.vercel
.output
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
output
Dockerfile
-20
View File
@@ -1,20 +0,0 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env.sentry-build-plugin
.env
.env.*.local
!.env.example
.vercel
.output
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
output
Notes-1.0.0.tgz
# Sentry Config File
.sentryclirc
# Sentry Config File
.env.sentry-build-plugin
-1
View File
@@ -1 +0,0 @@
engine-strict=true
-33
View File
@@ -1,33 +0,0 @@
# build the sapper app
FROM node:latest AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
ENV CI=1
RUN corepack enable
COPY ./../.. /app/
WORKDIR /app
# FROM base AS prod-deps
# RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --prod --frozen-lockfile
FROM base AS deps
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
# RUN cd packages/website; --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
FROM deps as build
ENV NODE_OPTIONS="--max-old-space-size=4096"
RUN cd packages/website; pnpm run build
RUN cd packages/website; node server-esbuild.js
FROM node:alpine
WORKDIR /app
COPY --from=build /app/packages/website/output .
COPY --from=build /app/packages/website/build/client ./client/
COPY --from=build /app/packages/website/build/prerendered ./prerendered/
COPY --from=base /app/packages/website/package.json ./package.json
ENV NODE_ENV production
EXPOSE 3000
CMD ["node", "."]
-44
View File
@@ -1,44 +0,0 @@
<div
style={{
display: 'flex',
height: '100%',
width: '100%',
padding: '10px 20px',
// alignItems: 'center',
justifyContent: 'center',
flexDirection: 'column',
backgroundImage: 'linear-gradient(to bottom, #dbf4ff, #eff3fc)',
fontSize: 60,
// letterSpacing: -2,
fontWeight: 700,
// textAlign: 'center',
}}
>
<div style={{
fontSize: 15,
fontWeight: 600,
textTransform: 'uppercase',
letterSpacing: 1,
margin: '25px 0 10px',
color: 'gray',
}}>jade.ellis.link
</div>
<div
style={{
backgroundImage: 'linear-gradient(90deg, rgb(30, 42, 85), rgb(22, 61, 120))',
backgroundClip: 'text',
'-webkit-background-clip': 'text',
color: 'transparent',
}}>The Potential Pitfalls of Pagination</div>
<aside style={{
fontSize: 20,
fontWeight: 500,
color:'#202020',
margin: '10px 0 10px',
}}>
Published on
· By Jade Ellis
· 4 min read
</aside>
</div>
-30
View File
@@ -1,30 +0,0 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
"vcs": {
"enabled": true,
"clientKind": "git",
"useIgnoreFile": true
},
"files": {
"ignoreUnknown": false,
"ignore": []
},
"formatter": {
"enabled": true,
"indentStyle": "tab"
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
},
"javascript": {
"formatter": {
"quoteStyle": "double"
}
}
}
-68
View File
@@ -1,68 +0,0 @@
const rootDomain = process.env.VITE_DOMAIN; // or your server IP for dev
import { SENTRY_HOST } from './src/lib/config.js';
import { SENTRY_REPORT_URL } from './src/lib/config.js';
const self = "'self'";
const none = "'none'";
/**
* @type {import("@sveltejs/kit").CspDirectives}
*/
const cspDirectives = {
'base-uri': [self],
'child-src': [self, "blob:"],
'connect-src': [self, "https://*.google-analytics.com", "https://" + SENTRY_HOST],
// 'connect-src': [self, 'ws://localhost:*', 'https://hcaptcha.com', 'https://*.hcaptcha.com'],
'img-src': [self, 'data:',
'https://*.googletagmanager.com'],
'font-src': [self, 'data:'],
'form-action': [self],
'frame-ancestors': [self],
'frame-src': [
self,
// "https://*.stripe.com",
// "https://*.facebook.com",
// "https://*.facebook.net",
// 'https://hcaptcha.com',
// 'https://*.hcaptcha.com',
],
'manifest-src': [self],
'media-src': [self, 'data:'],
'object-src': [none],
'style-src': [self, "unsafe-inline"],
// 'style-src': [self, "'unsafe-inline'", 'https://hcaptcha.com', 'https://*.hcaptcha.com'],
'default-src': [
'self',
...(rootDomain ? [rootDomain, `ws://${rootDomain}`] : []),
// 'https://*.google.com',
// 'https://*.googleapis.com',
// 'https://*.firebase.com',
// 'https://*.gstatic.com',
// 'https://*.cloudfunctions.net',
// 'https://*.algolia.net',
// 'https://*.facebook.com',
// 'https://*.facebook.net',
// 'https://*.stripe.com',
// 'https://*.sentry.io',
],
'script-src': [
self,
// "unsafe-inline", // chrome suggestion
'https://*.googletagmanager.com'
// 'https://*.stripe.com',
// 'https://*.facebook.com',
// 'https://*.facebook.net',
// 'https://hcaptcha.com',
// 'https://*.hcaptcha.com',
// 'https://*.sentry.io',
// 'https://polyfill.io',
],
'worker-src': [self, "blob:"],
// remove report-to & report-uri if you do not want to use Sentry reporting
'report-to': ["csp-endpoint"],
'report-uri': [
SENTRY_REPORT_URL,
],
};
export default cspDirectives;
-387
View File
@@ -1,387 +0,0 @@
// https://github.com/String10/Hakuba/blob/master/package.json
// import { defineMDSveXConfig as defineConfig } from "mdsvex";
// import type { Plugin, Settings } from 'unified';
import remarkGfm from "remark-gfm";
import remarkFrontmatter from "remark-frontmatter";
import remarkWikiLink from "remark-wiki-link";
import remarkMath from "remark-math"
// @ts-ignore
import remarkAbbr from "remark-abbr"
import remarkFootnotes from 'remark-footnotes'
import remarkCallouts from "remark-callouts";
import rehypeKatexSvelte from 'rehype-katex-svelte';
// import github from "remark-github";
import rehypeSlug from 'rehype-slug';
import remarkReadingTime from "remark-reading-time";
// import rehypeToc from '@jsdevtools/rehype-toc';
import { createHighlighter } from "@bitmachina/highlighter";
import { parse, format } from "node:path";
import slugify from 'slugify';
export const NOTE_ICON = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="2" x2="22" y2="6"></line><path d="M7.5 20.5 19 9l-4-4L3.5 16.5 2 22z"></path></svg>';
export const QUOTE_ICON = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 21c3 0 7-1 7-8V5c0-1.25-.756-2.017-2-2H4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2 1 0 1 0 1 1v1c0 1-1 2-2 2s-1 .008-1 1.031V20c0 1 0 1 1 1z"></path><path d="M15 21c3 0 7-1 7-8V5c0-1.25-.757-2.017-2-2h-4c-1.25 0-2 .75-2 1.972V11c0 1.25.75 2 2 2h.75c0 2.25.25 4-2.75 4v3c0 1 0 1 1 1z"></path></svg>';
export const INFO_ICON = '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>';
export const ICONS = {
note: NOTE_ICON,
quote: QUOTE_ICON,
info: INFO_ICON,
};
import { globSync } from 'glob'
import { readFileSync } from "node:fs";
import { fileURLToPath } from "node:url";
const projects = globSync('node_modules/Notes/Projects/*.md')
.map((filepath) => {
return parse(filepath)
})
.map((path) => {
return format({
// ...path,
name: slugify(path.name, { lower: true }),
// base: undefined,
// root: "",
// ext: undefined,
// dir: path.dir.replace("/node_modules/Notes/Projects", "")
})
})
/**
* @type {string[]}
*/
const permalinks = projects.map((p) => "/projects/" + p)
// console.log(permalinks)
/**
* @param {string} pageName
* @returns {string[]}
*/
function pageResolver(pageName) {
const slug = slugify(pageName, { lower: true });
return ["/", "/projects/"].map((p) => p + slug);
}
import { grammars } from 'tm-grammars'
// console.log()
/**
* @param {string} name
*/
function getGrammar(name) {
const metadata = grammars.find((grammar) => grammar.name == name)
if (!metadata) {
throw "Grammar not found"
}
return {
...metadata,
id: name,
grammar: JSON.parse(readFileSync(fileURLToPath(import.meta.resolve('tm-grammars/grammars/' + name + '.json')), 'utf8')),
}
}
const hrefTemplate = (/** @type {string} */ permalink) => permalink
// function customizeTOC(toc) {
// // console.log(toc)
// return {
// type: 'root',
// children: [{
// type: "element",
// // tagName: "svelte:component",
// // properties: { this: "{tocComponent}" },
// tagName: "div",
// properties: {},
// children: [toc],
// }]
// };
// }
/**
* @param {{level: number, title: string}[]} headings
*/
function buildNestedHeadings(headings) {
/**
* @type {{level: number, title: string, children: unknown}[]}
*/
const result = [];
const stack = [{ level: 0, children: result }];
for (const heading of headings) {
while (
stack.length > 1 &&
heading.level <= stack[stack.length - 1].level
) {
stack.pop();
}
const parent = stack[stack.length - 1];
const newHeading = {
...heading,
children: [],
level: heading.level,
};
parent.children.push(newHeading);
stack.push(newHeading);
}
return result;
}
import { visit } from 'unist-util-visit';
import { toString as mdast_tree_to_string } from 'mdast-util-to-string'
import GithubSlugger from 'github-slugger'
/**
* @param {{ prefix?: string; }} opts
*/
function add_toc_remark(opts) {
const slugs = new GithubSlugger()
const prefix = opts?.prefix || "";
return async function transformer(tree, vFile) {
slugs.reset()
vFile.data.flattenedHeadings = [];
visit(tree, 'heading', (node) => {
const title = mdast_tree_to_string(node);
vFile.data.flattenedHeadings.push({
level: node.depth,
title,
id: prefix + slugs.slug(title)
});
});
if (!vFile.data.fm) vFile.data.fm = {};
vFile.data.fm.flattenedHeadings = vFile.data.flattenedHeadings;
vFile.data.fm.headings = buildNestedHeadings(vFile.data.flattenedHeadings);
};
}
function add_data_to_fm(_opts) {
return async function transformer(tree, vFile) {
if (!vFile.data.fm) vFile.data.fm = {};
vFile.data.fm.readingTime = vFile.data.readingTime;
};
}
import { toString as hast_tree_to_string } from 'hast-util-to-string'
/**
* Determines whether the given node is an HTML element.
*/
function isHtmlElementNode(node) {
return typeof node === "object" &&
node.type === "element" &&
typeof node.tagName === "string" &&
"properties" in node &&
typeof node.properties === "object";
}
const HEADINGS = ["h1", "h2", "h3", "h4", "h5", "h6"]
/**
* Determines whether the given node is an HTML heading node, according to the specified options
*/
function isHeadingNode(node) {
return isHtmlElementNode(node) && HEADINGS.includes(node.tagName);
}
function add_toc_rehype(self, opts) {
return async function transformer(tree, vFile) {
// console.log(tree)
vFile.data.headings = [];
visit(tree, isHeadingNode, (node) => {
// console.log(node)
vFile.data.headings.push({
level: node.depth,
title: hast_tree_to_string(node),
});
});
if (!vFile.data.fm) vFile.data.fm = {};
vFile.data.fm.headings = vFile.data.headings;
};
}
import toCamel from "just-camel-case";
const RE_SCRIPT_START =
/<script(?:\s+?[a-zA-z]+(=(?:["']){0,1}[a-zA-Z0-9]+(?<!module)(?:["']){0,1}){0,1})*\s*?>/;
function vite_images_rehype(opts) {
return async function transformer(tree, vFile) {
const urls = new Map();
const url_count = new Map();
/**
* @param {string} url
*/
function transformUrl(url) {
// url = decodeURIComponent(url)
// console.log("decoded", url)
// filenames can start with digits,
// prepend underscore to guarantee valid module name
let camel = `_${toCamel(url)}`;
const count = url_count.get(camel);
const dupe = urls.get(url);
if (count && !dupe) {
url_count.set(camel, count + 1);
camel = `${camel}_${count}`;
} else if (!dupe) {
url_count.set(camel, 1);
}
urls.set(url, {
path: url,
id: camel
});
return camel;
}
// console.log(tree)
// vFile.data.headings = [];
// console.log(tree)
visit(tree, { tagName: "img" }, (node) => {
let url = node.properties.src;
url = (url.includes("?") ? url + "&" : url + "?") + "url";
node.properties.src = `{${transformUrl(url)}}`
// new URL('./img.png', import.meta.url).href
// vFile.data.headings.push({
// level: node.depth,
// title: hast_tree_to_string(node),
// });
});
visit(tree, { tagName: "Components.img" }, (node) => {
let url = node.properties.src;
const thumb = (url.includes("?") ? url + "&" : url + "?") + "thumb";
url = (url.includes("?") ? url + "&" : url + "?") + "url";
node.properties.src = `{${transformUrl(url)}}`
node.properties.thumb = `{${transformUrl(thumb)}}`
// node.properties.src = `{new URL('${url}', import.meta.url)}`
// new URL('./img.png', import.meta.url).href
// vFile.data.headings.push({
// level: node.depth,
// title: hast_tree_to_string(node),
// });
});
let scripts = "";
urls.forEach((x) => (scripts += `import ${x.id} from "./${x.path}";\n`));
// urls.forEach((x) => (scripts += `const ${x.id} = new URL("${x.path}", import.meta.url);\n`));
// console.log(scripts)
// urls.forEach((x) => {
// if (x.meta) {
// let a = ["src", "width", "height"]
// scripts += `import {${a.map((a) => a + " as " + x.id + "_" + a).join(",")}} from "${x.path.includes("?") ? x.path + "&as=metadata" : x.path + "?as=metadata:src;width;height"}";\n`
// }
// });
let is_script = false;
visit(tree, { type: "raw" }, (node) => {
// console.log(node)
if (RE_SCRIPT_START.test(node.value)) {
// console.log("inserting")
is_script = true;
node.value = node.value.replace(RE_SCRIPT_START, (script) => {
return `${script}\n${scripts}`;
});
}
});
if (!is_script) {
tree.children.push({
type: 'raw',
value: `<script>\n${scripts}</script>`,
})
}
};
}
/**
* @type {import("mdsvex").MdsvexOptions}
*/
const config = {
extensions: [".svelte.md", ".md", ".svx"],
// fences: true,
// ruleSpaces: false,
smartypants: {
dashes: "oldschool",
},
layout: {
_: "./src/lib/mdlayouts/default.svelte"
},
highlight: {
// @ts-ignore
highlighter: await createHighlighter({ theme: "github-dark", langs: ["http", "jsx", "javascript", "typescript", "rust"].map(getGrammar) }),
alias: {
ts: "typescript",
mdx: "markdown",
svelte: "svelte",
svx: "svx",
mdsvex: "svx",
sig: "ts",
}
},
remarkPlugins: [
// remarkFrontmatter,
// [github, {repository}],
remarkMath,
remarkAbbr,
[remarkFootnotes, { inlineNotes: true }],
remarkGfm,
[remarkCallouts, {}],
[remarkWikiLink, {
// @ts-ignore
aliasDivider: "|",
permalinks,
pageResolver,
hrefTemplate,
// wikiLinkClassName,
// newClassName,
}],
// [citePlugin, {
// syntax: {
// // see micromark-extension-cite
// enableAltSyntax: false,
// enablePandocSyntax: true,
// },
// toMarkdown: {
// // see mdast-util-cite
// standardizeAltSyntax: false,
// enableAuthorSuppression: true,
// useNodeValue: false,
// },
// }],
// [remarkBibliography, { bibliography }],
// [remarkMermaid, {}]
remarkReadingTime,
add_data_to_fm,
[add_toc_remark, { prefix: "h-" }]
],
rehypePlugins: [
// @ts-ignore
rehypeKatexSvelte,
// @ts-ignore
[rehypeSlug, { prefix: "h-" }],
vite_images_rehype
],
};
export default config;
-111
View File
@@ -1,111 +0,0 @@
{
"name": "website",
"version": "0.0.1",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"fix": "biome lint --write . && biome format --write . && biome check . --write"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@bitmachina/highlighter": "1.0.0-alpha.6",
"@fontsource/fira-mono": "^5.1.0",
"@json-feed-types/1_1": "^1.0.2",
"@rollup/pluginutils": "^5.1.3",
"@sentry/esbuild-plugin": "^2.22.6",
"@sveltejs/adapter-auto": "^3.3.1",
"@sveltejs/adapter-node": "^5.2.9",
"@sveltejs/kit": "^2.8.2",
"@sveltejs/vite-plugin-svelte": "^4.0.1",
"@types/fnv-plus": "^1.3.2",
"@types/node": "^20.17.7",
"@types/polka": "^0.5.7",
"@types/sharedworker": "^0.0.115",
"dotenv": "^16.4.5",
"esbuild": "^0.23.1",
"github-slugger": "^2.0.0",
"glob": "^10.4.5",
"hast-util-to-string": "^3.0.1",
"just-camel-case": "^6.2.0",
"mdast-util-to-string": "^4.0.0",
"mdsvex": "^0.11.2",
"rehype-katex-svelte": "~1.2.0",
"rehype-slug": "^6.0.0",
"remark-abbr": "^1.4.2",
"remark-callouts": "workspace:^",
"remark-footnotes": "^2.0.0",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.0",
"remark-github": "^12.0.0",
"remark-math": "^3.0.1",
"remark-reading-time": "^2.0.1",
"remark-wiki-link": "^0.0.4",
"rollup": "^4.27.4",
"rollup-plugin-type-as-json-schema": "^0.2.6",
"rollup-plugin-visualizer": "^5.12.0",
"schema-dts": "^1.1.2",
"sharp": "^0.33.5",
"svelte": "^5.2.7",
"svelte-check": "^4.1.0",
"svelte-seo": "^1.6.1",
"sveltekit-html-minifier": "^1.0.4",
"svgo": "^3.3.2",
"tm-grammars": "^1.19.5",
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"unified": "^11.0.5",
"unist-util-visit": "^5.0.0",
"vite": "^5.4.2",
"vite-plugin-image-optimizer": "^1.1.8",
"vite-plugin-thumbhash": "^0.1.6",
"vite-plugin-thumbhash-svg": "workspace:^"
},
"type": "module",
"dependencies": {
"@babel/preset-typescript": "^7.26.0",
"@codemirror/commands": "^6.7.1",
"@codemirror/lang-javascript": "^6.2.2",
"@codemirror/language": "^6.10.3",
"@codemirror/lint": "^6.8.3",
"@codemirror/state": "^6.4.1",
"@codemirror/view": "^6.35.0",
"@isaacs/ttlcache": "^1.4.1",
"@lezer/highlight": "^1.2.1",
"@octokit/types": "^13.6.1",
"@resvg/resvg-js": "^2.6.2",
"@sentry/sveltekit": "^8.40.0",
"@steeze-ui/svelte-icon": "^1.6.2",
"@tabler/icons-svelte": "^3.22.0",
"@tusbar/cache-control": "^1.0.2",
"@uiw/codemirror-theme-github": "^4.23.6",
"Notes": "file:Notes-1.0.0.tgz",
"acorn": "^8.14.0",
"codemirror": "^6.0.1",
"fnv-plus": "^1.3.1",
"magic-string": "^0.30.13",
"octokit": "^3.2.1",
"satori": "^0.10.14",
"slugify": "^1.6.6",
"super-sitemap": "^0.14.20",
"svelte-codemirror-editor": "^1.4.1",
"terser": "^5.36.0",
"xmlbuilder2": "^3.1.1"
},
"targets": {
"module": {
"context": "node",
"engines": {
"node": ">= 20"
},
"outputFormat": "esmodule",
"optimize": true,
"includeNodeModules": true
}
},
"@parcel/resolver-default": {
"packageExports": true
}
}
-60
View File
@@ -1,60 +0,0 @@
import { sentryEsbuildPlugin } from "@sentry/esbuild-plugin";
import esbuild from "esbuild";
// https://github.com/evanw/esbuild/pull/2067
const ESM_REQUIRE_SHIM = `
await (async () => {
const { dirname } = await import("path");
const { fileURLToPath } = await import("url");
/**
* Shim entry-point related paths.
*/
if (typeof globalThis.__filename === "undefined") {
globalThis.__filename = fileURLToPath(import.meta.url);
}
if (typeof globalThis.__dirname === "undefined") {
globalThis.__dirname = dirname(globalThis.__filename);
}
/**
* Shim require if needed.
*/
if (typeof globalThis.require === "undefined") {
const { default: module } = await import("module");
globalThis.require = module.createRequire(import.meta.url);
}
})();
`;
const banner = {
"js": ESM_REQUIRE_SHIM
};
esbuild.build({
sourcemap: true, // Source map generation must be turned on
platform: "node", // Node.js platform
target: "node22.0", // Node.js version
entryPoints: ["./build/index.js"], // Entry point file
outdir: "./output", // Output directory
bundle: true, // Generate an external bundle
splitting: true, // Enable code splitting
format: "esm", // Output format
loader: {
".node": "copy",
},
alias: {
"perf_hooks": "node:perf_hooks",
},
banner,
plugins: [
// Put the Sentry esbuild plugin after all other plugins
sentryEsbuildPlugin({
org: "jade-ellis",
project: "jade-website-sveltekit",
authToken: process.env.SENTRY_AUTH_TOKEN,
sourcemaps: {
// Specify the directory containing build artifacts
assets: "./output/**",
}
}),
],
});
-15
View File
@@ -1,15 +0,0 @@
// See https://kit.svelte.dev/docs/types#app
// for information about these interfaces
import type { Middleware } from "polka"
type Req = Parameters<Middleware>[0]
declare global {
namespace App {
// interface Error {}
// interface Locals {}
// interface PageData {}
// interface PageState {}
interface Platform {
req: Req
}
}
}
-12
View File
@@ -1,12 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
<script async defer src="https://www.googletagmanager.com/gtag/js?id=G-Q2R5PQL59Z"></script>
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
-30
View File
@@ -1,30 +0,0 @@
import { SENTRY_DSN } from '$lib/config';
import { init as initSentry, handleErrorWithSentry, makeBrowserOfflineTransport, makeFetchTransport, feedbackIntegration } from '@sentry/sveltekit';
initSentry({
dsn: SENTRY_DSN,
environment: import.meta.env.MODE,
tracesSampleRate: 1.0,
// This sets the sample rate to be 10%. You may want this to be 100% while
// in development and sample at a lower rate in production
replaysSessionSampleRate: 0.0,
// If the entire session is not sampled, use the below sample rate to sample
// sessions when an error occurs.
replaysOnErrorSampleRate: 1.0,
integrations: [feedbackIntegration({
autoInject: false,
})],
// replay:
// - https://github.com/getsentry/sentry-javascript/tree/develop/packages/replay-worker
// https://docs.sentry.io/platforms/javascript/guides/solidstart/session-replay/configuration/#using-a-custom-compression-worker
// To enable offline events caching, use makeBrowserOfflineTransport to wrap
// existing transports and queue events using the browsers' IndexedDB storage
transport: makeBrowserOfflineTransport(makeFetchTransport),
});
// If you have a custom error handler, pass it to `handleErrorWithSentry`
export const handleError = handleErrorWithSentry();
-61
View File
@@ -1,61 +0,0 @@
import { sequence } from '@sveltejs/kit/hooks';
import { init as initSentry, handleErrorWithSentry, sentryHandle } from '@sentry/sveltekit';
import type { Handle } from "@sveltejs/kit";
import { randomBytes } from 'crypto';
import { SENTRY_DSN, SENTRY_REPORT_URL } from '$lib/config';
// import { nodeProfilingIntegration } from "@sentry/profiling-node";
initSentry({
dsn: SENTRY_DSN,
environment: import.meta.env.MODE,
tracesSampleRate: 1.0,
// profilesSampleRate: 1.0,
integrations: [
],
})
const securityHeaders = {
'X-Content-Type-Options': 'nosniff',
'X-XSS-Protection': '0',
"Referrer-Policy": "no-referrer-when-downgrade",
"Permissions-Policy": "payment=(), geolocation=(self), fullscreen=(self)",
'Cross-Origin-Embedder-Policy': 'require-corp',
'Cross-Origin-Opener-Policy': 'same-origin',
'Cross-Origin-Resource-Policy': 'same-origin',
'Report-To': '{"group":"csp-endpoint","max_age":10886400,"endpoints":[{"url":"' + SENTRY_REPORT_URL + '"}],"include_subdomains":true}',
}
export const handle: Handle = async (input) => {
const sentryNonce = randomBytes(16).toString('hex');
return await sequence(
sentryHandle({
// injectFetchProxyScript: false,
fetchProxyScriptNonce: sentryNonce,
}),
async ({ event, resolve }) => {
const response = await resolve(event);
const csp = response.headers.get("Content-Security-Policy");
if (csp) {
response.headers.set("Content-Security-Policy", csp.replace("script-src", "script-src 'nonce-" + sentryNonce + "'"));
}
Object.entries(securityHeaders).forEach(
([header, value]) => {
if (!response.headers.has(header)) {
response.headers.set(header, value)
}
}
);
response.headers.delete("x-sveltekit-page")
return response;
}
)(input)
}
export const handleError = handleErrorWithSentry();
-37
View File
@@ -1,37 +0,0 @@
<script lang="ts">
import { IconExclamationCircle } from "@tabler/icons-svelte";
interface Props {
calloutType: string;
icon?: import('svelte').Snippet;
title?: import('svelte').Snippet;
body?: import('svelte').Snippet;
}
let {
calloutType,
icon,
title,
body
}: Props = $props();
</script>
<div class="callout" data-callout={calloutType}>
<div class="callout-title">
{#if icon}
<div class="callout-icon">{@render icon?.()}</div>
{:else}
<div class="callout-icon"><IconExclamationCircle /></div>
{/if}
<div class="callout-title-inner">
{#if title}{@render title()}{:else}{calloutType.replace(/\w\S*/g, function (txt) {
return (
txt.charAt(0).toUpperCase() +
txt.substring(1).toLowerCase()
);
})}{/if}
</div>
</div>
{#if body}
<div class="callout-body">{@render body?.()}</div>
{/if}
</div>
-301
View File
@@ -1,301 +0,0 @@
<script lang="ts" module>
type Attrs = {
[name: string]: string;
};
type AttrSource = Attrs | ((view: EditorView) => Attrs | null);
</script>
<script lang="ts">
import { run } from 'svelte/legacy';
// look at https://github.com/sveltejs/learn.svelte.dev/blob/main/src/routes/tutorial/%5Bslug%5D/Editor.svelte
// import { javascript } from "@codemirror/lang-javascript";
import { onDestroy, onMount, createEventDispatcher } from "svelte";
import { theme } from "$lib/theme";
import { githubLight, githubDark } from "$lib/themes/github";
import { EditorView } from "@codemirror/view";
import {
EditorState,
StateEffect,
type Extension,
} from "@codemirror/state";
import { type LanguageSupport } from "@codemirror/language";
import { get_base_extensions } from "./editorExtensions";
interface Props {
value?: string;
contentAttributes?: AttrSource | null;
lang?: LanguageSupport | null;
useTab?: boolean;
tabSize?: number;
lineWrapping?: boolean;
editable?: boolean;
readonly?: boolean;
placeholder?: string | HTMLElement | null | undefined;
header?: import('svelte').Snippet;
}
let {
value = $bindable(""),
contentAttributes = null,
lang = null,
useTab = true,
tabSize = 2,
lineWrapping = false,
editable = true,
readonly = false,
placeholder = undefined,
header
}: Props = $props();
const is_browser = typeof window !== "undefined";
let element: HTMLDivElement = $state();
let view: EditorView = $state();
let update_from_prop = false;
let update_from_state = false;
let first_config = true;
let first_update = true;
let langPlugin = null;
let extensions: Extension[] = [];
if (langPlugin !== null) extensions.push(langPlugin);
if (contentAttributes !== null)
extensions.push(EditorView.contentAttributes.of(contentAttributes));
onMount(() => {
view = create_editor_view();
dispatch("ready", view);
});
onDestroy(() => view?.destroy());
const dispatch = createEventDispatcher<{
change: string;
ready: EditorView;
reconfigure: EditorView;
}>();
function create_editor_view(): EditorView {
return new EditorView({
parent: element,
state: create_editor_state(value),
dispatch(transaction) {
view.update([transaction]);
if (!update_from_prop && transaction.docChanged) {
on_change();
}
},
});
}
function reconfigure(): void {
if (first_config) {
first_config = false;
return;
}
view.dispatch({
effects: StateEffect.reconfigure.of(state_extensions),
});
dispatch("reconfigure", view);
}
function update(value: string | null | undefined): void {
if (first_update) {
first_update = false;
return;
}
if (update_from_state) {
update_from_state = false;
return;
}
update_from_prop = true;
if (value === undefined) {
return;
}
const currentValue = view ? view.state.doc.toString() : "";
if (view && value !== currentValue) {
view.dispatch({
changes: {
from: 0,
to: currentValue.length,
insert: value || "",
},
});
}
update_from_prop = false;
}
function handle_change(): void {
const new_value = view.state.doc.toString();
if (new_value === value) return;
update_from_state = true;
value = new_value;
dispatch("change", value);
}
function create_editor_state(
value: string | null | undefined,
): EditorState {
return EditorState.create({
doc: value ?? undefined,
extensions: state_extensions,
});
}
// $: console.log(value)
// import { linter, lintGutter } from "@codemirror/lint";
// import * as eslint from "eslint-linter-browserify";
// lintGutter(),
// linter(esLint(new eslint.Linter(), config)),
run(() => {
view && update(value);
});
let state_extensions = $derived([
...get_base_extensions(
useTab,
tabSize,
lineWrapping,
placeholder,
editable,
readonly,
lang,
),
$theme == "dark" ? githubDark : githubLight,
...extensions,
]);
run(() => {
view && state_extensions && reconfigure();
});
let on_change = $derived(handle_change);
</script>
<div class="editor-wrapper card" class:no-header={!header}>
{#if header}
<div class="header">
{@render header?.()}
</div>
{/if}
{#if is_browser}
<div class="codemirror-wrapper editor" bind:this={element}></div>
{:else}
<div class="scm-waiting editor">
<div class="scm-waiting__loading scm-loading">
<div class="scm-loading__spinner"></div>
<p class="scm-loading__text">Loading editor...</p>
</div>
<div class="cm-editor"><pre class="scm-pre">{value}</pre></div>
</div>
{/if}
<!-- <CodeMirror
{value}
class="editor"
theme={$theme == "dark" ? githubDark : githubLight}
{extensions}
{readonly}
on:change
/> -->
</div>
<!-- <CodeMirror basic={true} bind:value lang={javascript({})} class="editor" /> -->
<style>
.editor-wrapper {
/* min-height: 200px; */
position: relative;
z-index: 1;
background-color: var(--surface-secondary-color);
}
.codemirror-wrapper :global(.cm-focused) {
outline: none;
}
.scm-waiting {
position: relative;
}
.scm-waiting__loading {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: var(--shadow-color);
}
.scm-loading {
display: flex;
align-items: center;
justify-content: center;
}
.scm-loading__spinner {
width: 1rem;
height: 1rem;
border-radius: 100%;
border: solid 2px var(--theme);
border-top-color: transparent;
margin-right: 0.75rem;
animation: spin 1s linear infinite;
}
.scm-loading__text {
font-family: sans-serif;
}
.scm-pre {
font-size: 0.85rem;
margin: 0;
padding: 4px 2px 4px 6px;
font-family: monospace;
tab-size: 2;
-moz-tab-size: 2;
resize: none;
pointer-events: none;
user-select: none;
overflow: auto;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
:global(.editor-wrapper .cm-scroller, .editor-wrapper .cm-editor) {
min-height: 200px;
border-bottom-left-radius: var(--border-radius);
border-bottom-right-radius: var(--border-radius);
/* box-shadow: var(--shadow);
background-color: var(--surface-color); */
}
:global(
.editor-wrapper.no-header .cm-scroller,
.editor-wrapper.no-header .cm-editor
) {
border-radius: var(--border-radius);
}
:global(pre.cm-editor) {
margin: 0;
}
</style>
-16
View File
@@ -1,16 +0,0 @@
<script lang="ts">
import manifest from "./site.webmanifest?url";
import logo from "./logo.svg?url";
</script>
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/svg+xml" href={logo}>
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href={manifest}>
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#0064e0">
<meta name="msapplication-TileColor" content="#1e2a55">
<meta name="theme-color" content="#1e2a55">
-137
View File
@@ -1,137 +0,0 @@
<script lang="ts">
import * as Sentry from "@sentry/sveltekit";
import url from "./logo.svg?url";
import { SITE_URL } from "$lib/metadata";
/** @type {Record<string, { href: string; title: string; }[]>} */
const links = {
Connect: [
{
href: "https://matrix.to/#/@jade:ellis.link",
title: "Matrix",
},
{ href: "https://github.com/JadedBlueEyes", title: "GitHub" },
{ href: "https://tech.lgbt/@JadedBlueEyes", title: "Mastodon" },
{
href: "https://bsky.app/profile/jade.ellis.link",
title: "Bluesky",
},
{
href: "https://www.linkedin.com/in/jadedblueeyes",
title: "LinkedIn",
},
],
Feeds: [
{ href: SITE_URL + "/blog/rss.xml", title: "RSS (Atom)" },
{ href: SITE_URL + "/blog/feed.json", title: "JSON Feed" },
]
};
const sendFeedback = async () => {
const feedback = Sentry.getFeedback();
if (!feedback) {
return;
}
const form = await feedback.createForm({});
form.appendToDom();
form.open();
};
</script>
<div class="background">
<footer class="container">
<div class="logo">
<a class="footer-link-home" href={SITE_URL}>
<img
src={url}
class="footer-logo"
alt=""
width="28"
height="28"
/>
<span class="site-name">Jade Ellis</span>
</a>
<button onclick={sendFeedback} class="feedback-button">Report a bug</button>
</div>
{#each Object.entries(links) as [title, inner_links]}
<div class="links">
<h2>{title}</h2>
{#each inner_links as { href, title }}
<a {href}>{title}</a>
{/each}
</div>
{/each}
<div class="copyright">© 2024 Jade Ellis</div>
<!-- <div class="feedback">
</div> -->
</footer>
</div>
<style>
.background {
background-color: var(--surface-color);
margin-block-start: 4em;
}
footer {
padding: 12px var(--spacing);
margin: 0 auto;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-rows: 1fr;
grid-row-gap: 6rem;
}
.container {
--container-max-width: calc(var(--page-width) + 6rem + 16px);
}
footer h2 {
font-size: var(--sk-text-m);
padding-bottom: 1rem;
}
.links a {
display: block;
line-height: 1.8;
}
.copyright {
grid-column: span 2;
}
@media (min-width: 500px) {
footer {
grid-template-columns: repeat(3, 1fr);
}
footer .logo {
display: block;
}
.copyright {
grid-column: span 1;
}
.feedback {
display: block;
}
}
.footer-logo {
width: 3rem;
height: 100%;
}
.footer-link-home {
display: flex;
gap: 4px;
align-items: center;
padding: 8px;
font-weight: 700;
}
.feedback-button {
margin: 8px;
}
</style>
@@ -1,43 +0,0 @@
<script lang="ts">
import type { Endpoints } from "@octokit/types";
import { browser } from "$app/environment";
interface Props {
releaseData: Endpoints["GET /repos/{owner}/{repo}/releases/latest"]["response"]["data"];
}
let { releaseData }: Props = $props();
// console.log(releaseData);
</script>
<div class="release">
{#if releaseData?.assets && browser && navigator}
{#if navigator.platform.startsWith("Win")}
{@const asset = (releaseData?.assets || []).filter((a) =>
a.name.endsWith(".exe"),
)[0]}
{#if asset}
<a href={asset.browser_download_url}>Download for Windows</a>
{/if}
{:else if navigator.platform.startsWith("Mac")}
{@const asset = (releaseData?.assets || []).filter((a) =>
a.name.endsWith(".dmg"),
)[0]}
{#if asset}
<a href={asset.browser_download_url}>Download for MacOS</a>
{/if}
{:else if navigator.platform.startsWith("Linux") && navigator.platform.includes("x86_64")}
{@const asset = (releaseData?.assets || []).filter((a) =>
a.name.endsWith(".AppImage"),
)[0]}
{#if asset}
<a href={asset.browser_download_url}>Download AppImage</a>
{/if}
{:else}
<span>No download found for your device</span>
{/if}
{:else if releaseData?.assets}
<span>Finding download for your device</span>
{/if}
<p>Latest release: <a href={releaseData.html_url}>{releaseData.name}</a></p>
</div>
-123
View File
@@ -1,123 +0,0 @@
<script lang="ts">
import { preventDefault } from 'svelte/legacy';
import url from "./logo.svg?url";
import { SITE_URL } from "$lib/metadata";
let logo: HTMLDivElement = $state();
let wiggleCount = 0;
function wiggle() {
wiggleCount++;
logo.style.animationPlayState = "running";
}
function wiggleIteration() {
wiggleCount--;
if (wiggleCount === 0) {
logo.style.animationPlayState = "paused";
}
}
</script>
<div class="hero card edge h-card">
<div
class="logo"
onclick={preventDefault(wiggle)}
onanimationiteration={wiggleIteration}
bind:this={logo}
>
<a href={SITE_URL} class="u-url u-uid" rel="me"
><img class="u-photo" src={url} alt="Logo" width="128" height="128" /></a
>
</div>
<div class="content">
<div>
<h1 class="title p-name">
<span class="p-given-name">Jade</span>
<span class="p-family-name">Ellis</span>
</h1>
<div role="doc-subtitle">
<span class="p-nickname">JadedBlueEyes</span>
</div>
</div>
<div class="description p-note">
Student, Computer Scientist and Creative
</div>
</div>
</div>
<style>
.hero {
display: flex;
justify-content: center;
flex-direction: column;
align-items: center;
gap: var(--spacing);
margin: 48px auto;
max-width: 320px;
padding: 3rem 0.5rem;
}
.logo {
width: 160px;
height: 160px;
flex-shrink: 0;
}
.content {
display: flex;
flex-direction: column;
gap: calc(var(--spacing) / 2);
}
.title {
text-align: center;
font-size: 32px;
margin: 0;
}
[role="doc-subtitle"] {
padding-block-start: 0;
font-size: 18px;
font-weight: 600;
text-align: center;
}
.description {
text-align: center;
}
@media screen and (min-width: 540px) {
.hero {
flex-direction: row;
margin: 96px auto;
max-width: 520px;
}
.title,
[role="doc-subtitle"],
.description {
text-align: left;
}
}
@keyframes wiggle {
0% {
transform: rotate(0deg);
}
25% {
transform: rotate(5deg);
}
75% {
transform: rotate(-5deg);
}
100% {
transform: rotate(0deg);
}
}
.logo {
animation-name: wiggle;
animation-duration: 0.2s;
/* animation-iteration-count: 1; */
animation-iteration-count: infinite;
animation-play-state: paused;
}
</style>
-91
View File
@@ -1,91 +0,0 @@
<script lang="ts">
import url from "./logo.svg?url";
import { SITE_URL } from "$lib/metadata";
// https://www.aleksandrhovhannisyan.com/
// https://github.com/AleksandrHovhannisyan/aleksandrhovhannisyan.com/tree/master
</script>
<header id="navbar">
<div class="container">
<nav aria-label="Primary">
<a href="#page-content" class="screen-reader-only skip-navigation"
>Skip to content</a
>
<ul class="navbar-links">
<li>
<a class="navbar-link-home" href={SITE_URL}>
<img
src={url}
class="navbar-logo"
alt=""
width="28"
height="28"
/>
<span class="site-name">Jade Ellis</span>
</a>
</li>
<!-- <li><a href="/about/" class="navbar-link">About</a></li>
<li><a href="/art/" class="navbar-link">Art</a></li> -->
<li><a href="/blog" class="navbar-link">Blog</a></li>
</ul>
</nav>
</div>
</header>
<style>
#navbar {
flex-shrink: 0;
width: 100%;
padding-block: 12px;
background-color: var(--surface-color);
overflow-x: auto;
color: #fff;
}
.container {
--container-max-width: calc(var(--page-width) + 6rem + 16px);
}
#navbar a {
text-decoration: none;
}
#navbar nav {
white-space: nowrap;
flex: 1 0 auto;
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
}
.navbar-logo {
width: 3rem;
height: 100%;
}
.navbar-links {
width: 100%;
display: flex;
align-items: center;
gap: 0.25em;
list-style: none;
margin: 0;
padding: 0;
}
.navbar-links > :first-child {
margin-inline-end: auto;
}
.navbar-link-home {
display: flex;
gap: 4px;
align-items: center;
padding: 8px;
font-weight: 700;
}
.skip-navigation {
top: 50%;
transform: translate(8px, -50%);
padding: 8px;
background-color: var(--color-navbar-bg);
}
</style>
-81
View File
@@ -1,81 +0,0 @@
<script lang="ts">
import TocItem from "./TocItem.svelte";
type FlatHeading = { level: number; title: string };
interface Props {
headings: nestedListNode[];
class?: string;
}
let { headings }: Props = $props();
// creates a `class` property, even
// though it is a reserved word
export const listType = "ul";
let open = $state(false);
/** @type {import('./$types').Snapshot<string>} */
export const snapshot = {
capture: () => open,
restore: (value: boolean) => (open = value),
};
// console.log(headings);
</script>
{#if headings?.length > 0}
<aside class="toc">
<details bind:open>
<summary accesskey="c" title="(Alt + C)">Table of Contents</summary>
<div class="inner">
<svelte:element
this={listType}
class="toc-level {'toc-level-' + headings[0].level}"
>
{#each headings as node}
<TocItem {node} {listType} />
{/each}
</svelte:element>
</div>
</details>
</aside>
{/if}
<style>
aside {
margin-block: calc(var(--spacing) / 4);
}
details {
/* margin: var(--spacing) 2px; */
margin: 0 2px;
border: 1px solid var(--surface-secondary-color);
background: var(--surface-color);
border-radius: var(--border-radius);
padding: 0.4em;
}
details summary {
cursor: zoom-in;
margin-inline-start: 10px;
user-select: none;
}
details[open] summary {
cursor: zoom-out;
}
summary {
font-weight: 500;
}
.inner {
padding: 0 10px;
opacity: 0.9;
margin-block-start: calc(var(--spacing) / 4);
margin-block-end: calc(var(--spacing) / 2);
margin-inline: calc(var(--spacing) / 2);
}
.inner :global(ul) {
margin: 0;
margin-inline-start: calc(var(--spacing));
padding: 0;
}
summary:focus {
outline: 0;
}
</style>
-21
View File
@@ -1,21 +0,0 @@
<script lang="ts">
import TocItem from './TocItem.svelte';
interface Props {
node: nestedListNode;
}
let { node }: Props = $props();
export const listType = "ul"
</script>
<li class="toc-item {"toc-item-" + node.level}">
<a href={"#" + node.id} class="toc-link {"toc-link-" + node.level}">{node.title}</a>
{#if node.children.length > 0}
<svelte:element this={listType} class="toc-level {"toc-level-" + node.children[0].level}">
{#each node.children as nodes}
<TocItem node={nodes} {listType} />
{/each}
</svelte:element>
{/if}
</li>
-15
View File
@@ -1,15 +0,0 @@
const is_browser = typeof window !== "undefined";
if (is_browser) {
(<any>window).dataLayer = (<any>window).dataLayer || [];
}
export function gtag(...args: any[]) {
if (is_browser) {
(<any>window).dataLayer.push(arguments);
}
}
gtag('js', new Date());
gtag('config', 'G-Q2R5PQL59Z');
Binary file not shown.
Binary file not shown.
-19
View File
@@ -1,19 +0,0 @@
// import fontBoldUrl from './Inter-Bold.ttf?url';
// import fontRegularUrl from './Inter-Regular.ttf?url';
// This is a hack
// Get the URL that the server is running on
// console.log(import.meta.env)
// let base = (import.meta.env.VITE_DOMAIN || "http://localhost:5173") + import.meta.env.BASE_URL;
// if (base?.endsWith('/')) {
// base = base.slice(0, -1);
// }
// // console.log(base)
// const fontBoldData = await (await fetch(base + fontBoldUrl)).arrayBuffer();
// const fontRegularData = await (await fetch(base + fontRegularUrl)).arrayBuffer();
// import { readFileSync } from 'fs';
// const fontBoldUrl = new URL('./Inter-Bold.ttf', import.meta.url).href
// const fontBoldData = readFileSync(fontBoldUrl);
// const fontRegularUrl = new URL('./Inter-Regular.ttf', import.meta.url).href
// const fontRegularData = readFileSync(fontRegularUrl);
// console.log(fontBoldUrl)
// export { fontBoldData, fontRegularData };
-9
View File
@@ -1,9 +0,0 @@
// Sentry config
// export const SENTRY_HOST = "o4507835405369344.ingest.de.sentry.io"
export const SENTRY_HOST = "relay.ellis.link"
export const SENTRY_PROJECT_ID = "4507835410481232"
export const SENTRY_KEY = "d006c73cc53783930a1521a68ae1c312"
export const SENTRY_TUNNEL_ALLOWED_IDS = [SENTRY_PROJECT_ID]
export const SENTRY_DSN = "https://" + SENTRY_KEY + "@" + SENTRY_HOST + "/" + SENTRY_PROJECT_ID
export const SENTRY_REPORT_URL = "https://" + SENTRY_HOST + "/api/" + SENTRY_PROJECT_ID + "/security/?sentry_key=" + SENTRY_KEY
@@ -1,31 +0,0 @@
import { type LanguageSupport, indentUnit } from "@codemirror/language";
import { type Extension, EditorState } from "@codemirror/state";
import { EditorView, keymap } from "@codemirror/view";
import { indentWithTab } from "@codemirror/commands";
import { basicSetup } from "codemirror";
export function get_base_extensions(
useTab: boolean,
tabSize: number,
lineWrapping: boolean,
placeholder: string | HTMLElement | null | undefined,
editable: boolean,
readonly: boolean,
lang: LanguageSupport | null | undefined
): Extension[] {
const extensions: Extension[] = [
indentUnit.of(" ".repeat(tabSize)),
EditorView.editable.of(editable),
EditorState.readOnly.of(readonly),
basicSetup
];
// @ts-ignore
if (useTab) extensions.push(keymap.of([indentWithTab]));
// if (placeholder) extensions.push(placeholderExt(placeholder));
if (lang) extensions.push(lang);
if (lineWrapping) extensions.push(EditorView.lineWrapping);
return extensions;
}
@@ -1,71 +0,0 @@
<script lang="ts">
interface Props {
src: any;
alt: any;
title: any;
thumb: any;
class?: string;
}
let {
src,
alt,
title,
thumb,
class: className
}: Props = $props();
// export let align
// export let small: boolean;
// console.log("imgcmp", thumb);
let loaded = $state(false)
// console.log(thumb)
// import _PastedImage20240716123726Png from "./Pasted%20image%2020240716123726.png?meta";
</script>
<!-- <figure class={className}> -->
<!-- Svelte 5 hydration bug means we can't nest image inside figure -->
<img
{src}
{alt}
{title}
class={className}
width={thumb?.originalWidth}
height={thumb?.originalHeight}
style:background-image={loaded ? "none" : `url('${thumb?.thumbSrc}')`}
on:load={() => loaded = true}
decoding="async"
style:--aspect-ratio={thumb?.originalWidth / thumb?.originalHeight}
/>
<!-- {#if title}
<figcaption>{title}</figcaption>
{/if} -->
<!-- </figure> -->
<!-- {:else}
<img
{src}
{alt}
{title}
style:float={align}
width={thumb?.originalWidth}
height={thumb?.originalHeight}
style:background-image={loaded ? "none" : `url('${thumb?.thumbSrc}')`}
on:load={() => loaded = true}
/>
{/if} -->
<style>
img {
height: 100%;
background-size: cover;
background-repeat: no-repeat;
display: block;
margin-inline: auto;
max-width: calc(min(100%, 60vh * var(--aspect-ratio)));
}
figure {
text-align: center;
}
figcaption {
font-size: 0.95em;
margin-block: calc(var(--spacing) / 2);
}
</style>
-387
View File
@@ -1,387 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="512"
height="512"
version="1.1"
id="svg212793"
sodipodi:docname="geode.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
inkscape:export-filename="geode.png"
inkscape:export-xdpi="192.75"
inkscape:export-ydpi="192.75"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs212797" />
<sodipodi:namedview
id="namedview212795"
pagecolor="#505050"
bordercolor="#ffffff"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#505050"
showgrid="false"
inkscape:zoom="1"
inkscape:cx="168"
inkscape:cy="183.5"
inkscape:current-layer="layer2" />
<g
inkscape:groupmode="layer"
id="layer1"
inkscape:label="shell"
style="display:inline">
<path
style="fill:#eff3fc;stroke:none"
d="m 358,28.5687 c -22.314,4.8151 -43.362,14.3332 -66,18.6273 -11.712,2.2216 -30.505,1.1445 -40.826,6.9823 -6.227,3.5216 -27.27989,-2.040724 -31.63089,3.556176 -10.544,13.5633 -15.24118,50.652094 -27.71418,62.513094 -13.649,12.98 -34.91579,7.93112 -48.74379,19.95912 -6.883,5.987 -36.50301,-1.20092 -41.84801,6.14808 -11.013003,15.14 -6.895308,27.95394 -17.97371,46.95347 C 70.34622,208.81524 73.2506,235.732 59,250 c -5.553,5.56 -16.1838,13.147 -18.3966,21.001 -1.5853,5.626 2.7806,10.998 4.5617,16 5.404,15.173 11.93,30.04 17.9128,44.999 4.0708,10.178 7.3728,21.969 13.7608,30.985 20.9293,29.54 54.9253,45.673 84.1613,65.182 18.197,12.143 37.211,30.728 57.424,39.015 5.772,2.366 14.418,0.818 20.576,0.818 13.272,0 29.046,4.44 41.999,1.61 6.483,-1.417 11.961,-7.069 17.172,-10.879 10.382,-7.593 21.227,-14.68 31.999,-21.696 11.03,-7.184 23.027,-13.844 34.83,-19.662 6.434,-3.171 15.141,-5.108 20.502,-10.072 8.001,-7.411 11.871,-22.704 16.767,-32.286 7.719,-15.109 19.713,-33.516 23.213,-50.015 1.635,-7.706 0.214,-16.164 0.557,-24 1.103,-25.185 -0.972,-52.031 2.146,-77 1.925,-15.411 14.007,-28.63 19,-43 1.786,-5.139 0.815,-11.628 0.815,-17 0,-16.952 0.978,-36.37 -2.275,-52.999 C 443.726,100.776 431.165,91.317 425.275,83 417.613,72.1811 414.021,54.6241 404.606,45.6096 398.169,39.4451 385.299,36.75 377,33.6813 c -5.618,-2.0771 -12.876,-6.434 -19,-5.1126 z"
id="path212571"
sodipodi:nodetypes="cscscscccccccccsccscccccccsccccc" />
</g>
<g
inkscape:groupmode="layer"
id="layer2"
inkscape:label="Inner crystals"
style="display:inline">
<path
style="fill:#0050dc;stroke:none"
d="m 255.99582,136.24692 c -13.28325,3.13564 -23.96249,17.05477 -29.45978,29.55285 -7.83152,9.21825 -20.73659,12.69624 -27.22374,23.30923 -7.80712,9.56771 -12.45139,22.61213 -24.40613,27.99813 -8.9165,6.50572 -15.18475,16.83023 -24.31444,23.15662 -7.49933,8.7785 -9.79295,20.66701 -11.86171,32.15178 -0.59871,14.13299 11.03896,24.47538 19.01228,34.79576 7.83515,8.18656 10.53435,19.15916 11.78624,29.97498 3.91648,14.32454 21.0672,9.27785 29.0169,18.13391 1.93155,2.63536 10.71773,12.96393 10.48045,7.51081 -4.24181,-9.98405 -17.28154,-13.36069 -23.69493,-18.55586 -1.70966,-9.77325 8.86086,-22.42721 18.04466,-15.38059 10.56155,3.99802 23.1208,11.06031 34.00268,4.10733 7.22764,-9.33734 -12.89517,-12.85673 -9.05407,-24.00526 -0.64439,-12.19441 -0.2895,-26.63161 -7.9351,-37.06001 -4.70022,-13.18538 16.96154,-22.6174 26.14203,-26.51669 12.48137,-4.27105 6.25379,-13.33803 0.77433,-22.76358 -3.65216,-10.86026 -9.59206,-20.57054 -15.1732,-30.4357 -4.75347,-9.6475 6.26105,-14.53668 13.62472,-16.75571 8.99759,-3.04339 19.27257,-9.58524 18.4482,-20.44754 -0.35505,-5.59721 -4.3945,-15.53456 -8.20939,-18.77046 z"
id="path212631"
sodipodi:nodetypes="ccscccccccccscccccccc" />
<path
style="fill:#0054dc;stroke:none"
d="M 253.59191,137.06128 339,125 c 0.122,5.912 3.474,13.406 1.015,19 -9.879,22.469 -35.14666,28.31496 -35.22166,55.70896 l 25.60833,-5.84021 23.05008,-7.01621 8.87739,27.72018 c 2.86536,6.57179 7.94269,-2.34106 14.12384,-4.87639 l 1.07777,-19.96429 c 14.592,-26.006 7.75436,-63.6374 -10.36964,-86.5754 -3.456,-4.374003 -12.3457,-7.344649 -17.3887,-10.094649 -6.827,-3.7233 -23.69013,-0.244866 -30.93413,0.742134 -25.862,3.522 -56.79537,14.010155 -65.24637,43.257155 z"
id="path212609"
sodipodi:nodetypes="cccccccccsccc" />
<path
style="fill:#0074e4;stroke:none"
d="M 255.046,135.4849 C 255.049,159.3279 273.804,178.62 279,201 l 25.45709,0.43085 c 0.17019,-7.40966 5.04158,-16.16319 9.84958,-22.43119 C 322.84967,167.86566 335.678,158.011 340.412,144 342.405,138.101 339.259,131.021 339,125 Z"
id="path212629"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:#007ce8;stroke:none"
d="M 263.62659,146.57473 231.08439,165.24947 218.01385,180.9759 232.986,193.996 245,219 c 5.406,0 17.29,2.245 21,-2 h 1 l 1,3 c 3.736,-5.355 10.6287,-12.48173 10.9277,-19.18773 0.414,-9.284 -10.02411,-46.85654 -15.30111,-54.23754 z"
id="path212649"
sodipodi:nodetypes="ccccccccsc" />
<path
style="fill:#0064e0;stroke:none"
d="m 305,197 -1.09282,4.03029 3.14539,69.16759 6.72751,1.76179 L 311,267 l 64.49588,5.76923 2.25403,-93.17752 C 362.02991,183.18671 334.828,187.02 320,193.333 c -4,1.702 -11.874,8.261 -15,3.667 z"
id="path212655"
sodipodi:nodetypes="ccccccccc" />
<path
style="fill:#00b8f8;stroke:none"
d="M 267.45004,216.08795 246,219 l 7,22 c 5.144,-4.201 17.21204,-18.05905 14.45004,-24.91205 z"
id="path212665"
sodipodi:nodetypes="cccc" />
<path
style="fill:#35417e;stroke:none;fill-opacity:1"
d="m 267,220 c -2.972,7.065 -8.917,16.331 -15,21 l -1,3 v 1 c 6.242,12.633 2.772,39.998 21,40 3.111,9.036 21.132,13.081 29,17.004 2.955,1.473 8.192,6.301 11,3.996 h 1 l -2,6 c 5.31,-3.752 2.23934,-12.84635 1.57334,-18.40635 -2.121,-17.713 -3.53239,-35.8557 -6.64639,-53.4727 -0.753,-4.261 -0.11166,-14.21085 -1.07687,-18.97632 C 304.22987,218.08252 294.91,220 292,220 Z"
id="path212667"
sodipodi:nodetypes="cccccccccccssc" />
<path
style="fill:#1e2a55;stroke:none;fill-opacity:1"
d="m 315.78816,312.98257 0.62063,-2.67144 -2.55738,-3.77842 L 313,306 h -1 c -3.72,0.509 -7.617,-2.839 -11,-4.489 -8.764,-4.275 -23.943,-7.535 -29,-16.511 L 265.26361,282.34063 259.91,273.001 256.63164,255.49069 251.92177,245.33226 251,244 l 2,-2 c -8.932,2.627 -16.67357,6.7997 -24.67757,11.4487 -2.872,1.668 -7.69643,5.4703 -9.11043,8.7363 -2.642,6.106 6.02994,30.74744 8.05194,36.70444 3.853,11.352 5.05252,22.32956 12.84252,31.32456 5.744,6.631 25.46054,11.601 33.89354,13.724 5.678,1.429 9.766,-2.889 14,-6.065 8.982,-6.735 30.09016,-12.29043 27.78816,-24.89043 z"
id="path212669"
sodipodi:nodetypes="cccccccccccccccccccc" />
<path
style="fill:#0064e0;stroke:none"
d="M 309.172,264.26212 313.155,302 l 0.897,14.671 -9.882,8.304 -30.9445,18.90698 c 5.566,10.009 6.6495,29.20102 5.1985,40.11802 -0.609,4.585 0.839,10.237 -3.424,13 l -0.69209,2.5109 c 4.1,0.326 9.65209,0.7801 13.69209,-0.3029 9.122,-2.447 20.71,-16.98 28.039,-23.352 4.019,-3.494 15.73936,-3.33123 16.75436,-8.66723 8.768,-3.949 21.73564,-16.47077 27.35364,-24.27877 13.524,-18.799 10.90262,-54.02665 10.90262,-75.61065 z"
id="path212683"
sodipodi:nodetypes="cccccccccccccc" />
<path
style="fill:#0074e4;stroke:none"
d="m 144.0889,281.90094 c 3.881,10.475 10.56629,12.35841 14.92929,22.87041 3.967,9.555 6.67243,29.10544 13.23243,37.39344 1.893,2.391 14.46034,5.01371 17.08434,6.01971 4.785,1.833 14.8396,10.71061 22.66504,14.8155 l -0.72168,2.64874 C 218.79332,368.14274 234.136,377.144 238,384 h 1 l 3.907,-19 -0.9053,-32.78526 L 227.13508,298.50099 211.685,326 188.399,303 176,288 Z"
id="path212691"
sodipodi:nodetypes="ccccccccccccccc" />
<path
style="fill:#191f58;stroke:none;fill-opacity:1"
d="m 266.84546,220.3284 38.02813,0.96688 L 304,201 c -6.741,-0.817 -20.02581,-4.14237 -25.78481,0.27663 -4.482,3.439 -8.87973,13.96677 -11.36973,19.05177 z"
id="path212663"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#0088e8;stroke:none"
d="m 239.26322,332.35036 c 0,0 4.234,22.307 2.816,34 -1.112,9.169 -7.751,18.644 1.061,26.397 5.832,5.131 27.35697,6.64431 35.08997,6.80431 0,-12.407 1.03303,-25.76431 1.03303,-38.20131 0,-3.686 1.232,-10.193 -1.028,-13.351 -6.674,-9.327 -36.694,-16.615 -36.694,-16.615 z"
id="path1905"
sodipodi:nodetypes="csccsccc" />
</g>
<g
inkscape:groupmode="layer"
id="layer5"
inkscape:label="Inner filler"
style="display:inline">
<path
style="fill:#88acce;stroke:none"
d="m 352.667,48.3333 0.666,0.3334 z"
id="path212573" />
<path
style="fill:#1a417c;stroke:none"
d="m 273.98523,64.014313 1.021,3.60001 c -0.44929,0.994654 -2.89038,14.235152 2.6033,22.390425 l -0.27106,1.134885 c 5.372,0.0595 8.99733,-4.011724 13.96633,-5.069059 5.204,-0.599 6.14478,-19.332186 0.79979,-23.454313 -3.47202,0.06783 -13.75636,1.053651 -18.11936,1.398052 z"
id="path212595"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:#28528e;stroke:none"
d="m 292.04892,62.610936 0.51145,0.794689 c 3.51816,5.61039 1.97342,8.942019 0.0608,10.537622 0.74047,1.521032 3.16211,0.514251 1.45362,6.785381 l -5,5 v 1 l 8,-2 c 8.478,1.837 14.799,-4.5504 23,-5.517 8.352,-0.9844 16.829,3.3142 26,2.2315 5.579,-0.6586 17.591,-3.9679 21,1.2855 l 3,1 h 1 c 2.618,-7.9158 11.368,-18.0951 18,-23 l 1,-4 c -10.259,-3.3382 -24.149,-10.4603 -35,-9.787 -8.667,0.5377 -16.964,5.2542 -25,8.0879 -12.04,4.2456 -25.2259,7.546208 -38.0259,7.581408 z"
id="path212575"
sodipodi:nodetypes="cccccccssccccccsc" />
<path
style="display:inline;fill:#28528e;stroke:none"
d="m 275.48062,66.706137 -0.21755,-0.909933 -1.08163,-1.791685 c -4.164,-0.9055 -21.47348,1.181002 -25.85357,3.800654 2.60896,21.335702 0.35407,32.231387 13.89257,28.548146 l 15.357,-5.2863 0.604,-8.0625 c -2.99545,-9.36264 -5.16506,-5.353006 -2.70082,-16.298382 z"
id="path212575-6"
sodipodi:nodetypes="cccccccc" />
<path
style="fill:#819ab9;stroke:none"
d="m 332.667,55.3333 0.666,0.3334 z"
id="path212577" />
<path
style="fill:#7390b2;stroke:none"
d="m 329.667,56.3333 0.666,0.3334 z"
id="path212579" />
<path
style="fill:#7b99bb;stroke:none"
d="m 326.667,57.3333 0.666,0.3334 z"
id="path212581" />
<path
style="fill:#184179;stroke:none"
d="m 389.97471,56.755293 -1.22446,3.868314 c -3.811,1.8705 -7.72578,4.895807 -10.30878,8.200807 -2.884,3.6919 -8.83296,9.05098 -7.98529,14.504652 7.28197,8.102816 18.51182,21.645934 23.01082,29.955934 4.126,7.623 0.944,15.952 6.533,23.715 l 10,-5 c 3.251,-5.438 6.311,-5.803 5,-13 l 15.19714,-7.72329 C 425.85529,105.38499 422.657,103.599 418,98.9962 410.065,91.1522 404.866,82.5122 399.201,73 396.314,68.1523 395.01571,59.595093 389.97471,56.755293 Z"
id="path212583"
sodipodi:nodetypes="ccccccccccsc" />
<path
style="fill:#83a3ba;stroke:none"
d="m 304.667,62.3333 0.666,0.3334 z"
id="path212587" />
<path
style="fill:#768baa;stroke:none"
d="m 299.667,63.3333 0.666,0.3334 z"
id="path212589" />
<path
style="fill:#9db9de;stroke:none"
d="m 290.667,64.3333 0.666,0.3334 z"
id="path212591" />
<path
style="fill:#133773;stroke:none"
d="m 221.72724,93.508349 4.76138,4.1377 c 7.60069,9.607861 4.56733,17.501811 10.19927,8.741731 l 5.80073,-5.74173 5.15506,0.12113 3.2439,-3.800466 c 3.2915,-0.41015 1.45314,-0.281562 4.64714,-0.268062 l -7.0461,-29.052603 c -3.9935,2.0403 -13.07061,1.659981 -17.54024,7.565244 -4.46962,5.905262 -8.22578,14.401369 -9.22114,18.297056 z"
id="path212603"
sodipodi:nodetypes="ccccccccsc" />
<path
style="fill:#284893;stroke:none"
d="m 299.667,102.333 0.666,0.334 z"
id="path212611" />
<path
style="fill:#0e2d66;stroke:none"
d="m 221.7552,93.376736 c -1.54044,5.73816 -6.36069,11.552144 -9.09249,18.903624 l 3.83532,9.36018 c -2.857,4.296 1.40843,13.69436 5.66143,14.59436 1.311,6.409 13.99482,-2.48016 17.36527,-6.24709 l -3.0267,-25.34727 -3,1 v -4 l -6,-4.000004 z"
id="path212613"
sodipodi:nodetypes="cccccccccc" />
<path
style="fill:#3f71b0;stroke:none"
d="m 238.43464,129.03125 c -4.02998,7.52189 -11.11005,7.32511 -15.67741,9.59018 -5.224,6.865 -4.83707,16.90784 -14.49907,19.41084 l -2.88673,3.72391 -2.47008,3.69304 -3.83488,1.54533 c -8.53345,-0.61946 -37.80397,11.31994 -40.24297,20.00794 l 5.63643,25.7116 15.34953,-9.62083 23.9476,-26.37143 12.96012,-8.12176 8.26559,-4.02232 -3.85325,-4.27751 L 234,152 v -1 c -3.92,-8.108 8.897,-9.239 14,-9 -0.932,-7.572 1.95,-9.595 5,-16 l -4,2 4,-15 6,2 -1,-5 4,-1 -2,-3 3,-1 -7.52726,-8.34891 -4.47354,-0.973144 -3.59353,4.357484 -4.76169,0.41133 -5.95859,5.92131 z"
id="path212615"
sodipodi:nodetypes="cccccccccccccccccccccccccccccc" />
<path
style="fill:#5181c1;stroke:none"
d="m 297.93373,84.809341 c -1.23292,-0.578554 -0.44396,-0.256304 -1.12947,-0.144816 l -7.7128,2.038247 -3.09509,0.853057 c -6.56804,3.222197 -19.93753,7.591632 -30.51419,9.206613 l 3.96846,11.273508 -2.31287,1.43474 0.65142,3.87462 -5.29282,-1.31816 -4.61878,15.04443 2.08343,1.67705 c -4.117,5.906 -14.76691,13.58403 -14.76691,13.58403 l -2.53938,5.89627 L 234,152 l -14,8 -2,5 h 6 l 1,-4 10,2 c 7.81,-11.422 17.509,-21.599 25.481,-32.961 4.64,-6.613 9.77,-16.587 16.562,-21.044 10.969,-7.199 30.199,-8.118 42.957,-10.4194 7.838,-1.4141 23.594,-7.1644 31,-3.544 9.299,4.5463 14.434,17.4464 21,24.9684 7.58,-12.434 13.974,-1.605 14,8 l -5,4 -2,-2 4.315,17 -2.241,17 0.926,8 c -0.703,6.416 -6.019,23.094 0,27 0.68879,0.49568 1.77385,1.11569 0.87012,2.01056 l 0.40364,0.85349 L 380,201 c 0.385,6.327 -0.095,16.672 6,20 1.425,-11.269 7.51189,-27.36842 9.59875,-37.72392 l 4.79221,-20.42487 2.51396,-19.49455 c -3.65922,-5.19082 -6.24637,-18.83229 -7.49852,-28.9525 l -20.08831,-28.133706 -4.51582,-2.586635 c -3.99631,-4.474522 -13.19294,-4.235434 -17.67194,-3.789634 -5.138,0.5114 -10.79238,1.685055 -15.97838,1.108855 -4.285,-0.4761 -10.73318,-2.834322 -15.30218,-2.506422 -8.604,0.6174 -15.25504,7.804723 -23.91604,6.312723 z"
id="path212605"
sodipodi:nodetypes="cccccccccccccccccccccccccccccccccccccccccsscc" />
<path
style="fill:#768ba8;stroke:none"
d="m 224,110 1,1 z"
id="path212617" />
<path
style="fill:#92a1b6;stroke:none"
d="m 223,111 1,1 z"
id="path212619" />
<path
style="fill:#305e99;stroke:none"
d="m 430,111 -15,8 -5,13 -10,5 c 4.11,9.716 -1.105,24.064 -3.525,34 -0.997,4.093 -0.902,8.621 -3.475,12 L 385.94846,218.08282 385,280 l 24.11713,-9.37845 1.13709,-3.37441 1.7085,-2.33943 2.96593,-0.72917 C 415.95248,260.31763 415.97547,251.82111 416,249 c 0,-9.983 -1.95,-22.352 0.789,-32 3.847,-13.555 14.588,-24.491 18.422,-38 2.651,-9.338 -0.142,-20.553 -1.041,-30 -0.978,-10.279 3.737,-30.257 -4.17,-38 z"
id="path212621"
sodipodi:nodetypes="ccccccccccccccccc" />
<path
style="fill:#5daaf0;stroke:none"
d="m 378.37917,130.26341 3.26734,5.89182 L 386,128 c -0.003,-3.79 -1.03582,-22.11649 -5.10783,-22.76325 -4.41248,-0.70083 -19.42154,-7.241684 -19.82254,-2.32168 -0.342,4.198 15.45054,23.78834 17.30954,27.34834 z"
id="path212623"
sodipodi:nodetypes="cccscc" />
<path
style="fill:#224b8b;stroke:none"
d="m 212.73348,112.10637 c 0,0 -8.42095,13.24142 -14.11262,17.39516 -5.69168,4.15374 -20.28251,9.81654 -20.28251,9.81654 l -0.11184,7.08987 10.07635,11.72158 5.30268,6.61997 3.33204,3.00603 c 4.19844,-0.49879 6.43501,-3.15249 10.16483,-2.89714 l 2.04788,-5.37844 c 12.07682,-2.33041 6.98729,-16.91942 15.78729,-21.72442 l -1.03204,-1.52424 -1.11714,-5.49279 c -2.41719,-2.63399 -4.54365,-4.35987 -3.21265,-8.81587 l -2.63817,-4.1671 z"
id="path212625"
sodipodi:nodetypes="csccccccccccccc" />
<path
style="fill:#3367a0;stroke:none"
d="m 158.14877,185.96042 -25.28848,19.34864 c 0,0 -8.12052,7.9095 -13.52431,16.7002 -2.7019,4.39535 -8.14015,12.17729 -9.04867,21.82613 -0.90852,9.64885 2.29516,22.83022 2.29516,22.83022 1.168,10.454 1.1233,17.77286 8.32306,25.55027 l 5.78047,-9.04588 -3.369,-14.131 0.75077,-18.40667 0.0472,-5.68032 2.61459,-3.93204 1.37653,-10.17197 c 7.41,-0.179 13.44385,-8.38474 14.34685,-16.29374 h 1 v 3 c 10.145,-3.244 27.01079,-23.14484 14.69579,-31.59384 z"
id="path212659"
sodipodi:nodetypes="ccsscccccccccccc" />
<path
style="fill:#12326d;stroke:none"
d="m 80.67469,258.37719 c 10.138915,-1.55942 20.38011,-7.7734 30.14958,-8.90056 -2.25984,-17.44558 18.43205,-40.47728 32.23905,-51.64628 18.275,-14.784 32.98328,-18.47872 54.11428,-30.27572 -6.30524,-6.77022 -10.37614,-10.24453 -9.99433,-16.39914 l -8.77936,-11.86052 c -11.784,3.395 -22.44982,2.28678 -31.14747,11.94431 -14.0268,5.27547 -31.12869,4.05138 -36.87556,9.52967 -10.781002,15.085 -5.14539,38.92029 -17.206342,49.20882 -7.367949,6.28518 -8.995531,27.4032 -15.766031,34.3172 -1.6899,1.726 -7.197383,5.68771 -5.647783,8.59771 2.2995,4.319 8.745766,6.94551 8.913966,5.48451 z"
id="path212635"
sodipodi:nodetypes="ccccccccsccc" />
<path
style="fill:#467cba;stroke:none"
d="m 162.0298,196.90064 -11.70098,5.68908 -12.34038,16.2625 -9.88701,6.13801 -2.53148,11.58503 -3.11383,8.72599 0.82862,23.49053 30.04177,-35.75633 8,5 c -2.643,-9.795 8.74551,-29.11357 0.70329,-41.13481 z"
id="path1604"
sodipodi:nodetypes="cccccccccc" />
<path
style="fill:#5598dc;stroke:none"
d="M 224.29593,160.54433 224,165 l -5,2 h -1 -1 l -4,-2 -33.07772,35.15003 c -0.95276,4.12631 0.55622,5.85655 5.339,12.11246 C 189.6261,207.25302 195.668,202.324 200,198.001 c 10.169,-10.149 28.01107,-22.79739 35.20283,-35.31608 L 233,161 Z"
id="path212645"
sodipodi:nodetypes="cccccccccccc" />
<path
style="fill:#829dba;stroke:none"
d="m 157,162 1,1 z"
id="path212647" />
<path
style="fill:#7b92b2;stroke:none"
d="m 133,196 1,1 z"
id="path212657" />
<path
style="fill:#336aa3;stroke:none"
d="m 139.71309,305.30651 -8,7 c 4.02861,9.73272 -2.81239,20.8819 10.46361,18.0099 0,8.429 7.42868,14.73926 18.25668,16.32626 -5.383,-12.685 -2.84029,-37.57916 -20.72029,-41.33616 z"
id="path212703"
sodipodi:nodetypes="ccccc" />
<path
style="fill:#1f4c87;stroke:none"
d="m 92.957688,249.35342 c -10.635604,3.32616 -11.133231,2.77842 -21.434114,1.62832 -2.415644,15.61032 -2.857801,6.96596 -8.356857,26.7974 -1.1853,11.523 7.596683,24.43486 11.328683,35.22086 3.0705,8.874 4.6271,19.962 9.51,28 5.3241,8.765 14.4195,15.845 20.7636,24.015 5.553,7.152 10.616,16.491 17.415,22.456 13.329,11.692 31.55,18.921 45.816,29.764 10.401,7.905 20.845,15.75 31,23.962 4.899,3.962 9.972,9.911 16,12.075 9.595,3.446 23.861,2.721 34,2.728 v -1 c 9.47218,-8.98608 16.17423,-26.62337 -2.05771,-25.61063 L 252,416 c -6.71,0 -17.101,1.957 -22.985,-1.742 -8.28354,-1.43843 -2.47107,-4.6419 -7.26043,-6.02943 C 207.62057,412.74757 182.13,417.848 170,406 c -3.32684,-6.77705 -7.37401,-5.2969 -15,-5 l 3,-3 -4,-1 c 1.55552,-3.53261 4.48683,-5.27457 -0.41151,-4.55361 l -3.87437,-0.0692 L 149,377 l 5,-2 3,4 -9,-23 4.79499,-1.98934 c 3.67425,-9.7943 4.09101,-0.92676 2.456,-9.16546 -10.12,-2.641 -10.64688,-9.10556 -10.64688,-17.63656 L 139,324 138.25798,322.88131 C 138.06111,321.20774 137.55128,322.94132 137,320 l -22.954,-42 -2.24082,-21.68635 c -1.03167,-4.84381 -0.67751,-3.5193 -1.00609,-7.05892 -3.0973,0.25842 -7.80683,1.66094 -17.841402,0.0987 z"
id="path212671"
sodipodi:nodetypes="cccscccccccccccccccccccccccccccccccc" />
<path
style="fill:#6e8bad;stroke:none"
d="m 70,263 1,1 z"
id="path212675" />
<path
style="fill:#163d78;stroke:none"
d="M 410.02119,266.15303 409,269 c -7.409,0.219 -18.59579,10.41276 -23.99355,9.64883 -2.071,4.329 -1.40445,13.84517 -1.09645,18.35117 0.625,9.126 1.672,21.133 -0.674,30 -2.321,8.773 -7.275,21.05 -13.171,27.957 -5.645,6.612 -21.07143,21.04934 -21.07143,21.04934 0,0 3.45199,9.80011 2.18699,15.47211 1.45477,4.74079 4.1322,7.63283 4.1322,12.69684 l 1.35059,4.96573 C 379.29235,406.82302 383.624,388.662 392.245,371 c 4.516,-9.252 8.16,-18.935 13.064,-28 3.25,-6.009 8.401,-12.289 10.014,-19 C 416.602,318.68 415,311.544 415,306 v -42 h -1 c -2.5449,-1.52206 -3.60892,0.10423 -3.97881,2.15303 z"
id="path212679"
sodipodi:nodetypes="ccccccccccsccsccc" />
<path
style="fill:#6a7d9d;stroke:none"
d="m 67,266 1,1 z"
id="path212681" />
<path
style="fill:#2c75d1;stroke:none"
d="m 372,271 c -5.367,7.717 -3,19.931 -3,29 h 3 l 1.27992,5.73088 c 4.289,-1.423 2.74304,-7.79538 3.71004,-11.79438 C 370.46696,289.7075 374.557,277.869 372,271 Z"
id="path212685"
sodipodi:nodetypes="cccccc" />
<path
style="fill:#467cba;stroke:none"
d="m 125,288 -1.11077,-0.5972 -2.52377,3.96769 L 132,312 l 9,-5 8,5 c -2.643,-9.795 -14.587,-24.048 -24,-24 z"
id="path212693"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:#94b1c3;stroke:none"
d="m 65.3333,288.667 0.3334,0.666 z"
id="path212695" />
<path
style="fill:#9aaecf;stroke:none"
d="m 68.3333,296.667 0.3334,0.666 z"
id="path212697" />
<path
style="fill:#58a6ee;stroke:none"
d="m 253.28483,394.10231 c -1.94103,13.00448 30.38287,20.47826 40.44772,7.9704 l 11.01919,-4.25964 13.75012,-11.77317 c 2.312,-8 11.52899,-11.27271 18.98699,-10.90271 L 362.139,351.972 369,346 h 1 l 5,-21 -4,-4 c -4.969,1.633 -5.326,7.485 -6.95,12 -2.448,6.809 -5.108,11.234 -11.051,15.575 -12.367,9.034 -26.535,17.129 -37.909,27.281 -7.895,7.045 -16.825,19.497 -27.09,22.884 -9.839,3.246 -23.10875,-4.29127 -34.71517,-4.63769 z"
id="path212713"
sodipodi:nodetypes="ccccccccccccccc" />
<path
style="fill:#3d98e7;stroke:none"
d="m 180,200 c -4.538,8.395 -10.5675,5.9359 -16.8105,13.2379 -1.704,1.992 -4.08049,2.82905 -10.1895,12.7621 h -1 c -5.11269,13.2298 -9.38838,6.49987 -16.36209,16.88961 l -5.39326,5.89475 c 0,0 -5.37726,14.95456 -7.09665,20.25464 l 0.60666,20.29756 c 9.052,-2.063 9.31534,3.56744 14.43434,8.77944 6.387,6.502 13.32122,16.38948 16.57622,25.05248 2.817,7.498 0.67712,16.75204 6.35012,23.11204 6.561,7.355 22.42166,7.12848 30.84066,11.48448 5.999,3.104 10.96861,14.47445 14.83861,20.04045 4.019,5.78 9.10639,5.28755 14.28539,9.24955 4.93,3.771 7.548,9.2 11.974,13.311 2.341,2.173 4.751,3.106 6.946,0.634 h 1 c 3.912,4.546 19.39669,8.14357 24.55969,5.36557 L 254,397 l 0.18923,-2.83638 -2.5691,-0.93187 L 245.376,391.973 235.621,379.63 213.285,363.2 196.829,347.136 176,344 c -0.458,-19.571 -10.935,-34.459 -21.14,-50 -4.137,-6.301 -13.866,-16.982 -13.037,-25 1.962,-18.993 21.396,-30.961 32.892,-44 4.079,-4.628 11.011,-9.563 11.285,-16 -5.835,-0.135 -5.403,-4.394 -4,-9 z"
id="path212661"
sodipodi:nodetypes="cccccccccccccccccccccccccccccccc" />
<path
style="fill:#288fdc;stroke:none"
d="M 369,300 366.14137,326.08159 371,321 l 4,4 c 0.269,-5.343 6.34202,-18.70989 -1.10898,-20.29789 L 372,300 Z"
id="path212699"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:#95aac7;stroke:none"
d="m 71.3333,304.667 0.3334,0.666 z"
id="path212701" />
<path
style="fill:#889fbe;stroke:none"
d="m 74.3333,312.667 0.3334,0.666 z"
id="path212705" />
<path
style="fill:#869fc7;stroke:none"
d="m 76.3333,318.667 0.3334,0.666 z"
id="path212709" />
<path
style="fill:#447dc4;stroke:none"
d="m 373.01678,326.31308 -2.87591,10.32042 0.68644,7.40302 -1.69035,-1.32581 -17,20 5,1 c 7.184,-10.842 24.22987,-24.40675 15.87982,-37.39763 z"
id="path212715"
sodipodi:nodetypes="ccccccc" />
<path
style="fill:#99b1dd;stroke:none"
d="m 81.3333,334.667 0.3334,0.666 z"
id="path212717" />
<path
style="fill:#4d5ed4;stroke:none"
d="m 260.667,338.333 0.666,0.334 z"
id="path212719" />
<path
style="fill:#3a4dc3;stroke:none"
d="m 262.667,339.333 0.666,0.334 z"
id="path212721" />
<path
style="fill:#4d7eb9;stroke:none"
d="m 163.49042,346.98048 c -1.77498,-1.75773 -2.36661,-3.19958 -8.53261,-2.20758 l -2.22909,8.92201 L 148,356 c 0.128,10.95 10.041,22.296 15,32 9.709,-2.3 21.97045,-6.44548 31.99845,-2.62848 4.644,1.768 7.91857,7.95374 12.51457,10.06574 L 208,388 c 6.139,-3.995 -1.399,-12.712 -4.531,-16.914 -2.664,-3.575 -6.12,-10.37 -9.697,-12.808 -8.66,-5.904 -20.95058,-6.10352 -30.28158,-11.29752 z"
id="path212725"
sodipodi:nodetypes="ccccccccccc" />
<path
style="fill:#528fd0;stroke:none"
d="M 337.67122,374.67242 C 330.43722,373.45342 318.301,376.815 317,385 l -6.27062,8.12985 -0.92768,2.40553 4.48003,0.90664 6.26123,-1.21932 2.08135,-2.04569 c 3.166,-6.208 8.47375,-8.26648 16.29149,-12.79583 l 21.34723,-27.16167 z"
id="path212729"
sodipodi:nodetypes="cccccccccc" />
<path
style="fill:#3664a0;stroke:none"
d="m 152,375 -3.5288,1.78499 L 149,393 l 5.48694,2.06978 c 1.613,-4.815 4.08369,-6.16852 8.81369,-7.64352 L 158,376 c -2.89337,-0.86806 -1.93606,1.75192 -4,-1 z"
id="path212731"
sodipodi:nodetypes="cccccccc" />
<path
style="fill:#204a84;stroke:none"
d="m 349,376 c -4.169,7.738 -12.905,8.825 -19.715,12.995 -9.907,6.068 -27.55262,20.15708 -37.20862,22.42732 l 4.92884,1.58713 c 4.485,3.373 16.28716,9.62385 17.64016,0.41885 l 3.25415,-0.76988 c -2.055,3.757 -3.51823,5.24623 1.52477,6.92723 l -0.59938,4.72726 c -4.042,-2.03 -5.51809,-1.84154 -9.37909,0.27046 -3.322,-3.443 -4.59965,-1.5067 -7.30565,0.5483 l -2.89519,1.37918 -7.99033,11.49286 0.29424,2.89433 c -2.504,2.193 -2.00781,8.51194 -0.59681,11.23194 L 357,409 l 0.56143,-3.30039 -0.99905,-2.21786 -1.97398,-4.69298 c 2.18793,-5.23849 0.1237,-4.99419 -0.89991,-9.45723 C 351.58593,383.95439 351.825,381.483 349,376 Z"
id="path212733"
sodipodi:nodetypes="cccccccccccccccccccc" />
<path
style="fill:#153d7a;stroke:none"
d="m 154,397 1.3869,1.72614 L 155,401 l 2.55685,0.22154 c 6.44333,1.9104 4.22496,0.79936 11.18086,5.54002 3.619,5.226 12.09844,5.77886 17.96144,6.28886 12.283,1.071 22.60678,0.56425 34.67478,-4.62875 l -2.10658,-3.04401 -1.20355,-1.8516 -1.19242,-3.05785 C 210.68488,395.51869 211.53464,397.39542 203,390 c -7.88,-10.479 -24.933,-6.498 -36,-3.511 -3.192,0.862 -7.499,0.473 -10.107,2.79 -2.048,1.82 -2.263,5.215 -2.893,7.721 z"
id="path212735"
sodipodi:nodetypes="cccccccccccccc" />
<path
style="fill:#518ecd;stroke:none"
d="m 209.59503,380.52295 -3.8759,9.297 C 206.54613,396.51495 210.431,398.26 217,401 c 1.36409,2.71133 2.04267,1.72613 2,0 h 2 v -4 l 3,2 6.05388,-3.88682 c -4.298,-7.349 -12.57385,-12.68023 -20.45885,-14.59023 z"
id="path212737"
sodipodi:nodetypes="ccccccccc" />
<path
style="fill:#2351c9;stroke:none"
d="m 297,393 9,-9 z"
id="path212739" />
<path
style="fill:#3a6aaa;stroke:none"
d="m 311.63336,391.68993 -25.46217,20.59968 c 15.992,0 19.906,-9.025 33,-16 v -1 l -5,-1 v -1 l 9.2e-4,-1.83229 z"
id="path212741"
sodipodi:nodetypes="cccccccc" />
<path
style="fill:#4172ac;stroke:none"
d="M 226.27901,397.35978 220.94279,396.891 217,399 c -0.279,5.985 5.998,13.533 11.158,16.169 4.794,2.449 12.50587,1.41116 17.72487,1.53916 2.9941,1.86618 13.41402,0.71643 17.11713,0.29184 l 1,-5 5,1 c -3.781,-10.545 -20.779,-6.445 -28,-12 h -1 c -4.489,2.973 -8.22,-1.995 -10,-6 z"
id="path212743"
sodipodi:nodetypes="cccscccccccc" />
<path
style="fill:#5592d5;stroke:none"
d="m 292,399 c 0.38,13.477 -25.403,6.2 -34,6 v 1 l 11,7 -5,-1 -1,5 7.80935,-1.03827 c 17.1474,1.92365 25.171,-11.28537 34.33253,-19.05345 C 300.96988,394.09028 296.406,397.879 292,399 Z"
id="path212745"
sodipodi:nodetypes="ccccccccc" />
<path
style="fill:#123473;stroke:none"
d="m 314.69895,411.71511 c -5.26779,1.95345 -7.52695,0.95789 -12.73795,-0.39711 -4.279,-1.112 -13.0984,0.41096 -17.80353,1.34998 -0.91604,23.56279 -15.92812,31.38793 1.77627,41.66923 C 298.8701,450.23509 289.162,447.582 293,442 l 5.34265,-4.13795 C 298.31079,435.5539 298.90819,433.92398 300,432 l 10,-6 10,-1 1,-6 c -4.185,-2.397 -3.18419,-4.58946 -1.69819,-8.50546 z"
id="path212747"
sodipodi:nodetypes="cccccccccccc" />
<path
style="fill:#2f609b;stroke:none"
d="m 274.69766,414.3416 -5.42085,1.69039 c -5.039,-0.014 -5.93819,0.40048 -12.33528,0.44246 -4.09625,0.21244 -4.86223,-1.30591 -10.7581,0.5024 L 246,437 c -0.15389,3.51505 1.95277,4.82411 1,8 h 1 c -1.5651,3.28925 -1.4506,6.78475 -1.67203,10.34725 13.007,3.441 27.88243,3.31378 40.67203,-1.34725 l -7,-5 7,-16 0.32383,-3.17335 L 285,428 l 3,-16 z"
id="path212749"
sodipodi:nodetypes="ccccccccccccccc" />
<path
style="display:inline;fill:#3e70af;stroke:none"
d="m 381.08533,164.02236 c -2.78685,7.86875 -4.35917,21.97964 -5.31517,28.86664 -2.045,14.72 -2.778,30.135 -2.778,45 0,8.961 1.407,19.309 -0.806,28 -1.253,4.923 -2.246,26.917 2.806,28 l -2.706,46.907 -17.294,22.093 c -7.601,-1.894 -14.31056,9.88224 -17.94256,16.20624 -9.97699,2.10285 -17.27019,10.88882 -18.67519,17.43982 28.19093,-9.09138 59.76234,-42.16689 66.04034,-71.11289 2.903,-13.383 -0.54821,-27.68366 0.53479,-41.04466 0.898,-11.071 0.13145,-22.92515 0.89145,-34.02015 0.634,-9.265 1.87073,-19.12336 0.39373,-28.37836 -1.9536,-7.59077 -0.31948,-10.02848 -1.31548,-18.24848 3.84883,-4.71372 -2.41932,-5.81138 -3.92708,-6.84152 -4.90987,-4.84814 4.10296,-23.508 0.0932,-32.86664 z"
id="path212653"
sodipodi:nodetypes="ccsccccccccccccc" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 30 KiB

@@ -1,12 +0,0 @@
<script>
/** @type {{children?: import('svelte').Snippet}} */
let { children } = $props();
</script>
<script module>
import img from "$lib/htmlComponents/img.svelte";
import Callout from "$lib/Callout.svelte";
export { img, Callout };
</script>
{@render children?.()}
-14
View File
@@ -1,14 +0,0 @@
import { dev } from '$app/environment';
export const SITE_TITLE = "Jade's Website";
export const SITE_URL = dev ? "http://localhost:5173" : "https://jade.ellis.link"
export const SITE_DOMAIN = 'jade.ellis.link';
export const SITE_DEFAULT_DESCRIPTION =
"Jade's website.";
export const RSS_DEFAULT_POSTS_PER_PAGE = 15;
-28
View File
@@ -1,28 +0,0 @@
export interface MdsvexPage {
readingTime: ReadingTime
flattenedHeadings: FlattenedHeading[]
headings: NestedHeading[]
[key: string]: unknown
}
export interface ReadingTime {
text: string
minutes: number
time: number
words: number
}
export interface FlattenedHeading {
level: number
title: string
id: string
}
export interface NestedHeading {
level: number
title: string
id: string
children: NestedHeading[]
}
-55
View File
@@ -1,55 +0,0 @@
{
"name": "JadedBlueEyes",
"short_name": "Jade",
"start_url": "/?utm_source=manifest",
"display": "minimal-ui",
"icons": [
{
"src": "/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image/png"
},
{
"src": "/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image/png"
},
{
"src": "/android-chrome-72x72.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "/android-chrome-96x96.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "/android-chrome-144x144.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-256x256.png",
"sizes": "256x256",
"type": "image/png"
},
{
"src": "/android-chrome-384x384.png",
"sizes": "384x384",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#1e2a55",
"background_color": "#1e2a55"
}
-194
View File
@@ -1,194 +0,0 @@
:root {
--callout-bug: var(--color-red);
--callout-default: var(--color-blue);
--callout-error: var(--color-red);
--callout-example: var(--color-purple);
--callout-fail: var(--color-red);
--callout-important: var(--color-cyan);
--callout-info: var(--color-blue);
--callout-question: var(--color-orange);
--callout-success: var(--color-green);
--callout-summary: var(--color-cyan);
--callout-tip: var(--color-cyan);
--callout-todo: var(--color-blue);
--callout-warning: var(--color-orange);
--callout-quote: rgb(158, 158, 158);
--callout-title-weight: bold;
--callout-radius: var(--border-radius);
--callout-border-opacity: 25%;
--callout-background-opacity: 10%;
--callout-content-padding: 0;
--callout-content-background: transparent;
}
.callout {
--callout-color: var(--callout-default);
/* --callout-icon: lucide-pencil; */
}
.callout[data-callout="abstract"],
.callout[data-callout="summary"],
.callout[data-callout="tldr"] {
--callout-color: var(--callout-summary);
/* --callout-icon: lucide-clipboard-list; */
}
.callout[data-callout="info"] {
--callout-color: var(--callout-info);
/* --callout-icon: lucide-info; */
}
.callout[data-callout="todo"] {
--callout-color: var(--callout-todo);
/* --callout-icon: lucide-check-circle-2; */
}
.callout[data-callout="important"] {
--callout-color: var(--callout-important);
/* --callout-icon: lucide-flame; */
}
.callout[data-callout="tip"],
.callout[data-callout="hint"] {
--callout-color: var(--callout-tip);
/* --callout-icon: lucide-flame; */
}
.callout[data-callout="success"],
.callout[data-callout="check"],
.callout[data-callout="done"] {
--callout-color: var(--callout-success);
/* --callout-icon: lucide-check; */
}
.callout[data-callout="question"],
.callout[data-callout="help"],
.callout[data-callout="faq"] {
--callout-color: var(--callout-question);
/* --callout-icon: help-circle; */
}
.callout[data-callout="warning"],
.callout[data-callout="caution"],
.callout[data-callout="attention"] {
--callout-color: var(--callout-warning);
/* --callout-icon: lucide-alert-triangle; */
}
.callout[data-callout="failure"],
.callout[data-callout="fail"],
.callout[data-callout="missing"] {
--callout-color: var(--callout-fail);
/* --callout-icon: lucide-x; */
}
.callout[data-callout="danger"],
.callout[data-callout="error"] {
--callout-color: var(--callout-error);
/* --callout-icon: lucide-zap; */
}
.callout[data-callout="bug"] {
--callout-color: var(--callout-bug);
/* --callout-icon: lucide-bug; */
}
.callout[data-callout="example"] {
--callout-color: var(--callout-example);
/* --callout-icon: lucide-list; */
}
.callout[data-callout="quote"],
.callout[data-callout="cite"] {
--callout-color: var(--callout-quote);
/* --callout-icon: quote-glyph; */
}
.callout {
overflow: hidden;
border-style: solid;
border-color: color-mix(in srgb, var(--callout-color) var(--callout-border-opacity), transparent);
border-width: var(--callout-border-width);
border-radius: var(--callout-radius);
margin-block: 1em;
margin-inline: 0;
mix-blend-mode: var(--callout-blend-mode);
background-color: color-mix(in srgb, var(--callout-color) var(--callout-background-opacity), transparent);
padding: 0.75em;
padding-inline-start: 1.5em;
--callout-title-color: var(--callout-color);
}
.callout.is-collapsible .callout-title {
cursor: var(--cursor);
}
.callout-title {
padding: var(--callout-title-padding);
display: flex;
gap: calc(var(--spacing)/4);
font-size: var(--callout-title-size);
color: rgb(var(--callout-color));
line-height: var(--line-height-tight);
align-items: flex-start;
}
.callout-title-inner {
--font-weight: var(--callout-title-weight);
font-weight: var(--font-weight);
color: var(--callout-title-color);
}
/* .callout-title {
--font-weight: var(--callout-title-weight);
font-weight: var(--font-weight);
color: var(--callout-title-color);
padding: var(--callout-title-padding);
font-size: var(--callout-title-size);
line-height: var(--line-height-tight);
} */
.callout-content {
overflow-block: auto;
padding: var(--callout-content-padding);
background-color: var(--callout-content-background);
}
.callout-content .callout {
margin-block-start: 20px;
}
.callout-icon {
flex: 0 0 auto;
display: flex;
align-items: center;
}
.callout-icon .tabler-icon {
color: var(--callout-color);
}
.callout-icon::after {
content: "\200B";
}
/* .callout-fold {
display: flex;
align-items: center;
padding-inline-end: var(--size-4-2);
}
.callout-fold::after {
content: "\200B";
}
.callout-fold .svg-icon {
transition: transform 100ms ease-in-out;
}
.callout-fold.is-collapsed .svg-icon {
transform: rotate(calc(var(--direction) * -1 * 90deg));
} */
-57
View File
@@ -1,57 +0,0 @@
/* Code */
pre {
color-scheme: var(--code-colour-scheme);
color: var(--code-color);
background-color: var(--code-background-color);
overflow-x: auto;
font-weight: 400;
font-size: .875em;
line-height: 1.7142857;
margin-top: 1.7142857em;
margin-bottom: 1.7142857em;
border-radius: var(--edge-border-radius, --border-radius);
padding: calc(var(--spacing)/2);
box-shadow: 0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a
}
pre>code {
word-wrap: normal;
background-color: initial;
border: 0;
border-radius: initial;
display: flex;
flex-direction: column;
line-height: inherit;
margin: 0;
width: max-content;
min-width: 100%;
max-width: auto;
overflow: visible;
}
code[data-line-numbers]>span[data-line-number] {
padding-left: 0;
}
code[data-line-numbers]>span[data-line-number]::before {
/* Insert the line number data attribute before the line */
content: attr(data-line-number);
/* Other styling */
display: inline-block;
width: 1rem;
margin-inline-start: .25rem;
margin-inline-end: .8rem;
text-align: right;
color: var(--code-color);
opacity: 0.25;
}
code>span[data-highlighted] {
background: var(--code-highlighted);
width: 100%;
}
/* code>span[data-highlighted]+span[data-highlighted] {
border-top: 1px solid theme("colors.slate.800");
} */
@@ -1,20 +0,0 @@
.footnote-ref {
text-decoration: none;
font-size: var(--footnote-size);
}
sup:has(.footnote-ref) {
vertical-align: super;
}
.footnotes {
font-size: var(--footnote-size);
}
.footnote-backref {
display: inline-block;
/* margin-inline-start: var(--size-4-1); */
margin-inline-start: .5em;
/* color: var(--text-faint); */
text-decoration: none;
}
-225
View File
@@ -1,225 +0,0 @@
@import "./style/code.css";
@import "./style/callout.css";
@import "./style/footnote.css";
:root {
color-scheme: light;
--spacing: 24px;
--page-width: 57.75rem;
--footnote-size: 0.9em;
--theme: #242424;
--background-color: #f8f8f8;
--surface-color: #fff;
--surface-secondary-color: #ededed;
--input-background-color: #fff;
--input-color: #24292e;
--backdrop-color: rgba(247, 247, 247, .54);
--shadow-color: rgba(0, 0, 0, .12);
--font-color: rgba(0, 0, 0, .87);
--font-color-contrast: rgba(255, 255, 255, 1);
--font-color-secondary: rgba(0, 0, 0, .6);
--shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
--font-family-base: Roboto, sans-serif;
--font-family-heading: "Sen", Roboto, sans-serif;
--border-radius: 8px;
--code-colour-scheme: dark;
--code-background-color: #0d1117;
--code-color: #fff;
--color-primary: hsl(230, 50%, 90%);
--color-secondary: hsl(230, 50%, 10%);
--color-tertiary: hsl(290, 80%, 20%);
--color-accent: hsl(227, 80%, 20%);
--color-red: #e93147;
--color-orange: #ec7500;
--color-yellow: #e0ac00;
--color-green: #08b94e;
--color-cyan: #00bfbc;
--color-blue: #086ddd;
--color-purple: #7852ee;
--color-pink: #d53984;
scroll-behavior: smooth;
}
@media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
--theme: #eee;
--background-color: #141414;
--backdrop-color: rgba(20, 20, 20, .54);
--shadow-color: rgba(255, 255, 255, .12);
--surface-color: #242424;
--surface-secondary-color: #222222;
--input-background-color: #161616;
--input-color: #d8d8d8;
--font-color: rgba(255, 255, 255, .87);
--font-color-contrast: rgba(0, 0, 0, .87);
--font-color-secondary: rgba(255, 255, 255, .6);
--color-primary: hsl(230, 50%, 10%);
--color-secondary: hsl(230, 50%, 90%);
--color-tertiary: hsl(290, 80%, 80%);
--color-accent: hsl(195, 80%, 80%);
--color-red: #fb464c;
--color-orange: #e9973f;
--color-yellow: #e0de71;
--color-green: #44cf6e;
--color-cyan: #53dfdd;
--color-blue: #027aff;
--color-purple: #a882ff;
--color-pink: #fa99cd;
}
}
@media print {
:root {
--background-color: white;
}
}
h2,
h3,
h4,
h5,
h6 {
break-after: avoid-page;
}
img,
svg,
table,
canvas {
break-inside: avoid;
}
@media print {
a:not(:where(.footnote-ref, .footnote-backref)):after {
content: " (" attr(href) ")";
}
}
html {
font-family: var(--font-family-base);
background-color: var(--background-color);
color: var(--font-color);
font-size: 16px;
line-height: 1.5
}
body {
padding: 0;
margin: 0;
min-height: 100vh;
}
iframe,
img,
svg {
/* max-block-size: 100%;
max-inline-size: 100%;
inline-size: auto;
block-size: auto; */
max-width: 100%;
height: auto;
width: 100%;
display: block;
}
a {
color: var(--color-accent);
}
a:visited {
color: var(--color-tertiary);
}
.container {
--container-max-width: var(--page-width);
--padding-x: var(--spacing);
max-width: calc(var(--container-max-width) + 2*var(--padding-x));
/* width: 100%; */
margin-inline: auto;
padding-inline: var(--padding-x);
}
.main {
/* margin: 0 auto; */
--edge-border-radius: var(--border-radius);
}
@media screen and (max-width: 320px) {
.main {
padding: 0 0;
--edge-border-radius: 0;
}
}
.card {
border-radius: var(--border-radius);
box-shadow: var(--shadow);
background-color: var(--surface-color);
}
.edge {
border-radius: var(--edge-border-radius);
}
.screen-reader-only {
position: absolute;
clip: rect(0, 0, 0, 0);
width: 1px;
height: 1px;
overflow: hidden;
white-space: nowrap;
}
.screen-reader-only:focus {
clip: auto;
width: auto;
height: auto;
white-space: normal;
overflow: visible;
}
button {
display: inline-block;
color: var(--color-primary);
background: var(--color-accent);
border-radius: 4px;
margin: 8px 8px 8px 0px;
padding: 12px 24px;
border: solid 2px var(--color-accent);
}
.secondary {
border: solid 2px var(--color-accent);
color: var(--color-accent);
background: transparent;
}
#sentry-feedback {
--dialog-inset: auto auto 0;
--foreground: var(--color-secondary);
--background: var(--color-primary);
--accent-foreground: var(--color-primary);
--accent-background: var(--color-accent);
--success-color: var(--color-green);
--error-color: var(--color-red);
--border: 1.5px solid color-mix(in srgb, var(--color-secondary) 25%, transparent);
--box-shadow: var(--shadow);
}
-9
View File
@@ -1,9 +0,0 @@
import { writable } from 'svelte/store'
const query = typeof window != "undefined" ? window?.matchMedia('(prefers-color-scheme: dark)') : undefined
export const theme = writable(query?.matches ? 'dark' : 'light')
query?.addEventListener('change', e => {
theme.set(e.matches ? 'dark' : 'light')
});
-172
View File
@@ -1,172 +0,0 @@
import { tags as t } from '@lezer/highlight';
// NOTE: This requires enabling unsafe-inline styles in the CSP
// From thememirror
import { EditorView } from '@codemirror/view';
import type { Extension } from '@codemirror/state';
import {
HighlightStyle,
type TagStyle,
syntaxHighlighting,
} from '@codemirror/language';
interface Options {
/**
* Theme variant. Determines which styles CodeMirror will apply by default.
*/
variant: Variant;
/**
* Settings to customize the look of the editor, like background, gutter, selection and others.
*/
settings: Settings;
/**
* Syntax highlighting styles.
*/
styles: TagStyle[];
}
type Variant = 'light' | 'dark';
interface Settings {
/**
* Editor background.
*/
background: string;
/**
* Default text color.
*/
foreground: string;
/**
* Caret color.
*/
caret: string;
/**
* Selection background.
*/
selection: string;
/**
* Background of highlighted lines.
*/
lineHighlight: string;
/**
* Gutter background.
*/
gutterBackground: string;
/**
* Text color inside gutter.
*/
gutterForeground: string;
}
const createTheme = ({ variant, settings, styles }: Options): Extension => {
const theme = EditorView.theme(
{
// eslint-disable-next-line @typescript-eslint/naming-convention
'&': {
backgroundColor: settings.background,
color: settings.foreground,
},
'.cm-content': {
caretColor: settings.caret,
},
'.cm-cursor, .cm-dropCursor': {
borderLeftColor: settings.caret,
},
'&.cm-focused .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection':
{
backgroundColor: settings.selection,
},
'.cm-activeLine': {
backgroundColor: settings.lineHighlight,
},
'.cm-gutters': {
backgroundColor: settings.gutterBackground,
color: settings.gutterForeground,
},
'.cm-activeLineGutter': {
backgroundColor: settings.lineHighlight,
},
},
{
dark: variant === 'dark',
},
);
const highlightStyle = HighlightStyle.define(styles);
const extension = [theme, syntaxHighlighting(highlightStyle)];
return extension;
};
export default createTheme;
export const githubLight = createTheme({
variant: 'light',
settings: {
background: '#fff',
foreground: '#24292e',
selection: '#BBDFFF',
// selectionMatch: '#BBDFFF',
gutterBackground: '#fff',
gutterForeground: '#6e7781',
caret: '#7c3aed',
lineHighlight: '#8a91991a',
},
styles: [
{ tag: [t.standard(t.tagName), t.tagName], color: '#116329' },
{ tag: [t.comment, t.bracket], color: '#6a737d' },
{ tag: [t.className, t.propertyName], color: '#6f42c1' },
{ tag: [t.variableName, t.attributeName, t.number, t.operator], color: '#005cc5' },
{ tag: [t.keyword, t.typeName, t.typeOperator, t.typeName], color: '#d73a49' },
{ tag: [t.string, t.meta, t.regexp], color: '#032f62' },
{ tag: [t.name, t.quote], color: '#22863a' },
{ tag: [t.heading, t.strong], color: '#24292e', fontWeight: 'bold' },
{ tag: [t.emphasis], color: '#24292e', fontStyle: 'italic' },
{ tag: [t.deleted], color: '#b31d28', backgroundColor: 'ffeef0' },
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: '#e36209' },
{ tag: [t.url, t.escape, t.regexp, t.link], color: '#032f62' },
{ tag: t.link, textDecoration: 'underline' },
{ tag: t.strikethrough, textDecoration: 'line-through' },
{ tag: t.invalid, color: '#cb2431' }
],
});
export
const githubDark = createTheme({
variant: 'dark',
settings: {
background: '#161616',
foreground: '#d8d8d8',
caret: '#c9d1d9',
selection: '#003d73',
// selectionMatch: '#003d73',\
lineHighlight: '#1e1e1e',
gutterBackground: '#1c1c1c',
gutterForeground: '#fff',
},
styles: [
{ tag: [t.standard(t.tagName), t.tagName], color: '#7ee787' },
{ tag: [t.comment, t.bracket], color: '#8b949e' },
{ tag: [t.className, t.propertyName], color: '#d2a8ff' },
{ tag: [t.variableName, t.attributeName, t.number, t.operator], color: '#79c0ff' },
{ tag: [t.keyword, t.typeName, t.typeOperator, t.typeName], color: '#ff7b72' },
{ tag: [t.string, t.meta, t.regexp], color: '#a5d6ff' },
{ tag: [t.name, t.quote], color: '#7ee787' },
{ tag: [t.heading, t.strong], color: '#d2a8ff', fontWeight: 'bold' },
{ tag: [t.emphasis], color: '#d2a8ff', fontStyle: 'italic' },
{ tag: [t.deleted], color: '#ffdcd7', backgroundColor: 'ffeef0' },
{ tag: [t.atom, t.bool, t.special(t.variableName)], color: '#ffab70' },
{ tag: t.link, textDecoration: 'underline' },
{ tag: t.strikethrough, textDecoration: 'line-through' },
{ tag: t.invalid, color: '#f97583' },
],
});

Some files were not shown because too many files have changed in this diff Show More