### Download and Install Conduit Binary Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Instructions for downloading and installing the Conduit binary on a Linux system. This involves using wget to download the binary to the appropriate location and making it executable. ```bash $ sudo wget -O /usr/local/bin/matrix-conduit $ sudo chmod +x /usr/local/bin/matrix-conduit ``` -------------------------------- ### Start Conduit Service Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Command to start the Conduit Matrix homeserver using systemd. This command initiates the Conduit process. ```bash $ sudo systemctl start conduit ``` -------------------------------- ### Install Conduit Build Dependencies Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Commands to install necessary dependencies for compiling Conduit from source on Debian and RHEL-based systems. This includes installing clang and build-essential packages. ```bash # Debian $ sudo apt install libclang-dev build-essential # RHEL $ sudo dnf install clang ``` -------------------------------- ### Certbot SSL Certificate Installation Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Command to obtain and install an SSL certificate using Certbot for a specified domain name. It also includes an example of configuring Certbot to use ECC for the private key. ```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 ``` -------------------------------- ### Enable Conduit Service on Boot Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Command to enable the Conduit systemd service, ensuring that Conduit automatically starts when the system boots up. ```bash $ sudo systemctl enable conduit ``` -------------------------------- ### Enable Caddy Service Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Command to enable the Caddy web server service, ensuring it starts automatically on system boot. ```bash $ sudo systemctl enable caddy ``` -------------------------------- ### Compile Conduit from Source Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Command to compile Conduit in release mode after navigating to the source tree. This assumes all dependencies have been installed. ```bash $ cargo build --release ``` -------------------------------- ### Matrix and Conduit Goals Source: https://github.com/timokoesters/conduit/blob/next/README.md Explains the Matrix protocol and the goals of the Conduit project, emphasizing efficiency and ease of setup for personal or small-scale hosting. ```Rust /// Matrix 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. /// /// 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. ``` -------------------------------- ### Basic Docker Compose Deployment Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/docker.md Starts Conduit services using Docker Compose in detached mode. Assumes a docker-compose.yml file is present and configured. ```bash docker compose up -d ``` -------------------------------- ### Global Conduit Configuration (TOML) Source: https://github.com/timokoesters/conduit/blob/next/docs/configuration.md A minimal example of a global Conduit configuration file. This snippet includes a placeholder for further configuration, typically referencing an external TOML file for detailed settings. ```toml [global] {{#include ../conduit-example.toml:22:}} ``` -------------------------------- ### Conduit TURN/STUN Configuration Source: https://github.com/timokoesters/conduit/blob/next/docs/turn.md Configuration settings for Conduit to connect to a TURN/STUN server. Requires a running Coturn server. The `uris` should match the Coturn server's realm and transport protocol. The `secret` is used for static authentication, or `username` and `password` can be used if configured. ```toml [turn] # Refer to your Coturn settings. # `your.turn.url` has to match the REALM setting of your Coturn as well as `transport`. uris = ["turn:your.turn.url?transport=udp", "turn:your.turn.url?transport=tcp"] # static-auth-secret of your turnserver 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`! #username = "" #password = "" ``` -------------------------------- ### Build Conduit with Docker Compose Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/docker.md Builds and starts the Conduit container using Docker Compose. This requires modifying the 'docker-compose.yml' file to uncomment the 'build:' option and comment out the 'image:' option. ```bash docker compose up ``` -------------------------------- ### Conduit Contact and Support Source: https://github.com/timokoesters/conduit/blob/next/README.md Provides various channels for users to get in touch with the Conduit developers for questions or support, including Matrix chat, email, and GitLab issues. ```Rust /// Ask in `#conduit:ahimsa.chat` on Matrix /// Write an E-Mail to `conduit@koesters.xyz` /// Send an direct message to `@timokoesters:fachschaften.org` on Matrix /// [Open an issue on GitLab](https://gitlab.com/famedly/conduit/-/issues/new) ``` -------------------------------- ### Trying Conduit Source: https://github.com/timokoesters/conduit/blob/next/README.md Provides instructions on how to try out the Conduit homeserver using a Matrix client and a specific registration token. ```Rust /// You can test our Conduit instance by opening a client that supports registration tokens such as [Element web](https://app.element.io/), [Nheko](https://matrix.org/ecosystem/clients/nheko/) or [SchildiChat web](https://app.schildi.chat/) and registering on the `conduit.rs` homeserver. /// The registration token is "for_testing_only". Don't share personal information. /// Once you have registered, you can use any other [Matrix client](https://matrix.org/ecosystem/clients) to login. ``` -------------------------------- ### Conduit Appservice Registration and Management Source: https://github.com/timokoesters/conduit/blob/next/docs/appservices.md This section details the commands used to interact with the Conduit appservice bot for registration and management. It includes registering a new appservice by pasting its YAML configuration, listing all registered appservices, and unregistering an appservice by its name. ```APIDOC APIDOC: register-appservice Registers a new appservice by pasting its YAML configuration content. Parameters: yaml_registration: The content of the appservice's YAML registration file. Usage: @conduit:your.server.name: register-appservice ``` paste the contents of the yaml registration here ``` list-appservices Lists all currently registered appservices. Returns: A string indicating the number of appservices and their names, e.g., "Appservices (1): your-bridge". Usage: @conduit:your.server.name: list-appservices unregister-appservice Removes a registered appservice. Parameters: name: The name of the appservice to unregister, obtained from `list-appservices`. Usage: @conduit:your.server.name: unregister-appservice ``` -------------------------------- ### Conduit Project Overview Source: https://github.com/timokoesters/conduit/blob/next/README.md This section provides a high-level overview of the Conduit project, its purpose as a Matrix homeserver, and its target audience. It also includes links to external documentation and related resources. ```Rust /// A Matrix homeserver written in Rust /// Visit [Conduit documentation](https://famedly.gitlab.io/conduit) for more information. /// Alternatively open [docs/introduction.md](docs/introduction.md) in this repository. ``` -------------------------------- ### Complement Repository Link Source: https://github.com/timokoesters/conduit/blob/next/complement/README.md Provides a direct link to the official repository for the Complement tool. ```Markdown [its repository](https://github.com/matrix-org/complement) ``` -------------------------------- ### Set Conduit File Permissions Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Commands to set ownership and permissions for the Conduit configuration directory and the default database path. This ensures the Conduit user can read its configuration and write to the database directory. ```bash sudo chown -R root:root /etc/matrix-conduit sudo chmod 755 /etc/matrix-conduit sudo mkdir -p /var/lib/matrix-conduit/ sudo chown -R conduit:conduit /var/lib/matrix-conduit/ sudo chmod 700 /var/lib/matrix-conduit/ ``` -------------------------------- ### Contributing to Conduit Source: https://github.com/timokoesters/conduit/blob/next/README.md Outlines the process for contributing to the Conduit project, including finding issues, communicating progress, and submitting merge requests. ```Rust /// 1. Look for an issue you would like to work on and make sure no one else is currently working on it. /// 2. Tell us that you are working on the issue (comment on the issue or chat in /// [#conduit:ahimsa.chat](https://matrix.to/#/#conduit:ahimsa.chat)). If it is more complicated, please explain your approach and ask questions. /// 3. Fork the repo, create a new branch and push commits. /// 4. Submit a MR ``` -------------------------------- ### Conduit Configuration via Environment Variables Source: https://github.com/timokoesters/conduit/blob/next/docs/configuration.md Demonstrates how to configure Conduit using environment variables. Settings can be directly mapped or nested using underscores. ```env # Direct mapping CONDUIT_PORT=8080 CONDUIT_SERVER_NAME="my.server.com" # Nested table mapping CONDUIT_WELL_KNOWN_CLIENT="https://matrix.example.org" CONDUIT_TLS_CERTIFICATE="/path/to/cert.pem" CONDUIT_TLS_KEY="/path/to/key.pem" ``` -------------------------------- ### Run Coturn with Docker Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/docker.md This snippet shows the command to run the Coturn Docker image directly. It maps a local configuration file and uses host networking. ```bash docker run -d --network=host -v $(pwd)/coturn.conf:/etc/coturn/turnserver.conf coturn/coturn ``` -------------------------------- ### Run Coturn with Docker Compose Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/docker.md This snippet provides a docker-compose.yml configuration to set up and run the Coturn server. It specifies the image, restart policy, network mode, and volume mapping for the configuration file. ```yaml 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 ``` -------------------------------- ### Matrix Client API Versions Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md This API endpoint returns a JSON object listing the supported client API versions for a Matrix homeserver. ```APIDOC GET /_matrix/client/versions Description: Retrieves the supported client API versions for the homeserver. Responses: 200 OK: Content-Type: application/json Body: { "versions": ["v1.0", "v1.1", ...] } 404 Not Found: If the endpoint does not exist on the server. ``` -------------------------------- ### Conduit Complement Automation Script Source: https://github.com/timokoesters/conduit/blob/next/complement/README.md Details the usage of the automation script provided within the Conduit project for Complement. It mentions that the script accepts command-line arguments and advises users to read the script for specifics. ```Shell #!/bin/sh # ../bin/complement # This script automates Complement usage with Conduit. # It accepts command line arguments. Refer to the script for details. ``` -------------------------------- ### Conduit Project Supporters Source: https://github.com/timokoesters/conduit/blob/next/README.md Acknowledges financial and technical contributions to the Conduit project from various organizations and individuals, including key libraries like Ruma and axum. ```Rust /// Thanks to FUTO, Famedly, Prototype Fund (DLR and German BMBF) and all individuals for financially supporting this project. /// /// Thanks to the contributors to Conduit and all libraries we use, for example: /// - Ruma: A clean library for the Matrix Spec in Rust /// - axum: A modular web framework ``` -------------------------------- ### Caddy Reverse Proxy Configuration for Conduit Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Caddyfile configuration to set up a reverse proxy for Conduit. It specifies the server name and forwards requests for the Matrix API path to the Conduit instance. ```caddy your.server.name, your.server.name:8448 { reverse_proxy /_matrix/* 127.0.0.1:6167 } ``` -------------------------------- ### Conduit Status and Missing Features Source: https://github.com/timokoesters/conduit/blob/next/README.md Details the current Beta status of Conduit, highlighting supported features and known limitations, such as missing E2EE features over federation. ```Rust /// Conduit is 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. /// /// There are still a few important features missing: /// - E2EE emoji comparison over federation (E2EE chat works) /// - Outgoing read receipts, typing, presence over federation (incoming works) ``` -------------------------------- ### Build Conduit Docker Image Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/docker.md Builds the Conduit Docker image from the provided Dockerfile. This command tags the resulting image as 'matrixconduit/matrix-conduit:latest'. ```bash docker build --tag matrixconduit/matrix-conduit:latest . ``` -------------------------------- ### Create Conduit System User Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Command to create a dedicated system user for Conduit on Debian or RHEL systems. This user is created with system privileges, disabled login, and no home directory. ```bash sudo adduser --system conduit --group --disabled-login --no-create-home ``` -------------------------------- ### Check Server Versions Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md This command checks the available client API versions supported by the Matrix homeserver. It's a basic health check to ensure the server is responding. ```bash curl https://your.server.name/_matrix/client/versions # If using port 8448 curl https://your.server.name:8448/_matrix/client/versions ``` -------------------------------- ### Systemd Service Configuration for Conduit Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Defines the systemd service unit for Conduit, specifying its description, dependencies, environment variables, user, group, restart policy, and the executable path. This allows Conduit to be managed as a system service. ```systemd [Unit] Description=Conduit Matrix Server After=network.target [Service] Environment="CONDUIT_CONFIG=/etc/matrix-conduit/conduit.toml" User=conduit Group=conduit Restart=always ExecStart=/usr/local/bin/matrix-conduit [Install] WantedBy=multi-user.target ``` -------------------------------- ### Coturn Configuration File Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/docker.md Basic configuration for the Coturn TURN server. This file sets up authentication using a shared secret and defines the realm for the server. ```conf use-auth-secret static-auth-secret= realm= ``` -------------------------------- ### Conduit Configuration via TOML Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/docker.md Configuration for Conduit's TURN server integration using the `conduit.toml` file. Sets the TURN URIs and the shared secret for authentication. ```toml turn_uris = ["turn:?transport=udp", "turn:?transport=tcp"] turn_secret = "" ``` -------------------------------- ### Pull Docker Image Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/docker.md Pulls the Conduit Docker image from a registry. Replace '' with the actual image URL from the documentation. ```bash docker image pull ``` -------------------------------- ### Run Conduit Docker Container Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/docker.md Runs the Conduit Docker container in detached mode, mapping ports, mounting a volume for data persistence, and setting essential environment variables for server configuration. ```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="100" \ -e CONDUIT_PORT="6167" \ --name conduit ``` -------------------------------- ### Apache Configuration for .well-known Delegation Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Apache configuration snippet for setting up .well-known delegation to route federation traffic to port 443. This is useful when Conduit runs behind Cloudflare or similar services that may not support port 8448. ```apache # .well-known delegation on Apache ErrorDocument 200 '{"m.server": "your.server.name:443"}' Header always set Content-Type application/json Header always set Access-Control-Allow-Origin * ``` -------------------------------- ### Conduit Manual Client Delegation (JSON) Source: https://github.com/timokoesters/conduit/blob/next/docs/delegation.md JSON response format for /.well-known/matrix/client to inform clients about Conduit's accessibility. Specifies the 'm.homeserver' with the 'base_url'. ```json { "m.homeserver": { "base_url": "https://matrix.example.org" } } ``` -------------------------------- ### Reload Apache Service Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Commands to reload the Apache web server service. This applies configuration changes made to Apache's virtual host files. ```bash # Debian $ sudo systemctl reload apache2 # Installed from source $ sudo apachectl -k graceful ``` -------------------------------- ### Proxy Configuration - Global Source: https://github.com/timokoesters/conduit/blob/next/docs/configuration.md Configures a global proxy server to handle all outgoing requests made by Conduit. ```toml [global.proxy.global] url = "https://example.com" ``` -------------------------------- ### Conduit Logo Information Source: https://github.com/timokoesters/conduit/blob/next/README.md Details the source and licensing information for the Conduit project's logo. ```Rust /// Lightning Bolt Logo: /// Logo License: ``` -------------------------------- ### Filesystem Backend Configuration Source: https://github.com/timokoesters/conduit/blob/next/docs/configuration.md Configures the filesystem backend for storing media files. It specifies the base directory and the structure for organizing files within that directory. ```toml [global.media] backend = "filesystem" path = "/srv/matrix-media" [global.media.directory_structure] depth = 4 length = 2 ``` ```toml [global.media.directory_structure] ``` -------------------------------- ### Apache Reverse Proxy Configuration for Conduit Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Apache virtual host configuration to proxy requests for the Matrix API to the Conduit server. It includes settings for listening ports, server name, and proxy directives with timeouts. ```apache # Requires mod_proxy and mod_proxy_http # # On Apache instance compiled from source, # paste into httpd-ssl.conf or httpd.conf Listen 8448 ServerName your.server.name # EDIT THIS AllowEncodedSlashes NoDecode ProxyPass /_matrix/ http://127.0.0.1:6167/_matrix/ timeout=300 nocanon ProxyPassReverse /_matrix/ http://127.0.0.1:6167/_matrix/ ``` -------------------------------- ### Conduit Donation Information Source: https://github.com/timokoesters/conduit/blob/next/README.md Provides methods for donating to the Conduit project, including links to Liberapay and a Bitcoin address. ```Rust /// Liberapay: /// Bitcoin: `bc1qnnykf986tw49ur7wx9rpw2tevpsztvar5x8w4n` ``` -------------------------------- ### Conduit Manual Server Delegation (JSON) Source: https://github.com/timokoesters/conduit/blob/next/docs/delegation.md JSON response format for /.well-known/matrix/server to inform servers about Conduit's accessibility. Specifies the 'm.server' key with the domain and port. ```json { "m.server": "matrix.example.org:443" } ``` -------------------------------- ### Nginx Reverse Proxy Configuration for Conduit Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Nginx server block configuration for proxying traffic to Conduit. It includes settings for SSL, HTTP/2, client body size limits, and proxying Matrix API requests. ```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; location /_matrix/ { proxy_pass http://127.0.0.1:6167; proxy_set_header Host $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; } ``` -------------------------------- ### Conduit Media Configuration Source: https://github.com/timokoesters/conduit/blob/next/docs/configuration.md Configures how media is stored by Conduit. Currently, only the 'filesystem' backend is supported, specifying the directory for media storage. ```toml [global.media] backend = "filesystem" # path = "/path/to/media/storage" # Optional: specify a custom path ``` -------------------------------- ### ByteSize Crate for Size Formatting Source: https://github.com/timokoesters/conduit/blob/next/docs/configuration.md Provides utilities for formatting and parsing byte sizes. Used for specifying storage space limits in retention policies. ```rust use bytesize::ByteSize; let space_limit = ByteSize::parse("10000MB").unwrap(); let gigabytes = ByteSize::from_str("15GiB").unwrap(); ``` -------------------------------- ### Conduit Configuration via Docker Environment Variables Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/docker.md Configuration for Conduit's TURN server integration using Docker environment variables. Sets the TURN URIs and the shared secret for authentication. ```yaml CONDUIT_TURN_URIS: '["turn:?transport=udp", "turn:?transport=tcp"]' CONDUIT_TURN_SECRET: "" ``` -------------------------------- ### CORS Headers for Client Delegation Endpoint Source: https://github.com/timokoesters/conduit/blob/next/docs/delegation.md Recommended HTTP headers to ensure all clients can access the client delegation endpoint (/.well-known/matrix/client). Includes Access-Control-Allow-Origin, Allow-Methods, and Allow-Headers. ```http Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS Access-Control-Allow-Headers: X-Requested-With, Content-Type, Authorization ``` -------------------------------- ### Proxy Configuration - By Domain Source: https://github.com/timokoesters/conduit/blob/next/docs/configuration.md Configures proxy settings on a per-domain basis, allowing specific domains to be included or excluded from proxying. ```toml [[global.proxy.domains]] url = "http://proxy.example.com" include = ["*.example.com", "another.com"] exclude = ["*.internal.com"] ``` -------------------------------- ### Reload Systemd Daemon Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Command to reload the systemd manager configuration. This is necessary after creating or modifying systemd service files to ensure systemd recognizes the changes. ```bash sudo systemctl daemon-reload ``` -------------------------------- ### Conduit Global Configuration Source: https://github.com/timokoesters/conduit/blob/next/docs/configuration.md Defines the global settings for Conduit, including network binding, server name, database configuration, caching, federation, and more. These settings control the core behavior of the application. ```toml [global] address = "127.0.0.1" port = 8000 server_name = "your_server_name.com" database_backend = "rocksdb" database_path = "/path/to/database" db_cache_capacity_mb = 300.0 enable_lightning_bolt = true allow_check_for_updates = true conduit_cache_capacity_modifier = 1.0 rocksdb_max_open_files = 1000 pdu_cache_capacity = 150000 cleanup_second_interval = 60 max_request_size = 20971520 max_concurrent_requests = 100 max_fetch_prev_events = 100 allow_registration = false registration_token = "your_registration_token" allow_encryption = true allow_federation = false allow_room_creation = true allow_unstable_room_versions = true default_room_version = "10" allow_jaeger = false tracing_flame = false jwt_secret = "your_jwt_secret" trusted_servers = ["matrix.org"] log = "warn" turn_username = "" turn_password = "" turn_uris = [] turn_secret = "" turn_ttl = 86400 emergency_password = "your_emergency_password" ``` -------------------------------- ### Reload Nginx Service Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/generic.md Command to reload the Nginx web server service. This applies configuration changes made to Nginx's server blocks. ```bash $ sudo systemctl reload nginx ``` -------------------------------- ### Conduit Automatic Delegation Configuration (TOML) Source: https://github.com/timokoesters/conduit/blob/next/docs/delegation.md Configuration for automatic delegation in Conduit using the TOML format. Specifies the client and server URLs for federation traffic. This method is recommended when Conduit is on the same physical server as the main domain. ```toml [global.well_known] client = "https://matrix.example.org" server = "matrix.example.org:443" ``` -------------------------------- ### Domain-Specific Proxy Rules (TOML) Source: https://github.com/timokoesters/conduit/blob/next/docs/configuration.md Configures proxy rules based on domain names. Traffic to included domains will be proxied, while traffic to excluded domains will bypass the proxy. Multiple `by_domain` tables can be added for different proxy configurations. ```toml [[global.proxy.by_domain]] url = "socks5://localhost:9050" include = ["*.onion", "matrix.secretly-an-onion-domain.xyz"] exclude = ["*.clearnet.onion"] ``` -------------------------------- ### Conduit Security Reporting Source: https://github.com/timokoesters/conduit/blob/next/README.md Details the procedure for reporting security vulnerabilities in Conduit, recommending direct contact with developers via Matrix or email and advising against public disclosure before a fix. ```Rust /// If you believe you have found a security issue, please send a message to [Timo](https://matrix.to/#/@timo:conduit.rs) /// and/or [Matthias](https://matrix.to/#/@matthias:ahouansou.cz) on Matrix, or send an email to /// [conduit@koesters.xyz](mailto:conduit@koesters.xyz). Please do not disclose details about the issue to anyone else before /// a fix is released publicly. ``` -------------------------------- ### Conduit Media Management Commands Source: https://github.com/timokoesters/conduit/blob/next/docs/administration/media.md Commands for managing media within the Conduit server, including purging, blocking, and listing media. These commands help maintain the integrity and security of the media backend. ```APIDOC purge-media-from-server - Deletes media from the media backend that originated from a specific server. list-media - Lists available media IDs, useful for identifying media to block or purge. block-media key [key ...] - Prevents specified media IDs or media with the same SHA256 hash from being stored in the future. purge-media-from-users user [user ...] - Purges all media uploaded by specified local users. deactivate-user --purge-media user - Deactivates a user and purges their associated media. deactivate-all --purge-media - Deactivates all users and purges their associated media. block-media-from-users user [user ...] - Prevents users from uploading media with the same SHA256 hash as previously uploaded media. allow-registration - Temporarily prevents new user account creation, useful when dealing with users who repeatedly upload undesirable media. ``` -------------------------------- ### TLS Configuration Source: https://github.com/timokoesters/conduit/blob/next/docs/configuration.md Configures Transport Layer Security (TLS) settings, including the paths to the public certificate and private key files. ```toml [global.tls] certs = "/path/to/cert.pem" key = "/path/to/key.pem" ``` -------------------------------- ### Retention Policies for Media Management Source: https://github.com/timokoesters/conduit/blob/next/docs/configuration.md Defines policies for automatically deleting media files based on access time, creation time, or storage space. Policies can be scoped to different media types like local, remote, or thumbnail. ```toml [[global.media.retention]] space = "40G" [[global.media.retention]] scope = "remote" accessed = "30d" created = "90days" [[global.media.retention]] scope = "local" accessed = "1y" [[global.media.retention]] scope = "thumbnail" space = "1GB" ``` -------------------------------- ### Nginx Configuration for Well-Known Endpoints Source: https://github.com/timokoesters/conduit/blob/next/docs/deploying/docker.md Nginx configuration to serve the Matrix client and server discovery endpoints required for federation and client connections. This configuration is typically used within a Docker container managed by Docker Compose. ```nginx server { server_name .; listen 80 default_server; location /.well-known/matrix/server { return 200 '{"m.server": ".:443"}'; types { } default_type "application/json; charset=utf-8"; } location /.well-known/matrix/client { return 200 '{"m.homeserver": {"base_url": "https://."}}'; types { } default_type "application/json; charset=utf-8"; add_header "Access-Control-Allow-Origin" *; } location / { return 404; } } ``` -------------------------------- ### humantime::parse_duration Function Source: https://github.com/timokoesters/conduit/blob/next/docs/configuration.md Parses a human-readable duration string into a std::time::Duration. Supports various units like hours, minutes, days, and months. ```rust use humantime::parse_duration; let duration = parse_duration("240h").unwrap(); let duration_days = parse_duration("2months").unwrap(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.