From 4cb26d1e4b405bff7c456c31ef587494b92cc0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 19 Sep 2023 21:28:58 +0200 Subject: [PATCH] Update docs --- doc/DISCLAIMER.md | 1 - doc/DISCLAIMER_fr.md | 1 - doc/POST_INSTALL.md | 79 ++++++++++++++++++++++++++++++++++++++++++ doc/POST_INSTALL_fr.md | 79 ++++++++++++++++++++++++++++++++++++++++++ doc/PRE_INSTALL.md | 3 ++ doc/PRE_INSTALL_fr.md | 3 ++ 6 files changed, 164 insertions(+), 2 deletions(-) create mode 100644 doc/POST_INSTALL.md create mode 100644 doc/POST_INSTALL_fr.md create mode 100644 doc/PRE_INSTALL.md create mode 100644 doc/PRE_INSTALL_fr.md diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index f5c8a36..b7ade8b 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,4 +1,3 @@ WARNING: This bridge requires additional configuration in the configuration file. * You need a local Matrix-synapse server (Yunohost app available) -* No connection to the Yunohost LDAP diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index d635111..b814f52 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -1,4 +1,3 @@ ATTENTION : Cette passerelle requiert une configuration supplémentaire dans son fichier de configuration. * Vous avez besoin d'un serveur local Matrix-Synapse (appli Yunohost disponible) -* Aucune connection au LDAP de Yunohost diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md new file mode 100644 index 0000000..2c657a3 --- /dev/null +++ b/doc/POST_INSTALL.md @@ -0,0 +1,79 @@ +### Bridge configuration + +The bridge needs to be configure after installation. + +Please edit the file `__INSTALL_DIR__/config.yaml` to add IRC servers, then run `sudo systemctl restart __APP__.service`. + +This file's documentation is here: . + +Here's a simple IRC server configuration: + +```yaml + irc.example.com: + name: "MyServer" + port: 6697 + ssl: true + + # A map for conversion of IRC user modes to Matrix power levels. This enables bridging + # of IRC ops to Matrix power levels only, it does not enable the reverse. If a user has + # been given multiple modes, the one that maps to the highest power level will be used. + modePowerMap: + o: 50 + v: 1 + + botConfig: + enabled: true + nick: "MatrixBot" + username: "matrixbot" + joinChannelsIfNoUsers: false + + privateMessages: + enabled: true + federate: true + + dynamicChannels: + enabled: true + createAlias: true + published: true + federate: true + aliasTemplate: "#irc_$CHANNEL" + + # What should the join_rule be for the new Matrix room? If 'public', + # anyone can join the room. If 'invite', only users with an invite can + # join the room. Note that if an IRC channel has +k or +i set on it, + # join_rules will be set to 'invite' until these modes are removed. + # Default: "public". + joinRule: public + # A list of user IDs which the AS bot will send invites to in response + # to a !join. Only applies if joinRule is 'invite'. Default: [] + # whitelist: + # - "@foo:example.com" + # - "@bar:example.com" + # + # Prevent the given list of channels from being mapped under any + # circumstances. + # exclude: ["#foo", "#bar"] + + # excludedUsers: + # - regex: "@.*:evilcorp.com" + # kickReason: "We don't like Evilcorp" + + matrixClients: + userTemplate: "@irc_$NICK" + displayName: "$NICK" + joinAttempts: -1 + + ircClients: + nickTemplate: "$DISPLAY[m]" + allowNickChanges: true + maxClients: 30 + + # The number of lines to allow being sent by the IRC client that has received + # a large block of text to send from matrix. If the number of lines that would + # be sent is > lineLimit, the text will instead be uploaded to matrix and the + # resulting URI is treated as a file. As such, a link will be sent to the IRC + # side instead of potentially spamming IRC and getting the IRC client kicked. + # Default: 3. + lineLimit: 10 + +``` diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md new file mode 100644 index 0000000..36eeac1 --- /dev/null +++ b/doc/POST_INSTALL_fr.md @@ -0,0 +1,79 @@ +### Configuration de la passerelle + +La passerelle nécessite d'être configurée après installation. + +Veuillez éditer le fichier `__INSTALL_DIR__/config.yaml` pour rajouter des serveurs IRC, puis exécutez `sudo systemctl restart __APP__.service`. + +Vous pouvez vous référer à pour les détails concernant ce fichier. + +Voici une configuration simple de serveur IRC: + +```yaml + irc.example.com: + name: "MyServer" + port: 6697 + ssl: true + + # A map for conversion of IRC user modes to Matrix power levels. This enables bridging + # of IRC ops to Matrix power levels only, it does not enable the reverse. If a user has + # been given multiple modes, the one that maps to the highest power level will be used. + modePowerMap: + o: 50 + v: 1 + + botConfig: + enabled: true + nick: "MatrixBot" + username: "matrixbot" + joinChannelsIfNoUsers: false + + privateMessages: + enabled: true + federate: true + + dynamicChannels: + enabled: true + createAlias: true + published: true + federate: true + aliasTemplate: "#irc_$CHANNEL" + + # What should the join_rule be for the new Matrix room? If 'public', + # anyone can join the room. If 'invite', only users with an invite can + # join the room. Note that if an IRC channel has +k or +i set on it, + # join_rules will be set to 'invite' until these modes are removed. + # Default: "public". + joinRule: public + # A list of user IDs which the AS bot will send invites to in response + # to a !join. Only applies if joinRule is 'invite'. Default: [] + # whitelist: + # - "@foo:example.com" + # - "@bar:example.com" + # + # Prevent the given list of channels from being mapped under any + # circumstances. + # exclude: ["#foo", "#bar"] + + # excludedUsers: + # - regex: "@.*:evilcorp.com" + # kickReason: "We don't like Evilcorp" + + matrixClients: + userTemplate: "@irc_$NICK" + displayName: "$NICK" + joinAttempts: -1 + + ircClients: + nickTemplate: "$DISPLAY[m]" + allowNickChanges: true + maxClients: 30 + + # The number of lines to allow being sent by the IRC client that has received + # a large block of text to send from matrix. If the number of lines that would + # be sent is > lineLimit, the text will instead be uploaded to matrix and the + # resulting URI is treated as a file. As such, a link will be sent to the IRC + # side instead of potentially spamming IRC and getting the IRC client kicked. + # Default: 3. + lineLimit: 10 + +``` diff --git a/doc/PRE_INSTALL.md b/doc/PRE_INSTALL.md new file mode 100644 index 0000000..fd3558c --- /dev/null +++ b/doc/PRE_INSTALL.md @@ -0,0 +1,3 @@ +This app requires the Matrix server Synapse to be installed first in Yunohost. + +Also, you will have to configure the bridge into its configuration file. diff --git a/doc/PRE_INSTALL_fr.md b/doc/PRE_INSTALL_fr.md new file mode 100644 index 0000000..87ceaaa --- /dev/null +++ b/doc/PRE_INSTALL_fr.md @@ -0,0 +1,3 @@ +Cette application nécessite d'installer d'abord le serveur Matrix Synapse dans Yunohost. + +Vous aurez aussi besoin de configurer la passerelle dans son fichier de configuration