From 7cb5147e74ef0e8d2eaf39b312051b54d0cf1ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 5 Dec 2021 14:58:56 +0100 Subject: [PATCH] doc: move section "Relay" at top level after "IRC" (user's guide) --- doc/de/weechat_user.de.adoc | 446 +++++++++++++++++------------------ doc/en/weechat_user.en.adoc | 424 ++++++++++++++++----------------- doc/fr/weechat_user.fr.adoc | 452 ++++++++++++++++++------------------ doc/it/weechat_user.it.adoc | 452 ++++++++++++++++++------------------ doc/ja/weechat_user.ja.adoc | 436 +++++++++++++++++----------------- doc/pl/weechat_user.pl.adoc | 432 +++++++++++++++++----------------- doc/sr/weechat_user.sr.adoc | 366 ++++++++++++++--------------- 7 files changed, 1504 insertions(+), 1504 deletions(-) diff --git a/doc/de/weechat_user.de.adoc b/doc/de/weechat_user.de.adoc index 7f0a8af57..09f783445 100644 --- a/doc/de/weechat_user.de.adoc +++ b/doc/de/weechat_user.de.adoc @@ -270,7 +270,7 @@ Liste von häufig verwendeten Optionen: kompiliert <> nutzt Python 2 anstelle von Python 3. | ENABLE_RELAY | `ON`, `OFF` | ON | - kompiliert <>. + kompiliert <>. | ENABLE_RUBY | `ON`, `OFF` | ON | kompiliert <>. @@ -3719,6 +3719,228 @@ Optionen: include::includes/autogen_user_options.de.adoc[tag=irc_options] +[[relay]] +== Relay + +Die Relay-Erweiterung wird genutzt um Daten, mittels unterschiedlicher Protokolle, +über ein Netzwerk zu übermitteln: + +* _irc_: IRC Proxy: um mittels einem oder mehreren IRC-Clients eine Verbindung zu + IRC Servern zu unterhalten. +* _weechat_: Protokoll welches es erlaubt die Daten mit einer externen Oberfläche + zu teilen, zum Beispiel: +** Glowing Bear (HTML5): https://www.glowing-bear.org/ +** QWeeChat (Qt): https://weechat.org/download +** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android +** weechat.el (Emacs): https://github.com/the-kenny/weechat.el +** WeeCloud (JavaScript): https://github.com/eirikb/weecloud + +[[relay_password]] +=== Passwort + +Es wird dringend empfohlen, mit diesen Befehlen ein Passwort für das Relay festzulegen: + +---- +/secure set relay meinPasswort +/set relay.network.password "${sec.data.relay}" +---- + +Dieses Passwort wird sowohl für das _irc_ als auch für das _weechat_ Protokoll +verwendet. + +[[relay_totp]] +=== TOTP + +TOTP (Time-based One-Time Passwort) ist eine Zwei-Faktor-Authentifizierung +für das _weechat_ Protokoll, als Ergänzung zum eigentlichen Passwort. + +Diese Funktion is optional und erhöht den Sicherheitsgrad. + +Ein Einmal-Passwort kann mit folgenden Anwendungen erstellt werden, zum Beispiel: + +* FreeOTP: + https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], + https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] + (https://freeotp.github.io/[website]) +* Google Authenticator: + https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], + https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] + +Die geheime TOTP Zeichenkette muss in WeeChat und der Anwendung gesetzt werden, welches +für die Erstellung des Einmal-Passwort zuständig ist. + +Die Zeichenkette muss base32 enkodiert sein, ausschließlich Buchstaben und Zahlen zwischen 2 und 7 +sind erlaubt, zum Beispiel: + +---- +/secure set relay_totp secretpasswordbase32 +/set relay.network.totp_secret "${sec.data.relay_totp}" +---- + +[[relay_ssl]] +=== SSL + +Man kann SSL mittels eines selbst erstellten Zertifikates und eines privaten +Schlüssels nutzen. Um SSL für die Verbindung zu aktivieren stellt man dem +Protokollnamen ein "ssl" voran. + +Der Standardpfad zum Zertifikat/Schlüssel wird durch die Option definiert +<>. + +Ein Zertifikat und einen privaten Schlüssel kann man mit folgenden Befehlen +erstellen: + +---- +$ mkdir -p ~/.config/weechat/ssl +$ cd ~/.config/weechat/ssl +$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +---- + +[NOTE] +Sie müssen `~/.config/weechat` durch den Pfad zu Ihrem WeeChat-Konfigurationsverzeichnis ersetzen, +das auch beispielsweise `~/.weechat` sein kann. + +Sollte WeeChat schon gestartet worden sein, kann man das Zertifikat und der private +Schlüssel mittels folgendem Befehl nachträglich geladen werden: + +---- +/relay sslcertkey +---- + +[[relay_irc_proxy]] +=== IRC Proxy + +Die Relay Erweiterung kann wie ein IRC Proxy genutzt werden. Dabei simuliert +die Erweiterung einen IRC Server und man kann sich mit jedem IRC Client zu WeeChat +verbinden. + +Es kann für jeden IRC Server ein Port definiert werden, oder aber man nutzt ein Port +für alle Server. + +Wird ein Port für alle Server genutzt, dann muss der Client den internen Namen +des zu nutzenden Servers mit dem IRC Befehl "PASS" anfordern (siehe folgendes Beispiel): + +---- +PASS server:meinPasswort +---- + +Beispiel: IRC Proxy mit SSL für einen beliebigen Server (Client wählt aus): + +---- +/relay add ssl.irc 8000 +---- + +Beispiel: IRC Proxy ohne SSL und nur für "libera": + +---- +/relay add irc.libera 8000 +---- + +Nun kann man eine Verbindung zum Port 8000 mit jedem beliebigen IRC Client +herstellen, indem man das Server Passwort "meinPasswort" nutzt (oder +"libera:meinPasswort" sofern kein Server angegeben wurde). + +Wenn Sie beispielsweise WeeChat als IRC-Client über das Relay mit einem Server namens +"Relay" und dem Relay-Passwort "secret" verwenden, können Sie das Passwort mit den +folgenden Befehlen einrichten: + +---- +/secure set relay_libera libera:secret +/set irc.server.relay.password "${sec.data.relay_libera}" +---- + +[[relay_weechat_protocol]] +=== WeeChat Protokoll + +Die Relay-Erweiterung kann Daten, mittels dem WeeChat Protokoll, an eine +externe Oberfläche senden. + +Man kann sich mittels einer externen Oberfläche verbinden, für eine Liste +siehe <>. + +[IMPORTANT] +Eine WeeChat Instanz kann sich NICHT mit einer anderen WeeChat Instanz über +dieses Protokoll verbinden. + +Zum Beispiel: + +---- +/relay add weechat 9000 +---- + +Nun kann man über den Port 9000 mittels einer Oberfläche und dem Passwort +"meinPasswort" eine Verbindung zu WeeChat herstellen. + +[[relay_websocket]] +=== WebSocket + +Das WebSocket Protokoll (https://tools.ietf.org/html/rfc6455[RFC 6455]) wird nun +in der Relay Erweiterung unterstützt. + +Der WebSocket Handshake wird automatisch erkannt und der Socket ist sofort +funktionsfähig, sofern die benötigten Header gefunden werden und die Herkunft +bestätigt wurde (siehe Option <>). + +Ein WebSocket kann in HTML5, mit einer JavaScript Zeile, geöffnet werden: + +[source,javascript] +---- +websocket = new WebSocket("ws://server.com:9000/weechat"); +---- + +Der Port (im Beispiel: 9000) ist der Port der in der Relay Erweiterung angegeben wurde. +Die URI muss immer auf "/weechat" enden (_irc_ und _weechat_ Protokoll). + +[[relay_unix_socket]] +=== UNIX Domain Sockets + +Wenn man die Protokolloption "unix" mit dem Befehl `/relay add` nutzt, kann +man jedes Protokoll zum Lauschen an einem UNIX Domain Socket nutzen, indem +man einen Pfad angibt. Zum Beispiel: + +---- +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket +---- + +Das erlaubt es Clients sich mittels dem weechat Protokoll mit +_/run/user/1000/weechat/relay_socket_ zu verbinden. Dies ist besonders zu +empfehlen um SSH forwarding für relay Clients zu nutzen, falls +andere Ports nicht geöffnet werden können. + +OpenSSH nutzen: + +---- +$ ssh -L 9000:.weechat/relay_socket user@hostname +---- + +Dies leitet lokale relay Client Verbindungen von Port 9000 um, zu +einer WeeChat Instanz welche auf "hostname" hört. + +[[relay_commands]] +=== Befehle + +include::includes/autogen_user_commands.de.adoc[tag=relay_commands] + +[[relay_options]] +=== Optionen + +Sektionen in Datei _relay.conf_: + +[width="100%",cols="3m,6m,16",options="header"] +|=== +| Sektion | Steuerbefehl | Beschreibung +| look | /set relay.look.* | Erscheinungsbild. +| color | /set relay.color.* | Farben. +| network | /set relay.network.* | Netzwerkoptionen. +| irc | /set relay.irc.* | für das IRC Protokoll spezifische Optionen (IRC Proxy). +| port | <> + + /set relay.port.* | Ports zur Nutzung der Relay-Erweiterung (IRC und weechat Protokolle) (Optionen können in Sektion hinzugefügt/entfernt werden). +|=== + +Optionen: + +include::includes/autogen_user_options.de.adoc[tag=relay_options] + [[plugins]] == Erweiterungen @@ -3880,228 +4102,6 @@ Optionen: include::includes/autogen_user_options.de.adoc[tag=fifo_options] -[[relay_plugin]] -=== Relay - -Die Relay-Erweiterung wird genutzt um Daten, mittels unterschiedlicher Protokolle, -über ein Netzwerk zu übermitteln: - -* _irc_: IRC Proxy: um mittels einem oder mehreren IRC-Clients eine Verbindung zu - IRC Servern zu unterhalten. -* _weechat_: Protokoll welches es erlaubt die Daten mit einer externen Oberfläche - zu teilen, zum Beispiel: -** Glowing Bear (HTML5): https://www.glowing-bear.org/ -** QWeeChat (Qt): https://weechat.org/download -** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android -** weechat.el (Emacs): https://github.com/the-kenny/weechat.el -** WeeCloud (JavaScript): https://github.com/eirikb/weecloud - -[[relay_password]] -==== Passwort - -Es wird dringend empfohlen, mit diesen Befehlen ein Passwort für das Relay festzulegen: - ----- -/secure set relay meinPasswort -/set relay.network.password "${sec.data.relay}" ----- - -Dieses Passwort wird sowohl für das _irc_ als auch für das _weechat_ Protokoll -verwendet. - -[[relay_totp]] -==== TOTP - -TOTP (Time-based One-Time Passwort) ist eine Zwei-Faktor-Authentifizierung -für das _weechat_ Protokoll, als Ergänzung zum eigentlichen Passwort. - -Diese Funktion is optional und erhöht den Sicherheitsgrad. - -Ein Einmal-Passwort kann mit folgenden Anwendungen erstellt werden, zum Beispiel: - -* FreeOTP: - https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], - https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] - (https://freeotp.github.io/[website]) -* Google Authenticator: - https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], - https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] - -Die geheime TOTP Zeichenkette muss in WeeChat und der Anwendung gesetzt werden, welches -für die Erstellung des Einmal-Passwort zuständig ist. - -Die Zeichenkette muss base32 enkodiert sein, ausschließlich Buchstaben und Zahlen zwischen 2 und 7 -sind erlaubt, zum Beispiel: - ----- -/secure set relay_totp secretpasswordbase32 -/set relay.network.totp_secret "${sec.data.relay_totp}" ----- - -[[relay_ssl]] -==== SSL - -Man kann SSL mittels eines selbst erstellten Zertifikates und eines privaten -Schlüssels nutzen. Um SSL für die Verbindung zu aktivieren stellt man dem -Protokollnamen ein "ssl" voran. - -Der Standardpfad zum Zertifikat/Schlüssel wird durch die Option definiert -<>. - -Ein Zertifikat und einen privaten Schlüssel kann man mit folgenden Befehlen -erstellen: - ----- -$ mkdir -p ~/.config/weechat/ssl -$ cd ~/.config/weechat/ssl -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ----- - -[NOTE] -Sie müssen `~/.config/weechat` durch den Pfad zu Ihrem WeeChat-Konfigurationsverzeichnis ersetzen, -das auch beispielsweise `~/.weechat` sein kann. - -Sollte WeeChat schon gestartet worden sein, kann man das Zertifikat und der private -Schlüssel mittels folgendem Befehl nachträglich geladen werden: - ----- -/relay sslcertkey ----- - -[[relay_irc_proxy]] -==== IRC Proxy - -Die Relay Erweiterung kann wie ein IRC Proxy genutzt werden. Dabei simuliert -die Erweiterung einen IRC Server und man kann sich mit jedem IRC Client zu WeeChat -verbinden. - -Es kann für jeden IRC Server ein Port definiert werden, oder aber man nutzt ein Port -für alle Server. - -Wird ein Port für alle Server genutzt, dann muss der Client den internen Namen -des zu nutzenden Servers mit dem IRC Befehl "PASS" anfordern (siehe folgendes Beispiel): - ----- -PASS server:meinPasswort ----- - -Beispiel: IRC Proxy mit SSL für einen beliebigen Server (Client wählt aus): - ----- -/relay add ssl.irc 8000 ----- - -Beispiel: IRC Proxy ohne SSL und nur für "libera": - ----- -/relay add irc.libera 8000 ----- - -Nun kann man eine Verbindung zum Port 8000 mit jedem beliebigen IRC Client -herstellen, indem man das Server Passwort "meinPasswort" nutzt (oder -"libera:meinPasswort" sofern kein Server angegeben wurde). - -Wenn Sie beispielsweise WeeChat als IRC-Client über das Relay mit einem Server namens -"Relay" und dem Relay-Passwort "secret" verwenden, können Sie das Passwort mit den -folgenden Befehlen einrichten: - ----- -/secure set relay_libera libera:secret -/set irc.server.relay.password "${sec.data.relay_libera}" ----- - -[[relay_weechat_protocol]] -==== WeeChat Protokoll - -Die Relay-Erweiterung kann Daten, mittels dem WeeChat Protokoll, an eine -externe Oberfläche senden. - -Man kann sich mittels einer externen Oberfläche verbinden, für eine Liste -siehe <>. - -[IMPORTANT] -Eine WeeChat Instanz kann sich NICHT mit einer anderen WeeChat Instanz über -dieses Protokoll verbinden. - -Zum Beispiel: - ----- -/relay add weechat 9000 ----- - -Nun kann man über den Port 9000 mittels einer Oberfläche und dem Passwort -"meinPasswort" eine Verbindung zu WeeChat herstellen. - -[[relay_websocket]] -==== WebSocket - -Das WebSocket Protokoll (https://tools.ietf.org/html/rfc6455[RFC 6455]) wird nun -in der Relay Erweiterung unterstützt. - -Der WebSocket Handshake wird automatisch erkannt und der Socket ist sofort -funktionsfähig, sofern die benötigten Header gefunden werden und die Herkunft -bestätigt wurde (siehe Option <>). - -Ein WebSocket kann in HTML5, mit einer JavaScript Zeile, geöffnet werden: - -[source,javascript] ----- -websocket = new WebSocket("ws://server.com:9000/weechat"); ----- - -Der Port (im Beispiel: 9000) ist der Port der in der Relay Erweiterung angegeben wurde. -Die URI muss immer auf "/weechat" enden (_irc_ und _weechat_ Protokoll). - -[[relay_unix_socket]] -==== UNIX Domain Sockets - -Wenn man die Protokolloption "unix" mit dem Befehl `/relay add` nutzt, kann -man jedes Protokoll zum Lauschen an einem UNIX Domain Socket nutzen, indem -man einen Pfad angibt. Zum Beispiel: - ----- -/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ----- - -Das erlaubt es Clients sich mittels dem weechat Protokoll mit -_/run/user/1000/weechat/relay_socket_ zu verbinden. Dies ist besonders zu -empfehlen um SSH forwarding für relay Clients zu nutzen, falls -andere Ports nicht geöffnet werden können. - -OpenSSH nutzen: - ----- -$ ssh -L 9000:.weechat/relay_socket user@hostname ----- - -Dies leitet lokale relay Client Verbindungen von Port 9000 um, zu -einer WeeChat Instanz welche auf "hostname" hört. - -[[relay_commands]] -==== Befehle - -include::includes/autogen_user_commands.de.adoc[tag=relay_commands] - -[[relay_options]] -==== Optionen - -Sektionen in Datei _relay.conf_: - -[width="100%",cols="3m,6m,16",options="header"] -|=== -| Sektion | Steuerbefehl | Beschreibung -| look | /set relay.look.* | Erscheinungsbild. -| color | /set relay.color.* | Farben. -| network | /set relay.network.* | Netzwerkoptionen. -| irc | /set relay.irc.* | für das IRC Protokoll spezifische Optionen (IRC Proxy). -| port | <> + - /set relay.port.* | Ports zur Nutzung der Relay-Erweiterung (IRC und weechat Protokolle) (Optionen können in Sektion hinzugefügt/entfernt werden). -|=== - -Optionen: - -include::includes/autogen_user_options.de.adoc[tag=relay_options] - [[scripts_plugins]] === Skripten diff --git a/doc/en/weechat_user.en.adoc b/doc/en/weechat_user.en.adoc index 690546228..a989a4487 100644 --- a/doc/en/weechat_user.en.adoc +++ b/doc/en/weechat_user.en.adoc @@ -262,7 +262,7 @@ List of commonly used options: Compile <> using Python 2 instead of Python 3. | ENABLE_RELAY | `ON`, `OFF` | ON | - Compile <>. + Compile <>. | ENABLE_RUBY | `ON`, `OFF` | ON | Compile <>. @@ -3613,6 +3613,217 @@ Options: include::includes/autogen_user_options.en.adoc[tag=irc_options] +[[relay]] +== Relay + +The Relay plugin is used to relay data via network, using different protocols: + +* _irc_: IRC proxy: used to share connections to IRC servers with one or many + other IRC clients +* _weechat_: protocol used by remote interfaces to display and interact with + WeeChat, for example: +** Glowing Bear (HTML5): https://www.glowing-bear.org/ +** QWeeChat (Qt): https://weechat.org/download +** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android +** weechat.el (Emacs): https://github.com/the-kenny/weechat.el +** WeeCloud (JavaScript): https://github.com/eirikb/weecloud + +[[relay_password]] +=== Password + +It is highly recommended to set a password for relay, with these commands: + +---- +/secure set relay mypassword +/set relay.network.password "${sec.data.relay}" +---- + +This password is used for _irc_ and _weechat_ protocols. + +[[relay_totp]] +=== TOTP + +TOTP (Time-based One-Time Password) can be used as secondary authentication +factor for _weechat_ protocol, in addition to the password. + +This is optional and increases the security level. + +One-time passwords can be generated with applications, for example: + +* FreeOTP: + https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], + https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] + (https://freeotp.github.io/[website]) +* Google Authenticator: + https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], + https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] + +The TOTP secret must be set in WeeChat and the application used to generate +one-time passwords. + +It must be a string encoded in base32, with only letters and digits from 2 to 7, +for example: + +---- +/secure set relay_totp secretpasswordbase32 +/set relay.network.totp_secret "${sec.data.relay_totp}" +---- + +[[relay_ssl]] +=== SSL + +You can use SSL by creating a certificate and private key, and by using prefix +"ssl." in the name of protocol. + +The default path to certificate/key is defined by option +<>. + +You can create a certificate and private key with following commands: + +---- +$ mkdir -p ~/.config/weechat/ssl +$ cd ~/.config/weechat/ssl +$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +---- + +[NOTE] +You must replace `~/.config/weechat` by the path to your WeeChat config directory +which can also be for example `~/.weechat`. + +If WeeChat is already running, you can reload the certificate and private key +with command: + +---- +/relay sslcertkey +---- + +[[relay_irc_proxy]] +=== IRC proxy + +The Relay plugin can act as an IRC proxy: it will simulate an IRC server, and +you can connect to WeeChat with any other IRC client (including WeeChat itself). + +You can define one port by IRC server, or one generic port for all servers. + +When using one port for all servers, the client must send the internal name of +server in the IRC "PASS" command, with this format (see example below): + +---- +PASS server:password +---- + +Example: IRC proxy with SSL for any server (client will choose): + +---- +/relay add ssl.irc 8000 +---- + +Example: IRC proxy without SSL only for server "libera": + +---- +/relay add irc.libera 8000 +---- + +Now you can connect on port 8000 with any IRC client using server password +"mypassword" (or "libera:mypassword" if no server was specified in the relay). + +For example if you use WeeChat as IRC client of the relay, with a server called +"relay" and the relay password "secret", you can setup the password with these +commands: + +---- +/secure set relay_libera libera:secret +/set irc.server.relay.password "${sec.data.relay_libera}" +---- + +[[relay_weechat_protocol]] +=== WeeChat protocol + +The Relay plugin can send data to remote interface using WeeChat protocol. + +You can connect with a remote interface, see the list in <>. + +[IMPORTANT] +WeeChat itself can NOT connect to another WeeChat with this protocol. + +For example: + +---- +/relay add weechat 9000 +---- + +Now you can connect on port 9000 with a remote interface using password +"mypassword". + +[[relay_websocket]] +=== WebSocket + +WebSocket protocol (https://tools.ietf.org/html/rfc6455[RFC 6455]) is supported +in Relay plugin for all protocols. + +The WebSocket handshake is automatically detected and socket becomes ready for +WebSocket if required headers are found in handshake and if origin is allowed +(see option +<>). + +A WebSocket can be opened in a HTML5 with a single line of JavaScript: + +[source,javascript] +---- +websocket = new WebSocket("ws://server.com:9000/weechat"); +---- + +The port (9000 in example) is the port defined in Relay plugin. +The URI must always end with "/weechat" (for _irc_ and _weechat_ protocols). + +[[relay_unix_socket]] +=== UNIX domain sockets + +Using the protocol option "unix" with the `/relay add` command, you can listen +using any protocol on a UNIX domain socket at a given path. For example: + +---- +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket +---- + +This allows clients to connect using the weechat protocol to +_/run/user/1000/weechat/relay_socket_. This is particularly useful to allow +SSH forwarding for relay clients, when other ports cannot be opened. + +Using OpenSSH: + +---- +$ ssh -L 9000:.weechat/relay_socket user@hostname +---- + +This redirects local relay clients connecting on port 9000 to the WeeChat +instance running on "hostname". + +[[relay_commands]] +=== Commands + +include::includes/autogen_user_commands.en.adoc[tag=relay_commands] + +[[relay_options]] +=== Options + +Sections in file _relay.conf_: + +[width="100%",cols="3m,6m,16",options="header"] +|=== +| Section | Control command | Description +| look | /set relay.look.* | Look and feel. +| color | /set relay.color.* | Colors. +| network | /set relay.network.* | Network options. +| irc | /set relay.irc.* | Options specific to irc protocol (irc proxy). +| port | <> + + /set relay.port.* | Ports used for relay (irc and weechat protocols) (options can be added/removed in section). +|=== + +Options: + +include::includes/autogen_user_options.en.adoc[tag=relay_options] + [[plugins]] == Plugins @@ -3771,217 +3982,6 @@ Options: include::includes/autogen_user_options.en.adoc[tag=fifo_options] -[[relay_plugin]] -=== Relay - -The Relay plugin is used to relay data via network, using different protocols: - -* _irc_: IRC proxy: used to share connections to IRC servers with one or many - other IRC clients -* _weechat_: protocol used by remote interfaces to display and interact with - WeeChat, for example: -** Glowing Bear (HTML5): https://www.glowing-bear.org/ -** QWeeChat (Qt): https://weechat.org/download -** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android -** weechat.el (Emacs): https://github.com/the-kenny/weechat.el -** WeeCloud (JavaScript): https://github.com/eirikb/weecloud - -[[relay_password]] -==== Password - -It is highly recommended to set a password for relay, with these commands: - ----- -/secure set relay mypassword -/set relay.network.password "${sec.data.relay}" ----- - -This password is used for _irc_ and _weechat_ protocols. - -[[relay_totp]] -==== TOTP - -TOTP (Time-based One-Time Password) can be used as secondary authentication -factor for _weechat_ protocol, in addition to the password. - -This is optional and increases the security level. - -One-time passwords can be generated with applications, for example: - -* FreeOTP: - https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], - https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] - (https://freeotp.github.io/[website]) -* Google Authenticator: - https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], - https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] - -The TOTP secret must be set in WeeChat and the application used to generate -one-time passwords. - -It must be a string encoded in base32, with only letters and digits from 2 to 7, -for example: - ----- -/secure set relay_totp secretpasswordbase32 -/set relay.network.totp_secret "${sec.data.relay_totp}" ----- - -[[relay_ssl]] -==== SSL - -You can use SSL by creating a certificate and private key, and by using prefix -"ssl." in the name of protocol. - -The default path to certificate/key is defined by option -<>. - -You can create a certificate and private key with following commands: - ----- -$ mkdir -p ~/.config/weechat/ssl -$ cd ~/.config/weechat/ssl -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ----- - -[NOTE] -You must replace `~/.config/weechat` by the path to your WeeChat config directory -which can also be for example `~/.weechat`. - -If WeeChat is already running, you can reload the certificate and private key -with command: - ----- -/relay sslcertkey ----- - -[[relay_irc_proxy]] -==== IRC proxy - -The Relay plugin can act as an IRC proxy: it will simulate an IRC server, and -you can connect to WeeChat with any other IRC client (including WeeChat itself). - -You can define one port by IRC server, or one generic port for all servers. - -When using one port for all servers, the client must send the internal name of -server in the IRC "PASS" command, with this format (see example below): - ----- -PASS server:password ----- - -Example: IRC proxy with SSL for any server (client will choose): - ----- -/relay add ssl.irc 8000 ----- - -Example: IRC proxy without SSL only for server "libera": - ----- -/relay add irc.libera 8000 ----- - -Now you can connect on port 8000 with any IRC client using server password -"mypassword" (or "libera:mypassword" if no server was specified in the relay). - -For example if you use WeeChat as IRC client of the relay, with a server called -"relay" and the relay password "secret", you can setup the password with these -commands: - ----- -/secure set relay_libera libera:secret -/set irc.server.relay.password "${sec.data.relay_libera}" ----- - -[[relay_weechat_protocol]] -==== WeeChat protocol - -The Relay plugin can send data to remote interface using WeeChat protocol. - -You can connect with a remote interface, see the list in <>. - -[IMPORTANT] -WeeChat itself can NOT connect to another WeeChat with this protocol. - -For example: - ----- -/relay add weechat 9000 ----- - -Now you can connect on port 9000 with a remote interface using password -"mypassword". - -[[relay_websocket]] -==== WebSocket - -WebSocket protocol (https://tools.ietf.org/html/rfc6455[RFC 6455]) is supported -in Relay plugin for all protocols. - -The WebSocket handshake is automatically detected and socket becomes ready for -WebSocket if required headers are found in handshake and if origin is allowed -(see option -<>). - -A WebSocket can be opened in a HTML5 with a single line of JavaScript: - -[source,javascript] ----- -websocket = new WebSocket("ws://server.com:9000/weechat"); ----- - -The port (9000 in example) is the port defined in Relay plugin. -The URI must always end with "/weechat" (for _irc_ and _weechat_ protocols). - -[[relay_unix_socket]] -==== UNIX domain sockets - -Using the protocol option "unix" with the `/relay add` command, you can listen -using any protocol on a UNIX domain socket at a given path. For example: - ----- -/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ----- - -This allows clients to connect using the weechat protocol to -_/run/user/1000/weechat/relay_socket_. This is particularly useful to allow -SSH forwarding for relay clients, when other ports cannot be opened. - -Using OpenSSH: - ----- -$ ssh -L 9000:.weechat/relay_socket user@hostname ----- - -This redirects local relay clients connecting on port 9000 to the WeeChat -instance running on "hostname". - -[[relay_commands]] -==== Commands - -include::includes/autogen_user_commands.en.adoc[tag=relay_commands] - -[[relay_options]] -==== Options - -Sections in file _relay.conf_: - -[width="100%",cols="3m,6m,16",options="header"] -|=== -| Section | Control command | Description -| look | /set relay.look.* | Look and feel. -| color | /set relay.color.* | Colors. -| network | /set relay.network.* | Network options. -| irc | /set relay.irc.* | Options specific to irc protocol (irc proxy). -| port | <> + - /set relay.port.* | Ports used for relay (irc and weechat protocols) (options can be added/removed in section). -|=== - -Options: - -include::includes/autogen_user_options.en.adoc[tag=relay_options] - [[scripts_plugins]] === Scripts diff --git a/doc/fr/weechat_user.fr.adoc b/doc/fr/weechat_user.fr.adoc index 9636aed8f..96f91525d 100644 --- a/doc/fr/weechat_user.fr.adoc +++ b/doc/fr/weechat_user.fr.adoc @@ -267,7 +267,7 @@ Liste des options couramment utilisées : Python 3. | ENABLE_RELAY | `ON`, `OFF` | ON | - Compiler <>. + Compiler <>. | ENABLE_RUBY | `ON`, `OFF` | ON | Compiler <>. @@ -3729,6 +3729,231 @@ Options : include::includes/autogen_user_options.fr.adoc[tag=irc_options] +[[relay]] +== Relay + +L'extension Relay est utilisée pour relayer des données via le réseau, en +utilisant divers protocoles : + +* _irc_ : proxy IRC : utilisé pour partager la connexions aux serveurs IRC avec + un ou plusieurs autres clients IRC +* _weechat_ : protocole utilisé par les interfaces distantes, par exemple : +** Glowing Bear (HTML5) : https://www.glowing-bear.org/ +** QWeeChat (Qt) : https://weechat.org/download +** WeeChat-Android (Android) : https://github.com/ubergeek42/weechat-android +** weechat.el (Emacs) : https://github.com/the-kenny/weechat.el +** WeeCloud (JavaScript) : https://github.com/eirikb/weecloud + +[[relay_password]] +=== Mot de passe + +Il est fortement recommandé de définir un mot de passe pour le relai, avec ces +commandes : + +---- +/secure set relay motdepasse +/set relay.network.password "${sec.data.relay}" +---- + +Ce mot de passe sera utilisé pour les protocoles _irc_ et _weechat_. + +[[relay_totp]] +=== TOTP + +TOTP (« Time-based One-Time Password » : mot de passe à usage unique basé sur le +temps) peut être utilisé comme second facteur d'authentification pour le protocole +_weechat_, en plus du mot de passe. + +Il est optionnel et augmente le niveau de sécurité. + +Les mots de passe à usage unique peuvent être générés avec des applications, +par exemple : + +* FreeOTP : + https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], + https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] + (https://freeotp.github.io/[site web]) +* Google Authenticator : + https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], + https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] + +Le « secret » TOTP doit être défini dans WeeChat et dans l'application utilisée +pour générer les mots de passe à usage unique. + +Il doit être une chaîne encodée en base32, avec seulement des lettres et des +chiffres de 2 à 7, par exemple : + +---- +/secure set relay_totp secretpasswordbase32 +/set relay.network.totp_secret "${sec.data.relay_totp}" +---- + +[[relay_ssl]] +=== SSL + +Vous pouvez utiliser SSL en créant un certificat et clé privée et en utilisant +le préfixe "ssl." dans le nom du protocole. + +Le chemin par défaut vers le certificat/clé est défini par l'option +<>. + +Vous pouvez créer le certificat et la clé privée avec les commandes suivantes : + +---- +$ mkdir -p ~/.config/weechat/ssl +$ cd ~/.config/weechat/ssl +$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +---- + +[NOTE] +Vous devez remplacer `~/.config/weechat` par le chemin vers votre répertoire de +config WeeChat qui peut aussi être par exemple `~/.weechat`. + +Si WeeChat tourne déjà, vous pouvez recharger le certificat et clé privée avec la +commande : + +---- +/relay sslcertkey +---- + +[[relay_irc_proxy]] +=== IRC proxy + +L'extension Relay peut agir comme un proxy IRC : elle simulera un serveur IRC, +et vous pourrez vous connecter sur WeeChat avec n'importe quel autre client IRC +(y compris WeeChat lui-même). + +Vous pouvez définir un port par serveur IRC, ou bien un port générique pour tous +les serveurs. + +Lors de l'utilisation d'un port pour tous les serveurs, le client doit envoyer +le nom interne du serveur dans la commande IRC "PASS", avec le format +(voir l'exemple ci-dessous) : + +---- +PASS serveur:motdepasse +---- + +Exemple : proxy IRC avec SSL pour tout serveur (le client choisira) : + +---- +/relay add ssl.irc 8000 +---- + +Exemple : proxy IRC sans SSL seulement pour le serveur "libera" : + +---- +/relay add irc.libera 8000 +---- + +Maintenant vous pouvez vous connecter sur le port 8000 avec n'importe quel +client IRC en utilisant le mot de passe "motdepasse" (ou "libera:motdepasse" +si aucun serveur n'a été spécifié dans le relai). + +Par exemple si vous utilisez WeeChat comme client IRC du relai, avec un serveur +"relay" et un mot de passe relay "secret", vous pouvez configurer le mot de passe +avec ces commandes : + +---- +/secure set relay_libera libera:secret +/set irc.server.relay.password "${sec.data.relay_libera}" +---- + +[[relay_weechat_protocol]] +=== Protocole WeeChat + +L'extension Relay peut envoyer les données à une interface distante en +utilisant le protocole WeeChat. + +Vous pouvez vous connecter avec une interface distante, voir la liste dans +<>. + +[IMPORTANT] +WeeChat lui-même ne peut PAS se connecter sur un autre WeeChat avec ce +protocole. + +Par exemple : + +---- +/relay add weechat 9000 +---- + +Maintenant vous pouvez vous connecter sur le port 9000 avec une interface +distante en utilisant le mot de passe "motdepasse". + +[[relay_websocket]] +=== WebSocket + +Le protocole WebSocket (https://tools.ietf.org/html/rfc6455[RFC 6455]) est +supporté dans l'extension Relay pour tous les protocoles. + +La poignée de main ("handshake") WebSocket est automatiquement détectée et le +socket devient prêt pour WebSocket si les en-tête requis sont trouvés dans la +poignée de main et si l'origine est autorisée (voir l'option +<>). + +Un WebSocket peut être ouvert dans une page HTML5 avec une seule ligne de +JavaScript : + +[source,javascript] +---- +websocket = new WebSocket("ws://server.com:9000/weechat"); +---- + +Le port (9000 dans l'exemple) est le port défini dans l'extension Relay. +L'URI doit toujours se terminer par "/weechat" (pour les protocoles _irc_ et +_weechat_). + +[[relay_unix_socket]] +=== UNIX domain sockets + +En utilisant l'option de protocole "unix" avec la commande `/relay add`, +vous pouvez écouter avec n'importe quel protocole sur un socket UNIX et un +chemin donné. Par exemple : + +---- +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket +---- + +Cela autorise les clients à se connecter en utilisant le protocole weechat à +_/run/user/1000/weechat/relay_socket_. Cela est utile pour autoriser le +"SSH forwarding" pour les clients relay, quand d'autres ports ne peuvent pas +être ouverts. + +Avec OpenSSH : + +---- +$ ssh -L 9000:.weechat/relay_socket user@hostname +---- + +Cela redirige les clients relay locaux qui se connectent au port 9000 vers +l'instance de WeeChat qui tourne sur "hostname". + +[[relay_commands]] +=== Commandes + +include::includes/autogen_user_commands.fr.adoc[tag=relay_commands] + +[[relay_options]] +=== Options + +Sections dans le fichier _relay.conf_ : + +[width="100%",cols="3m,6m,16",options="header"] +|=== +| Section | Commande de contrôle | Description +| look | /set relay.look.* | Aspect/présentation. +| color | /set relay.color.* | Couleurs. +| network | /set relay.network.* | Options réseau. +| irc | /set relay.irc.* | Options spécifiques au protocole irc (proxy irc). +| port | <> + + /set relay.port.* | Ports utilisés pour le relai (protocoles irc et weechat) (les options peuvent être ajoutées/supprimées dans la section). +|=== + +Options : + +include::includes/autogen_user_options.fr.adoc[tag=relay_options] + [[plugins]] == Extensions @@ -3891,231 +4116,6 @@ Options : include::includes/autogen_user_options.fr.adoc[tag=fifo_options] -[[relay_plugin]] -=== Relay - -L'extension Relay est utilisée pour relayer des données via le réseau, en -utilisant divers protocoles : - -* _irc_ : proxy IRC : utilisé pour partager la connexions aux serveurs IRC avec - un ou plusieurs autres clients IRC -* _weechat_ : protocole utilisé par les interfaces distantes, par exemple : -** Glowing Bear (HTML5) : https://www.glowing-bear.org/ -** QWeeChat (Qt) : https://weechat.org/download -** WeeChat-Android (Android) : https://github.com/ubergeek42/weechat-android -** weechat.el (Emacs) : https://github.com/the-kenny/weechat.el -** WeeCloud (JavaScript) : https://github.com/eirikb/weecloud - -[[relay_password]] -==== Mot de passe - -Il est fortement recommandé de définir un mot de passe pour le relai, avec ces -commandes : - ----- -/secure set relay motdepasse -/set relay.network.password "${sec.data.relay}" ----- - -Ce mot de passe sera utilisé pour les protocoles _irc_ et _weechat_. - -[[relay_totp]] -==== TOTP - -TOTP (« Time-based One-Time Password » : mot de passe à usage unique basé sur le -temps) peut être utilisé comme second facteur d'authentification pour le protocole -_weechat_, en plus du mot de passe. - -Il est optionnel et augmente le niveau de sécurité. - -Les mots de passe à usage unique peuvent être générés avec des applications, -par exemple : - -* FreeOTP : - https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], - https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] - (https://freeotp.github.io/[site web]) -* Google Authenticator : - https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], - https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] - -Le « secret » TOTP doit être défini dans WeeChat et dans l'application utilisée -pour générer les mots de passe à usage unique. - -Il doit être une chaîne encodée en base32, avec seulement des lettres et des -chiffres de 2 à 7, par exemple : - ----- -/secure set relay_totp secretpasswordbase32 -/set relay.network.totp_secret "${sec.data.relay_totp}" ----- - -[[relay_ssl]] -==== SSL - -Vous pouvez utiliser SSL en créant un certificat et clé privée et en utilisant -le préfixe "ssl." dans le nom du protocole. - -Le chemin par défaut vers le certificat/clé est défini par l'option -<>. - -Vous pouvez créer le certificat et la clé privée avec les commandes suivantes : - ----- -$ mkdir -p ~/.config/weechat/ssl -$ cd ~/.config/weechat/ssl -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ----- - -[NOTE] -Vous devez remplacer `~/.config/weechat` par le chemin vers votre répertoire de -config WeeChat qui peut aussi être par exemple `~/.weechat`. - -Si WeeChat tourne déjà, vous pouvez recharger le certificat et clé privée avec la -commande : - ----- -/relay sslcertkey ----- - -[[relay_irc_proxy]] -==== IRC proxy - -L'extension Relay peut agir comme un proxy IRC : elle simulera un serveur IRC, -et vous pourrez vous connecter sur WeeChat avec n'importe quel autre client IRC -(y compris WeeChat lui-même). - -Vous pouvez définir un port par serveur IRC, ou bien un port générique pour tous -les serveurs. - -Lors de l'utilisation d'un port pour tous les serveurs, le client doit envoyer -le nom interne du serveur dans la commande IRC "PASS", avec le format -(voir l'exemple ci-dessous) : - ----- -PASS serveur:motdepasse ----- - -Exemple : proxy IRC avec SSL pour tout serveur (le client choisira) : - ----- -/relay add ssl.irc 8000 ----- - -Exemple : proxy IRC sans SSL seulement pour le serveur "libera" : - ----- -/relay add irc.libera 8000 ----- - -Maintenant vous pouvez vous connecter sur le port 8000 avec n'importe quel -client IRC en utilisant le mot de passe "motdepasse" (ou "libera:motdepasse" -si aucun serveur n'a été spécifié dans le relai). - -Par exemple si vous utilisez WeeChat comme client IRC du relai, avec un serveur -"relay" et un mot de passe relay "secret", vous pouvez configurer le mot de passe -avec ces commandes : - ----- -/secure set relay_libera libera:secret -/set irc.server.relay.password "${sec.data.relay_libera}" ----- - -[[relay_weechat_protocol]] -==== Protocole WeeChat - -L'extension Relay peut envoyer les données à une interface distante en -utilisant le protocole WeeChat. - -Vous pouvez vous connecter avec une interface distante, voir la liste dans -<>. - -[IMPORTANT] -WeeChat lui-même ne peut PAS se connecter sur un autre WeeChat avec ce -protocole. - -Par exemple : - ----- -/relay add weechat 9000 ----- - -Maintenant vous pouvez vous connecter sur le port 9000 avec une interface -distante en utilisant le mot de passe "motdepasse". - -[[relay_websocket]] -==== WebSocket - -Le protocole WebSocket (https://tools.ietf.org/html/rfc6455[RFC 6455]) est -supporté dans l'extension Relay pour tous les protocoles. - -La poignée de main ("handshake") WebSocket est automatiquement détectée et le -socket devient prêt pour WebSocket si les en-tête requis sont trouvés dans la -poignée de main et si l'origine est autorisée (voir l'option -<>). - -Un WebSocket peut être ouvert dans une page HTML5 avec une seule ligne de -JavaScript : - -[source,javascript] ----- -websocket = new WebSocket("ws://server.com:9000/weechat"); ----- - -Le port (9000 dans l'exemple) est le port défini dans l'extension Relay. -L'URI doit toujours se terminer par "/weechat" (pour les protocoles _irc_ et -_weechat_). - -[[relay_unix_socket]] -==== UNIX domain sockets - -En utilisant l'option de protocole "unix" avec la commande `/relay add`, -vous pouvez écouter avec n'importe quel protocole sur un socket UNIX et un -chemin donné. Par exemple : - ----- -/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ----- - -Cela autorise les clients à se connecter en utilisant le protocole weechat à -_/run/user/1000/weechat/relay_socket_. Cela est utile pour autoriser le -"SSH forwarding" pour les clients relay, quand d'autres ports ne peuvent pas -être ouverts. - -Avec OpenSSH : - ----- -$ ssh -L 9000:.weechat/relay_socket user@hostname ----- - -Cela redirige les clients relay locaux qui se connectent au port 9000 vers -l'instance de WeeChat qui tourne sur "hostname". - -[[relay_commands]] -==== Commandes - -include::includes/autogen_user_commands.fr.adoc[tag=relay_commands] - -[[relay_options]] -==== Options - -Sections dans le fichier _relay.conf_ : - -[width="100%",cols="3m,6m,16",options="header"] -|=== -| Section | Commande de contrôle | Description -| look | /set relay.look.* | Aspect/présentation. -| color | /set relay.color.* | Couleurs. -| network | /set relay.network.* | Options réseau. -| irc | /set relay.irc.* | Options spécifiques au protocole irc (proxy irc). -| port | <> + - /set relay.port.* | Ports utilisés pour le relai (protocoles irc et weechat) (les options peuvent être ajoutées/supprimées dans la section). -|=== - -Options : - -include::includes/autogen_user_options.fr.adoc[tag=relay_options] - [[scripts_plugins]] === Scripts diff --git a/doc/it/weechat_user.it.adoc b/doc/it/weechat_user.it.adoc index 5e2b20c13..82d0ad53c 100644 --- a/doc/it/weechat_user.it.adoc +++ b/doc/it/weechat_user.it.adoc @@ -301,7 +301,7 @@ List of commonly used options: Compile <> using Python 2 instead of Python 3. | ENABLE_RELAY | `ON`, `OFF` | ON | - Compile <>. + Compile <>. | ENABLE_RUBY | `ON`, `OFF` | ON | Compile <>. @@ -3900,6 +3900,231 @@ Options: include::includes/autogen_user_options.it.adoc[tag=irc_options] +[[relay]] +== Relay + +Il plugin Relay viene utilizzato per inoltrare i dati via rete, facendo uso di +protocolli differenti: + +* _irc_: proxy IRC: usato per condividere le connessioni ai server IRC con uno + o più client IRC +* _weechat_: protocollo usato dalle interfacce remote per mostrare ed interagire + con WeeChat, ad esempio: +** Glowing Bear (HTML5): https://www.glowing-bear.org/ +** QWeeChat (Qt): https://weechat.org/download +** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android +** weechat.el (Emacs): https://github.com/the-kenny/weechat.el +** WeeCloud (JavaScript): https://github.com/eirikb/weecloud + +// TRANSLATION MISSING +[[relay_password]] +=== Password + +It is highly recommended to set a password for relay, with these commands: + +---- +/secure set relay miapass +/set relay.network.password "${sec.data.relay}" +---- + +This password is used for _irc_ and _weechat_ protocols. + +// TRANSLATION MISSING +[[relay_totp]] +=== TOTP + +TOTP (Time-based One-Time Password) can be used as secondary authentication +factor for _weechat_ protocol, in addition to the password. + +This is optional and increases the security level. + +One-time passwords can be generated with applications, for example: + +* FreeOTP: + https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], + https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] + (https://freeotp.github.io/[website]) +* Google Authenticator: + https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], + https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] + +The TOTP secret must be set in WeeChat and the application used to generate +one-time passwords. + +It must be a string encoded in base32, with only letters and digits from 2 to 7, +for example: + +---- +/secure set relay_totp secretpasswordbase32 +/set relay.network.totp_secret "${sec.data.relay_totp}" +---- + +[[relay_ssl]] +=== SSL + +È possibile usare SSL creando un certificato e una chiave privata, e usando il +prefisso "ssl." nel nome del protocollo. + +// TRANSLATION MISSING +The default path to certificate/key is defined by option +<>. + +È possibile creare un certificato e una chiave privata con i seguenti comandi: + +---- +$ mkdir -p ~/.config/weechat/ssl +$ cd ~/.config/weechat/ssl +$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +---- + +// TRANSLATION MISSING +[NOTE] +You must replace `~/.config/weechat` by the path to your WeeChat config directory +which can also be for example `~/.weechat`. + +Se WeeChat è già in esecuzione, è possibile ricaricare il certificato e la +chiave privata con il comando: + +---- +/relay sslcertkey +---- + +// TRANSLATION MISSING +[[relay_irc_proxy]] +=== Proxy IRC + +The Relay plugin can act as an IRC proxy: it will simulate an IRC server, and +you can connect to WeeChat with any other IRC client (including WeeChat itself). + +You can define one port by IRC server, or one generic port for all servers. + +When using one port for all servers, the client must send the internal name of +server in the IRC "PASS" command, with this format (see example below): + +---- +PASS server:miapass +---- + +Example: IRC proxy with SSL for any server (client will choose): + +---- +/relay add ssl.irc 8000 +---- + +Example: IRC proxy without SSL only for server "libera": + +---- +/relay add irc.libera 8000 +---- + +Now you can connect on port 8000 with any IRC client using server password +"miapass" (or "libera:miapass" if no server was specified in the relay). + +For example if you use WeeChat as IRC client of the relay, with a server called +"relay" and the relay password "secret", you can setup the password with these +commands: + +---- +/secure set relay_libera libera:secret +/set irc.server.relay.password "${sec.data.relay_libera}" +---- + +[[relay_weechat_protocol]] +=== Protocollo WeeChat + +Il plugin Relay può inviare dati alle interfacce remote usando il protocollo +WeeChat. + +// TRANSLATION MISSING +You can connect with a remote interface, see the list in <>. + +[IMPORTANT] +// TRANSLATION MISSING +WeeChat itself can NOT connect to another WeeChat with this protocol. + +Ad esempio: + +---- +/relay add weechat 9000 +---- + +Ora è possibile connettersi sulla porta 9000 con un'interfaccia remota usando la +password "miapass". + +// TRANSLATION MISSING +[[relay_websocket]] +=== WebSocket + +WebSocket protocol (https://tools.ietf.org/html/rfc6455[RFC 6455]) is supported +in Relay plugin for all protocols. + +The WebSocket handshake is automatically detected and socket becomes ready for +WebSocket if required headers are found in handshake and if origin is allowed +(see option +<>). + +A WebSocket can be opened in a HTML5 with a single line of JavaScript: + +[source,javascript] +---- +websocket = new WebSocket("ws://server.com:9000/weechat"); +---- + +The port (9000 in example) is the port defined in Relay plugin. +The URI must always end with "/weechat" (for _irc_ and _weechat_ protocols). + +// TRANSLATION MISSING +[[relay_unix_socket]] +=== UNIX domain sockets + +Using the protocol option "unix" with the `/relay add` command, you can listen +using any protocol on a UNIX domain socket at a given path. For example: + +---- +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket +---- + +This allows clients to connect using the weechat protocol to +_/run/user/1000/weechat/relay_socket_. This is particularly useful to allow +SSH forwarding for relay clients, when other ports cannot be opened. + +Using OpenSSH: + +---- +$ ssh -L 9000:.weechat/relay_socket user@hostname +---- + +This redirects local relay clients connecting on port 9000 to the WeeChat +instance running on "hostname". + +[[relay_commands]] +=== Comandi + +include::includes/autogen_user_commands.it.adoc[tag=relay_commands] + +[[relay_options]] +=== Opzioni + +// TRANSLATION MISSING +Sections in file _relay.conf_: + +// TRANSLATION MISSING +[width="100%",cols="3m,6m,16",options="header"] +|=== +| Section | Control command | Description +| look | /set relay.look.* | Look and feel. +| color | /set relay.color.* | Colors. +| network | /set relay.network.* | Network options. +| irc | /set relay.irc.* | Options specific to irc protocol (irc proxy). +| port | <> + + /set relay.port.* | Ports used for relay (irc and weechat protocols) (options can be added/removed in section). +|=== + +// TRANSLATION MISSING +Options: + +include::includes/autogen_user_options.it.adoc[tag=relay_options] + [[plugins]] == Plugin @@ -4073,231 +4298,6 @@ Options: include::includes/autogen_user_options.it.adoc[tag=fifo_options] -[[relay_plugin]] -=== Relay - -Il plugin Relay viene utilizzato per inoltrare i dati via rete, facendo uso di -protocolli differenti: - -* _irc_: proxy IRC: usato per condividere le connessioni ai server IRC con uno - o più client IRC -* _weechat_: protocollo usato dalle interfacce remote per mostrare ed interagire - con WeeChat, ad esempio: -** Glowing Bear (HTML5): https://www.glowing-bear.org/ -** QWeeChat (Qt): https://weechat.org/download -** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android -** weechat.el (Emacs): https://github.com/the-kenny/weechat.el -** WeeCloud (JavaScript): https://github.com/eirikb/weecloud - -// TRANSLATION MISSING -[[relay_password]] -==== Password - -It is highly recommended to set a password for relay, with these commands: - ----- -/secure set relay miapass -/set relay.network.password "${sec.data.relay}" ----- - -This password is used for _irc_ and _weechat_ protocols. - -// TRANSLATION MISSING -[[relay_totp]] -==== TOTP - -TOTP (Time-based One-Time Password) can be used as secondary authentication -factor for _weechat_ protocol, in addition to the password. - -This is optional and increases the security level. - -One-time passwords can be generated with applications, for example: - -* FreeOTP: - https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], - https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] - (https://freeotp.github.io/[website]) -* Google Authenticator: - https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], - https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] - -The TOTP secret must be set in WeeChat and the application used to generate -one-time passwords. - -It must be a string encoded in base32, with only letters and digits from 2 to 7, -for example: - ----- -/secure set relay_totp secretpasswordbase32 -/set relay.network.totp_secret "${sec.data.relay_totp}" ----- - -[[relay_ssl]] -==== SSL - -È possibile usare SSL creando un certificato e una chiave privata, e usando il -prefisso "ssl." nel nome del protocollo. - -// TRANSLATION MISSING -The default path to certificate/key is defined by option -<>. - -È possibile creare un certificato e una chiave privata con i seguenti comandi: - ----- -$ mkdir -p ~/.config/weechat/ssl -$ cd ~/.config/weechat/ssl -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ----- - -// TRANSLATION MISSING -[NOTE] -You must replace `~/.config/weechat` by the path to your WeeChat config directory -which can also be for example `~/.weechat`. - -Se WeeChat è già in esecuzione, è possibile ricaricare il certificato e la -chiave privata con il comando: - ----- -/relay sslcertkey ----- - -// TRANSLATION MISSING -[[relay_irc_proxy]] -==== Proxy IRC - -The Relay plugin can act as an IRC proxy: it will simulate an IRC server, and -you can connect to WeeChat with any other IRC client (including WeeChat itself). - -You can define one port by IRC server, or one generic port for all servers. - -When using one port for all servers, the client must send the internal name of -server in the IRC "PASS" command, with this format (see example below): - ----- -PASS server:miapass ----- - -Example: IRC proxy with SSL for any server (client will choose): - ----- -/relay add ssl.irc 8000 ----- - -Example: IRC proxy without SSL only for server "libera": - ----- -/relay add irc.libera 8000 ----- - -Now you can connect on port 8000 with any IRC client using server password -"miapass" (or "libera:miapass" if no server was specified in the relay). - -For example if you use WeeChat as IRC client of the relay, with a server called -"relay" and the relay password "secret", you can setup the password with these -commands: - ----- -/secure set relay_libera libera:secret -/set irc.server.relay.password "${sec.data.relay_libera}" ----- - -[[relay_weechat_protocol]] -==== Protocollo WeeChat - -Il plugin Relay può inviare dati alle interfacce remote usando il protocollo -WeeChat. - -// TRANSLATION MISSING -You can connect with a remote interface, see the list in <>. - -[IMPORTANT] -// TRANSLATION MISSING -WeeChat itself can NOT connect to another WeeChat with this protocol. - -Ad esempio: - ----- -/relay add weechat 9000 ----- - -Ora è possibile connettersi sulla porta 9000 con un'interfaccia remota usando la -password "miapass". - -// TRANSLATION MISSING -[[relay_websocket]] -==== WebSocket - -WebSocket protocol (https://tools.ietf.org/html/rfc6455[RFC 6455]) is supported -in Relay plugin for all protocols. - -The WebSocket handshake is automatically detected and socket becomes ready for -WebSocket if required headers are found in handshake and if origin is allowed -(see option -<>). - -A WebSocket can be opened in a HTML5 with a single line of JavaScript: - -[source,javascript] ----- -websocket = new WebSocket("ws://server.com:9000/weechat"); ----- - -The port (9000 in example) is the port defined in Relay plugin. -The URI must always end with "/weechat" (for _irc_ and _weechat_ protocols). - -// TRANSLATION MISSING -[[relay_unix_socket]] -==== UNIX domain sockets - -Using the protocol option "unix" with the `/relay add` command, you can listen -using any protocol on a UNIX domain socket at a given path. For example: - ----- -/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ----- - -This allows clients to connect using the weechat protocol to -_/run/user/1000/weechat/relay_socket_. This is particularly useful to allow -SSH forwarding for relay clients, when other ports cannot be opened. - -Using OpenSSH: - ----- -$ ssh -L 9000:.weechat/relay_socket user@hostname ----- - -This redirects local relay clients connecting on port 9000 to the WeeChat -instance running on "hostname". - -[[relay_commands]] -==== Comandi - -include::includes/autogen_user_commands.it.adoc[tag=relay_commands] - -[[relay_options]] -==== Opzioni - -// TRANSLATION MISSING -Sections in file _relay.conf_: - -// TRANSLATION MISSING -[width="100%",cols="3m,6m,16",options="header"] -|=== -| Section | Control command | Description -| look | /set relay.look.* | Look and feel. -| color | /set relay.color.* | Colors. -| network | /set relay.network.* | Network options. -| irc | /set relay.irc.* | Options specific to irc protocol (irc proxy). -| port | <> + - /set relay.port.* | Ports used for relay (irc and weechat protocols) (options can be added/removed in section). -|=== - -// TRANSLATION MISSING -Options: - -include::includes/autogen_user_options.it.adoc[tag=relay_options] - // TRANSLATION MISSING [[scripts_plugins]] === Scripts diff --git a/doc/ja/weechat_user.ja.adoc b/doc/ja/weechat_user.ja.adoc index c422bd4bf..e03d5ec87 100644 --- a/doc/ja/weechat_user.ja.adoc +++ b/doc/ja/weechat_user.ja.adoc @@ -273,7 +273,7 @@ CMake に対するオプションを指定するには、以下の書式を使 Compile <> using Python 2 instead of Python 3. | ENABLE_RELAY | `ON`, `OFF` | ON | - <>のコンパイル。 + <>のコンパイル。 | ENABLE_RUBY | `ON`, `OFF` | ON | <>のコンパイル。 @@ -3738,6 +3738,223 @@ _irc.conf_ ファイル内のセクション: include::includes/autogen_user_options.ja.adoc[tag=irc_options] +[[relay]] +== Relay + +Relay プラグインはネットワークを介して異なるプロトコルを用いてデータを中継するために利用します: + +* _irc_: IRC プロキシ: IRC サーバに対する接続を、単一または複数の IRC + クライアントで共有するために用います。 +* _weechat_: リモートインターフェースを通じて WeeChat + を表示および操作する際に利用されるプロトコル。リモートインターフェースの一例: +** Glowing Bear (HTML5): https://www.glowing-bear.org/ +** QWeeChat (Qt): https://weechat.org/download +** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android +** weechat.el (Emacs): https://github.com/the-kenny/weechat.el +** WeeCloud (JavaScript): https://github.com/eirikb/weecloud + +[[relay_password]] +=== パスワード + +// TRANSLATION MISSING +It is highly recommended to set a password for relay, with these commands: + +---- +secure set relay mypassword +/set relay.network.password "${sec.data.relay}" +---- + +このパスワードは _irc_ と _weechat_ プロトコルで利用されます。 + +[[relay_totp]] +=== TOTP + +_weechat_ プロトコルでは、パスワードに加えて、二要素認証の +TOTP (時間ベースのワンタイムパスワード) を使うことが可能です。 + +これは任意設定項目であり、セキュリティレベルを向上させます。 + +ワンタイムパスワードは以下のようなアプリケーションを使って生成します: + +* FreeOTP: + https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], + https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] + (https://freeotp.github.io/[website]) +* Google Authenticator: + https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], + https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] + +TOTP の secret を WeeChat +とワンタイムパスワードを生成するアプリケーション内部に設定しなければいけません。 + +TOTP の secret は base32 でエンコードされた文字列 +(文字および 2 から 7 までの数字) でなければいけません。以下はその例です: + +---- +/secure set relay_totp secretpasswordbase32 +/set relay.network.totp_secret "${sec.data.relay_totp}" +---- + +[[relay_ssl]] +=== SSL + +証明書と秘密鍵を作り、プロトコル名の最初に "ssl." を付けることで +SSL 経由でリレーを利用することができます。 + +// TRANSLATION MISSING +The default path to certificate/key is defined by option +<>. + +以下のコマンドを使って証明書と秘密鍵ファイルを作成します: + +---- +$ mkdir -p ~/.config/weechat/ssl +$ cd ~/.config/weechat/ssl +$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +---- + +// TRANSLATION MISSING +[NOTE] +You must replace `~/.config/weechat` by the path to your WeeChat config directory +which can also be for example `~/.weechat`. + +WeeChat +が既に起動している場合、以下のコマンドで証明書と秘密鍵をリロードできます: + +---- +/relay sslcertkey +---- + +[[relay_irc_proxy]] +=== IRC プロキシ + +Relay プラグインは IRC プロキシとしても使えます: Relay プラグインは IRC +サーバのふりをして、他の IRC クライアント (WeeChat 自身も) は WeeChat に接続できます。 + +IRC サーバごとに異なるポート、もしくは全てのサーバに対して共通のポートを定義することができます。 + +// TRANSLATION MISSING +すべてのサーバに対して共通のポートを定義した場合には、クライアントからサーバの内部名を +IRC の "PASS" コマンドに含めて送信するようにしてください、以下の書式を使ってください +(see example below): + +---- +PASS server:mypass +---- + +例: SSL を使い、全てのサーバに対して共通の IRC プロキシを設定 (サーバはクライアントが選択): + +---- +/relay add ssl.irc 8000 +---- + +例: SSL を使わず、内部名 "libera" のサーバに対して IRC プロキシを設定: + +---- +/relay add irc.libera 8000 +---- + +任意の IRC クライアントからサーバパスワード "mypass" (全てのサーバに対して共通の +IRC プロキシを設定した場合には "libera:mypass") で 8000 番ポートに接続出来ます。 + +// TRANSLATION MISSING +For example if you use WeeChat as IRC client of the relay, with a server called +"relay" and the relay password "secret", you can setup the password with these +commands: + +---- +/secure set relay_libera libera:secret +/set irc.server.relay.password "${sec.data.relay_libera}" +---- + +[[relay_weechat_protocol]] +=== WeeChat プロトコル + +Relay プラグインは WeeChat プロトコルを使ってリモートインターフェースに対してデータを送信できます。 + +リモートインターフェースを使って接続できます、<> のリストを参照してください。 + +[IMPORTANT] +このプロトコルを使った場合 WeeChat から他の WeeChat に接続することはできません。 + +例: + +---- +/relay add weechat 9000 +---- + +この後、リモートインターフェースを使って 9000 +番ポートに対して、パスワード "mypass" で接続することができます。 + +[[relay_websocket]] +=== WebSocket + +Relay プラグインはすべてのプロトコルに対して WebSocket プロトコル +(https://tools.ietf.org/html/rfc6455[RFC 6455]) をサポートします。 + +WebSocket ハンドシェイクは自動的に検知され、ハンドシェイク中に必要なヘッダが見つかり +origin が許可されていれば WebSocket 用のソケットが準備されます (オプション +<> +を参照)。 + +HTML5 を使えばたった 1 行の JavaScript で WebSocket をオープンすることが可能です: + +[source,javascript] +---- +websocket = new WebSocket("ws://server.com:9000/weechat"); +---- + +ポート番号 (例では 9000 番) は Relay プラグインで定義したものです。URI +の最後には必ず "/weechat" をつけます (_irc_ と _weechat_ プロトコルの場合)。 + +[[relay_unix_socket]] +=== UNIX ドメインソケット + +`/relay add` コマンドにプロトコルオプション "unix" をつけることで、指定したパスで動作する +UNIX ドメインソケット上の任意のプロトコルをリッスンできます。例: + +---- +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket +---- + +こうすることで、クライアントは weechat プロトコルを使って _/run/user/1000/weechat/relay_socket_ +に接続できます。これは、他のポートをオープンが禁止されている状況下で、リレークライアントの +SSH 転送を許可する際に特に便利です。 + +OpenSSH を使った例: + +---- +$ ssh -L 9000:.weechat/relay_socket user@hostname +---- + +これでポート 9000 番に接続してきたローカルのリレークライアントは +"hostname" 上で動作中の WeeChat インスタンスへ転送されます。 + +[[relay_commands]] +=== コマンド + +include::includes/autogen_user_commands.ja.adoc[tag=relay_commands] + +[[relay_options]] +=== オプション + +_relay.conf_ ファイル内のセクション: + +[width="100%",cols="3m,6m,16",options="header"] +|=== +| セクション | 操作コマンド | 説明 +| look | /set relay.look.* | 外観 +| color | /set relay.color.* | 色 +| network | /set relay.network.* | ネットワークオプション +| irc | /set relay.irc.* | 特定の irc プロトコルのオプション (irc プロキシ) +| port | <> + + /set relay.port.* | リレーに使うポート(irc や weechat プロトコル) (オプションをセクションに追加/削除出来ます) +|=== + +オプション: + +include::includes/autogen_user_options.ja.adoc[tag=relay_options] + [[plugins]] == プラグイン @@ -3899,223 +4116,6 @@ _fifo.conf_ ファイル内のセクション: include::includes/autogen_user_options.ja.adoc[tag=fifo_options] -[[relay_plugin]] -=== Relay - -Relay プラグインはネットワークを介して異なるプロトコルを用いてデータを中継するために利用します: - -* _irc_: IRC プロキシ: IRC サーバに対する接続を、単一または複数の IRC - クライアントで共有するために用います。 -* _weechat_: リモートインターフェースを通じて WeeChat - を表示および操作する際に利用されるプロトコル。リモートインターフェースの一例: -** Glowing Bear (HTML5): https://www.glowing-bear.org/ -** QWeeChat (Qt): https://weechat.org/download -** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android -** weechat.el (Emacs): https://github.com/the-kenny/weechat.el -** WeeCloud (JavaScript): https://github.com/eirikb/weecloud - -[[relay_password]] -==== パスワード - -// TRANSLATION MISSING -It is highly recommended to set a password for relay, with these commands: - ----- -secure set relay mypassword -/set relay.network.password "${sec.data.relay}" ----- - -このパスワードは _irc_ と _weechat_ プロトコルで利用されます。 - -[[relay_totp]] -==== TOTP - -_weechat_ プロトコルでは、パスワードに加えて、二要素認証の -TOTP (時間ベースのワンタイムパスワード) を使うことが可能です。 - -これは任意設定項目であり、セキュリティレベルを向上させます。 - -ワンタイムパスワードは以下のようなアプリケーションを使って生成します: - -* FreeOTP: - https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], - https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] - (https://freeotp.github.io/[website]) -* Google Authenticator: - https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], - https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] - -TOTP の secret を WeeChat -とワンタイムパスワードを生成するアプリケーション内部に設定しなければいけません。 - -TOTP の secret は base32 でエンコードされた文字列 -(文字および 2 から 7 までの数字) でなければいけません。以下はその例です: - ----- -/secure set relay_totp secretpasswordbase32 -/set relay.network.totp_secret "${sec.data.relay_totp}" ----- - -[[relay_ssl]] -==== SSL - -証明書と秘密鍵を作り、プロトコル名の最初に "ssl." を付けることで -SSL 経由でリレーを利用することができます。 - -// TRANSLATION MISSING -The default path to certificate/key is defined by option -<>. - -以下のコマンドを使って証明書と秘密鍵ファイルを作成します: - ----- -$ mkdir -p ~/.config/weechat/ssl -$ cd ~/.config/weechat/ssl -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ----- - -// TRANSLATION MISSING -[NOTE] -You must replace `~/.config/weechat` by the path to your WeeChat config directory -which can also be for example `~/.weechat`. - -WeeChat -が既に起動している場合、以下のコマンドで証明書と秘密鍵をリロードできます: - ----- -/relay sslcertkey ----- - -[[relay_irc_proxy]] -==== IRC プロキシ - -Relay プラグインは IRC プロキシとしても使えます: Relay プラグインは IRC -サーバのふりをして、他の IRC クライアント (WeeChat 自身も) は WeeChat に接続できます。 - -IRC サーバごとに異なるポート、もしくは全てのサーバに対して共通のポートを定義することができます。 - -// TRANSLATION MISSING -すべてのサーバに対して共通のポートを定義した場合には、クライアントからサーバの内部名を -IRC の "PASS" コマンドに含めて送信するようにしてください、以下の書式を使ってください -(see example below): - ----- -PASS server:mypass ----- - -例: SSL を使い、全てのサーバに対して共通の IRC プロキシを設定 (サーバはクライアントが選択): - ----- -/relay add ssl.irc 8000 ----- - -例: SSL を使わず、内部名 "libera" のサーバに対して IRC プロキシを設定: - ----- -/relay add irc.libera 8000 ----- - -任意の IRC クライアントからサーバパスワード "mypass" (全てのサーバに対して共通の -IRC プロキシを設定した場合には "libera:mypass") で 8000 番ポートに接続出来ます。 - -// TRANSLATION MISSING -For example if you use WeeChat as IRC client of the relay, with a server called -"relay" and the relay password "secret", you can setup the password with these -commands: - ----- -/secure set relay_libera libera:secret -/set irc.server.relay.password "${sec.data.relay_libera}" ----- - -[[relay_weechat_protocol]] -==== WeeChat プロトコル - -Relay プラグインは WeeChat プロトコルを使ってリモートインターフェースに対してデータを送信できます。 - -リモートインターフェースを使って接続できます、<> のリストを参照してください。 - -[IMPORTANT] -このプロトコルを使った場合 WeeChat から他の WeeChat に接続することはできません。 - -例: - ----- -/relay add weechat 9000 ----- - -この後、リモートインターフェースを使って 9000 -番ポートに対して、パスワード "mypass" で接続することができます。 - -[[relay_websocket]] -==== WebSocket - -Relay プラグインはすべてのプロトコルに対して WebSocket プロトコル -(https://tools.ietf.org/html/rfc6455[RFC 6455]) をサポートします。 - -WebSocket ハンドシェイクは自動的に検知され、ハンドシェイク中に必要なヘッダが見つかり -origin が許可されていれば WebSocket 用のソケットが準備されます (オプション -<> -を参照)。 - -HTML5 を使えばたった 1 行の JavaScript で WebSocket をオープンすることが可能です: - -[source,javascript] ----- -websocket = new WebSocket("ws://server.com:9000/weechat"); ----- - -ポート番号 (例では 9000 番) は Relay プラグインで定義したものです。URI -の最後には必ず "/weechat" をつけます (_irc_ と _weechat_ プロトコルの場合)。 - -[[relay_unix_socket]] -==== UNIX ドメインソケット - -`/relay add` コマンドにプロトコルオプション "unix" をつけることで、指定したパスで動作する -UNIX ドメインソケット上の任意のプロトコルをリッスンできます。例: - ----- -/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ----- - -こうすることで、クライアントは weechat プロトコルを使って _/run/user/1000/weechat/relay_socket_ -に接続できます。これは、他のポートをオープンが禁止されている状況下で、リレークライアントの -SSH 転送を許可する際に特に便利です。 - -OpenSSH を使った例: - ----- -$ ssh -L 9000:.weechat/relay_socket user@hostname ----- - -これでポート 9000 番に接続してきたローカルのリレークライアントは -"hostname" 上で動作中の WeeChat インスタンスへ転送されます。 - -[[relay_commands]] -==== コマンド - -include::includes/autogen_user_commands.ja.adoc[tag=relay_commands] - -[[relay_options]] -==== オプション - -_relay.conf_ ファイル内のセクション: - -[width="100%",cols="3m,6m,16",options="header"] -|=== -| セクション | 操作コマンド | 説明 -| look | /set relay.look.* | 外観 -| color | /set relay.color.* | 色 -| network | /set relay.network.* | ネットワークオプション -| irc | /set relay.irc.* | 特定の irc プロトコルのオプション (irc プロキシ) -| port | <> + - /set relay.port.* | リレーに使うポート(irc や weechat プロトコル) (オプションをセクションに追加/削除出来ます) -|=== - -オプション: - -include::includes/autogen_user_options.ja.adoc[tag=relay_options] - [[scripts_plugins]] === スクリプト diff --git a/doc/pl/weechat_user.pl.adoc b/doc/pl/weechat_user.pl.adoc index c4fd26d70..0350d21c2 100644 --- a/doc/pl/weechat_user.pl.adoc +++ b/doc/pl/weechat_user.pl.adoc @@ -268,7 +268,7 @@ Lista popularnych opcji: Kompilacja <> z użyciem Pythona 2 zamiast Pythona 3. | ENABLE_RELAY | `ON`, `OFF` | ON | - Kompilacja <>. + Kompilacja <>. | ENABLE_RUBY | `ON`, `OFF` | ON | Kompilacja <>. @@ -3673,6 +3673,221 @@ Opcje: include::includes/autogen_user_options.pl.adoc[tag=irc_options] +[[relay]] +== Relay + +Wtyczka relay jest używana do przekazywania danych przez sieć, z użyciem różnych +protokołów: + +* _irc_: pośrednik IRC: używany do dzielenia połączeń z serwerami IRC z jednym + lub wieloma klientami IRC +* _weechat_: protokół używany przez zdalne interfejsy do wyświetlania i + interakcji z WeeChat, na przykład: +** Glowing Bear (HTML5): https://www.glowing-bear.org/ +** QWeeChat (Qt): https://weechat.org/download +** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android +** weechat.el (Emacs): https://github.com/the-kenny/weechat.el +** WeeCloud (JavaScript): https://github.com/eirikb/weecloud + +[[relay_password]] +=== Hasło + +Zaleca się ustawenia hasła dla pośrednika za pomocą poniższych komend: + +---- +/secure set relay moje_hasło +/set relay.network.password "${sec.data.relay}" +---- + +Hasło to używane jest przez protokoły _irc_ i _weechat_. + +[[relay_totp]] +=== TOTP + +TOTP (Time-based One-Time Password) może zostać użyte jako drugi stopień uwierzytelnienia +dla protokołu _weechat_, poza normalnym hasłem. + +Jest to opcjomalne ale podnosi to poziom bezpieczeństwa. +This is optional and increases the security level. + +Hasła jednorazowe mogą być generowane między innymi za pomocą: + +* FreeOTP: + https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], + https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] + (https://freeotp.github.io/[website]) +* Google Authenticator: + https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], + https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] + +Ten sam sekret TOTP musi być utawiony w WeeChat i aplikacji używanej do generowania haseł. + +Musi to być ciąg zakodowany za pomocą base32, zawierajcy tylko litery i liczby od 2 do 7, +na przykład: + +---- +/secure set relay_totp secretpasswordbase32 +/set relay.network.totp_secret "${sec.data.relay_totp}" +---- + +[[relay_ssl]] +=== SSL + +Możesz używać SSL poprzez utworzenie certyfikatu i klucza prywatnego, oraz +użycie prefiksu "ssl." w nazwie protokołu. + +Domyślna ścieżka do certyfikatów/kluczy jest zdefiniowana przez opcję +<>. + +Możesz utworzyć certyfikat i klucz prywatny wykonując poniższe komendy: + +---- +$ mkdir -p ~/.config/weechat/ssl +$ cd ~/.config/weechat/ssl +$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +---- + +[NOTE] +Musisz zamienić `~/.config/weechat` na ścieżkę do katalogu z konfiguracją WeeChat, +który może być ustawiony na przykład na `~/.weechat`. + +Jeśli WeeChat jest już uruchomiony, możesz przładować certyfikat i klucz prywatny +za pomocą polecenia: + +---- +/relay sslcertkey +---- + +[[relay_irc_proxy]] +=== IRC proxy + +Wtyczka relay może zachowywać się jak proxy dla IRC: będzie symulować serwer IRC, +możesz się połączyć do niego za pomocą dowolnego klienta IRC (w tym WeeChat). + +Możesz zdefiniować oddzielne porty dla serwerów IRC, lub jeden dla wszystkich. + +Jeśli używasz jednego portu dla wszystkich serwerów, klient musi wysłać +wewnętrzną nazwę serwera w komendzie IRC "PASS", zachowując format +(zobacz poniższy przykład): + +---- +PASS serwer:hasło +---- + +Przykład: proxy IRC z SSL dla dowolnego serwera (klient wybiera): + +---- +/relay add ssl.irc 8000 +---- + +Przykład: proxy IRC bez SSL tylko dla serwera "libera": + +---- +/relay add irc.libera 8000 +---- + +Teraz możesz się połączyć na porcie 8000 za pomocą dowolnego klienta IRC +używając hasła serwera "moje_hasło" (lub "libera:moje_hasło" jeśli żaden +serwer nie został podany w przekaźniku). + +Na przydład jeśli używasz WeeChat jako klienta pośrednika IRC, z serwerem +nazwanym "relay" i hasłem pośrednika "moje_hasło", możesz ustawić hasło +za pomocą tych komend: + +---- +/secure set relay_libera libera:moje_hasło +/set irc.server.relay.password "{sec.data.relay_libera}" +---- + +[[relay_weechat_protocol]] +=== Protokół WeeChat + +Wtyczka relay może wysyłać dane do zdalnego interfejsu korzystając z protokołu +WeeChat. + +Możesz połączyć się zdalnym inrerfejsem, listę znajdziesz w <>. + +[IMPORTANT] +WeeChat NIE MOŻE się połączyć z innym WeeChat za pomocą tego protokołu. + +Na przykład: + +---- +/relay add weechat 9000 +---- + +Teraz możesz się połączyć zdalnym interfejsem na porcie 9000 za pomocą hasła +"moje_hasło". + +[[relay_websocket]] +=== WebSocket + +Protokół WebSocket (https://tools.ietf.org/html/rfc6455[RFC 6455]) jest wspierany +dla wszystkich protokołów. + +Żądanie WebSocket jest automatycznie wykrywane i socket staje się gotowy do +transmisji WebSocket jeśli wymagane nagłówki znajdują się w żądaniu oraz, gdy +źródło jest dopuszczone (zobacz opcję +<>). + +WebSocket może zostać otworzony w HTML5 za pomocą jednej linii w JavaScript: + +[source,javascript] +---- +websocket = new WebSocket("ws://server.com:9000/weechat"); +---- + +Port (9000 w przykładzie) to port zdefiniowany we wtyczce relay. +Adres URL musi się zawsze kończyć "/weechat" (dla protokołów _irc_ i _weechat_). + +[[relay_unix_socket]] +=== Sockety UNIXowe + +Używając opcji protokołu "unix" razem z komendą `/relay`, można nasłuchiwać dowolnego +protokołu za pomocą socketu UNIXowego w podanej ścieżce. Na przykład: + +---- +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket +---- + +Pozwala to na połączenia od klientów za pomocą protokołu weechat do +_/run/user/1000/weechat/relay_socket_. Jest to przydatne zwłaszcza jeśli chcemy +tunelować klienty przez SSH, w przypadku, kiedy inne porty nie moga być otwierane. + +Za pomocą OpenSSH: + +---- +$ ssh -L 9000:.weechat/relay_socket user@hostname +---- + +Przekerowuje to połączenia lokalnych klientów łączących się na port 9000 do intancji +WeeChat uruchomionej na "hostname". + +[[relay_commands]] +=== Komendy + +include::includes/autogen_user_commands.pl.adoc[tag=relay_commands] + +[[relay_options]] +=== Opcje + +Sekcje w pliku _relay.conf_: + +[width="100%",cols="3m,6m,16",options="header"] +|=== +| Sekcja | Komenda | Opis +| look | /set relay.look.* | Wygląd. +| color | /set relay.color.* | Kolory. +| network | /set relay.network.* | Opcje sieci. +| irc | /set relay.irc.* | Opcje specyficzne dla protokołu irc (pośrednik irc). +| port | <> + + /set relay.port.* | Porty używane do przekazywania (protokoły irc i weechat) (opcje w tej sekcji mogą być dodawane/usuwane). +|=== + +Opcje: + +include::includes/autogen_user_options.pl.adoc[tag=relay_options] + [[plugins]] == Wtyczki @@ -3832,221 +4047,6 @@ Opcje: include::includes/autogen_user_options.pl.adoc[tag=fifo_options] -[[relay_plugin]] -=== Relay - -Wtyczka relay jest używana do przekazywania danych przez sieć, z użyciem różnych -protokołów: - -* _irc_: pośrednik IRC: używany do dzielenia połączeń z serwerami IRC z jednym - lub wieloma klientami IRC -* _weechat_: protokół używany przez zdalne interfejsy do wyświetlania i - interakcji z WeeChat, na przykład: -** Glowing Bear (HTML5): https://www.glowing-bear.org/ -** QWeeChat (Qt): https://weechat.org/download -** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android -** weechat.el (Emacs): https://github.com/the-kenny/weechat.el -** WeeCloud (JavaScript): https://github.com/eirikb/weecloud - -[[relay_password]] -==== Hasło - -Zaleca się ustawenia hasła dla pośrednika za pomocą poniższych komend: - ----- -/secure set relay moje_hasło -/set relay.network.password "${sec.data.relay}" ----- - -Hasło to używane jest przez protokoły _irc_ i _weechat_. - -[[relay_totp]] -==== TOTP - -TOTP (Time-based One-Time Password) może zostać użyte jako drugi stopień uwierzytelnienia -dla protokołu _weechat_, poza normalnym hasłem. - -Jest to opcjomalne ale podnosi to poziom bezpieczeństwa. -This is optional and increases the security level. - -Hasła jednorazowe mogą być generowane między innymi za pomocą: - -* FreeOTP: - https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], - https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] - (https://freeotp.github.io/[website]) -* Google Authenticator: - https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], - https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] - -Ten sam sekret TOTP musi być utawiony w WeeChat i aplikacji używanej do generowania haseł. - -Musi to być ciąg zakodowany za pomocą base32, zawierajcy tylko litery i liczby od 2 do 7, -na przykład: - ----- -/secure set relay_totp secretpasswordbase32 -/set relay.network.totp_secret "${sec.data.relay_totp}" ----- - -[[relay_ssl]] -==== SSL - -Możesz używać SSL poprzez utworzenie certyfikatu i klucza prywatnego, oraz -użycie prefiksu "ssl." w nazwie protokołu. - -Domyślna ścieżka do certyfikatów/kluczy jest zdefiniowana przez opcję -<>. - -Możesz utworzyć certyfikat i klucz prywatny wykonując poniższe komendy: - ----- -$ mkdir -p ~/.config/weechat/ssl -$ cd ~/.config/weechat/ssl -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ----- - -[NOTE] -Musisz zamienić `~/.config/weechat` na ścieżkę do katalogu z konfiguracją WeeChat, -który może być ustawiony na przykład na `~/.weechat`. - -Jeśli WeeChat jest już uruchomiony, możesz przładować certyfikat i klucz prywatny -za pomocą polecenia: - ----- -/relay sslcertkey ----- - -[[relay_irc_proxy]] -==== IRC proxy - -Wtyczka relay może zachowywać się jak proxy dla IRC: będzie symulować serwer IRC, -możesz się połączyć do niego za pomocą dowolnego klienta IRC (w tym WeeChat). - -Możesz zdefiniować oddzielne porty dla serwerów IRC, lub jeden dla wszystkich. - -Jeśli używasz jednego portu dla wszystkich serwerów, klient musi wysłać -wewnętrzną nazwę serwera w komendzie IRC "PASS", zachowując format -(zobacz poniższy przykład): - ----- -PASS serwer:hasło ----- - -Przykład: proxy IRC z SSL dla dowolnego serwera (klient wybiera): - ----- -/relay add ssl.irc 8000 ----- - -Przykład: proxy IRC bez SSL tylko dla serwera "libera": - ----- -/relay add irc.libera 8000 ----- - -Teraz możesz się połączyć na porcie 8000 za pomocą dowolnego klienta IRC -używając hasła serwera "moje_hasło" (lub "libera:moje_hasło" jeśli żaden -serwer nie został podany w przekaźniku). - -Na przydład jeśli używasz WeeChat jako klienta pośrednika IRC, z serwerem -nazwanym "relay" i hasłem pośrednika "moje_hasło", możesz ustawić hasło -za pomocą tych komend: - ----- -/secure set relay_libera libera:moje_hasło -/set irc.server.relay.password "{sec.data.relay_libera}" ----- - -[[relay_weechat_protocol]] -==== Protokół WeeChat - -Wtyczka relay może wysyłać dane do zdalnego interfejsu korzystając z protokołu -WeeChat. - -Możesz połączyć się zdalnym inrerfejsem, listę znajdziesz w <>. - -[IMPORTANT] -WeeChat NIE MOŻE się połączyć z innym WeeChat za pomocą tego protokołu. - -Na przykład: - ----- -/relay add weechat 9000 ----- - -Teraz możesz się połączyć zdalnym interfejsem na porcie 9000 za pomocą hasła -"moje_hasło". - -[[relay_websocket]] -==== WebSocket - -Protokół WebSocket (https://tools.ietf.org/html/rfc6455[RFC 6455]) jest wspierany -dla wszystkich protokołów. - -Żądanie WebSocket jest automatycznie wykrywane i socket staje się gotowy do -transmisji WebSocket jeśli wymagane nagłówki znajdują się w żądaniu oraz, gdy -źródło jest dopuszczone (zobacz opcję -<>). - -WebSocket może zostać otworzony w HTML5 za pomocą jednej linii w JavaScript: - -[source,javascript] ----- -websocket = new WebSocket("ws://server.com:9000/weechat"); ----- - -Port (9000 w przykładzie) to port zdefiniowany we wtyczce relay. -Adres URL musi się zawsze kończyć "/weechat" (dla protokołów _irc_ i _weechat_). - -[[relay_unix_socket]] -==== Sockety UNIXowe - -Używając opcji protokołu "unix" razem z komendą `/relay`, można nasłuchiwać dowolnego -protokołu za pomocą socketu UNIXowego w podanej ścieżce. Na przykład: - ----- -/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ----- - -Pozwala to na połączenia od klientów za pomocą protokołu weechat do -_/run/user/1000/weechat/relay_socket_. Jest to przydatne zwłaszcza jeśli chcemy -tunelować klienty przez SSH, w przypadku, kiedy inne porty nie moga być otwierane. - -Za pomocą OpenSSH: - ----- -$ ssh -L 9000:.weechat/relay_socket user@hostname ----- - -Przekerowuje to połączenia lokalnych klientów łączących się na port 9000 do intancji -WeeChat uruchomionej na "hostname". - -[[relay_commands]] -==== Komendy - -include::includes/autogen_user_commands.pl.adoc[tag=relay_commands] - -[[relay_options]] -==== Opcje - -Sekcje w pliku _relay.conf_: - -[width="100%",cols="3m,6m,16",options="header"] -|=== -| Sekcja | Komenda | Opis -| look | /set relay.look.* | Wygląd. -| color | /set relay.color.* | Kolory. -| network | /set relay.network.* | Opcje sieci. -| irc | /set relay.irc.* | Opcje specyficzne dla protokołu irc (pośrednik irc). -| port | <> + - /set relay.port.* | Porty używane do przekazywania (protokoły irc i weechat) (opcje w tej sekcji mogą być dodawane/usuwane). -|=== - -Opcje: - -include::includes/autogen_user_options.pl.adoc[tag=relay_options] - [[scripts_plugins]] === Skryptowe diff --git a/doc/sr/weechat_user.sr.adoc b/doc/sr/weechat_user.sr.adoc index 208f5ff63..bf65b6fda 100644 --- a/doc/sr/weechat_user.sr.adoc +++ b/doc/sr/weechat_user.sr.adoc @@ -246,7 +246,7 @@ $ make install Компајлира <> користећи Python 2 уместо Python 3. | ENABLE_RELAY | `ON`, `OFF` | ON | - Компајлира <>. + Компајлира <>. | ENABLE_RUBY | `ON`, `OFF` | ON | Компајлира <>. @@ -3414,6 +3414,188 @@ include::includes/autogen_user_commands.sr.adoc[tag=irc_commands] include::includes/autogen_user_options.sr.adoc[tag=irc_options] +[[relay]] +== Релеј + +Релеј додатак се користи за релеј података преко мреже, употребом различитих протокола: + +* _irc_: IRC прокси: користи се за дељење веза са IRC серверима са једним или више других клијената +* _weechat_: протокол који користе удаљени интерфејси за приказ и интеракцију са програмом WeeChat, на пример: +** Glowing Bear (HTML5): https://www.glowing-bear.org/ +** QWeeChat (Qt): https://weechat.org/download +** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android +** weechat.el (Emacs): https://github.com/the-kenny/weechat.el +** WeeCloud (JavaScript): https://github.com/eirikb/weecloud + +[[relay_password]] +=== Лозинка + +Топло се препоручује постављање лозинке за релеј следећим командама: + +---- +/secure set relay мојалозинка +/set relay.network.password "${sec.data.relay}" +---- + +Ова лозинка се користи и за _irc_ и за _weechat_ протокол. + +[[relay_totp]] +=== TOTP + +TOTP (Time-based One-Time Password) може уз лозинку да се користи као секундарни фактор аутентификације за _weechat_ протокол. + +Ово није обавезно, мада повећава ниво безбедности. + +једнократне лозинке могу да се генеришу апликацијама, на пример: + +* FreeOTP: https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] (https://freeotp.github.io/[вебсајт]) +* Google Authenticator: https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] + +TOTP тајна мора да се постави у програму WeeChat и у апликацији која се користи за генерисање једнократних лозинки. + +То мора бити стринг кодиран у base32, само са словима и цифрама од 2 до 7, на пример: + +---- +/secure set relay_totp тајналозинкаbase32 +/set relay.network.totp_secret "${sec.data.relay_totp}" +---- + +[[relay_ssl]] +=== SSL + +SSL можете да користите креирањем сертификата и приватног кључа и употребом префикса „ssl.” у имену протокола. + +Подразумевана путања до сертификата/кључа је дефинисана опцијом <>. + +Сертификат и приватни кључ можете да креирате следећим командама: + +---- +$ mkdir -p ~/.config/weechat/ssl +$ cd ~/.config/weechat/ssl +$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem +---- + +[NOTE] +`~/.config/weechat` морате да замените путањом до вашег WeeChat config директоријума који на пример, такође може да буде `~/.weechat`. + +Ако се програм WeeChat већ извршава, сертификат и приватни кључ можете поново да учитате командом: + +---- +/relay sslcertkey +---- + +[[relay_irc_proxy]] +=== IRC прокси + +Релеј додатак може да се понаша као IRC прокси: симулираће IRC сервер, па можете да се повежете са програмом WeeChat помоћу било ког другог IRC клијента (укључујући и сам WeeChat). + +Можете да дефинишете по један порт за сваки IRC сервер, или један генерички за све сервере. + +Када се користи један порт за све сервере, клијент мора да пошаље интерно име сервера у IRC команди „PASS”, у следећем формату (погледајте пример испод): + +---- +PASS сервер:лозинка +---- + +Пример: IRC прокси са SSL за било који сервер (клијент ће изабрати): + +---- +/relay add ssl.irc 8000 +---- + +Пример: IRC прокси без SSL само за сервер „libera”: + +---- +/relay add irc.libera 8000 +---- + +Сада можете да успоставите везу на порту 8000 помоћу било ког IRC клијента употребом лозинке „мојалозинка” (или „libera:мојалозинка” ако у релеју није био наведен ниједан сервер). + +На пример, ако као IRC клијент користите програм WeeChat, а сервер се зове „relay” и релеј лозинка је „secret”, можете да поставите лозинку следећим командама: + +---- +/secure set relay_libera libera:secret +/set irc.server.relay.password "${sec.data.relay_libera}" +---- + +[[relay_weechat_protocol]] +=== WeeChat протокол + +Релеј додатак може да шаље податке удаљеном интерфејсу користећи WeeChat протокол. + +Можете да се повежете употребом удаљеног интерфејса, погледајте листу <>. + +[IMPORTANT] +Сам програм WeeChat НЕ може да се повеже на други програм WeeChat преко овог протокола. + +На пример: + +---- +/relay add weechat 9000 +---- + +Сада можете да се повежете са удаљеног интерфејса преко порта 9000 користећи лозинку „мојалозинка”. + +[[relay_websocket]] +=== ВебСокет + +Релеј додатак подржава ВебСокет протокол (https://tools.ietf.org/html/rfc6455[RFC 6455]) за све протоколе. + +ВебСокет руковање се аутоматски детектује и ако се у руковању пронађу одговарајућа заглавља и ако је порекло дозвољено (погледајте опцију <>), сокет постаје спреман за WebSocket. + +ВебСокет може да се отвори у HTML5 једном једином линијом JavaScript кода: + +[source, js] +---- +websocket = new WebSocket("ws://server.com:9000/weechat"); +---- + +Порт (9000 у примеру) је порт који је дефинисан у Релеј додатку. URI увек мора да се завршава са „/weechat” (и за _irc_ и за _weechat_ протокол). + +[[relay_unix_socket]] +=== UNIX доменски сокети + +Ако у `/relay add` команди употребите опцију протокола „unix”, можете да ослушкујете било којим протоколом на UNIX доменском сокету на задатој путањи. На пример: + +---- +/relay add unix.weechat ${weechat_runtime_dir}/relay_socket +---- + +Ово омогућава да се клијенти повежу користећи weechat протокол на _/run/user/1000/weechat/relay_socket_. Врло је корисно за дозвољавање SSH прослеђивања релеј клијентима, када други портови не могу да се отворе. + +Употребом OpenSSH: + +---- +$ ssh -L 9000:.weechat/relay_socket корисник@имехоста +---- + +Ово преусмерава локалне релеј клијенте који се повезују на порт 9000 на инстанцу програма WeeChat која се извршава на машини „имехоста”. + +[[relay_commands]] +=== Команде + +include::includes/autogen_user_commands.sr.adoc[tag=relay_commands] + +[[relay_options]] +=== Опције + +Одељци у фајлу _relay.conf_: + +[width="100%", cols="3m,6m,16", options="header"] +|=== +| Одељак | Команда за контролу | Опис +| look | /set relay.look.* | Изглед и осећај. +| color | /set relay.color.* | Боје. +| network | /set relay.network.* | Мрежне опције. +| irc | /set relay.irc.* | Опције специфичне за irc протокол (irc прокси). +| port | <> + + /set relay.port.* | Портови који се користе за релеј (irc и weechat протоколи) (у одељку је могуће додавање/уклањање опција). +|=== + +Опције: + +include::includes/autogen_user_options.sr.adoc[tag=relay_options] + [[plugins]] == Додаци @@ -3559,188 +3741,6 @@ include::includes/autogen_user_commands.sr.adoc[tag=fifo_commands] include::includes/autogen_user_options.sr.adoc[tag=fifo_options] -[[relay_plugin]] -=== Релеј - -Релеј додатак се користи за релеј података преко мреже, употребом различитих протокола: - -* _irc_: IRC прокси: користи се за дељење веза са IRC серверима са једним или више других клијената -* _weechat_: протокол који користе удаљени интерфејси за приказ и интеракцију са програмом WeeChat, на пример: -** Glowing Bear (HTML5): https://www.glowing-bear.org/ -** QWeeChat (Qt): https://weechat.org/download -** WeeChat-Android (Android): https://github.com/ubergeek42/weechat-android -** weechat.el (Emacs): https://github.com/the-kenny/weechat.el -** WeeCloud (JavaScript): https://github.com/eirikb/weecloud - -[[relay_password]] -==== Лозинка - -Топло се препоручује постављање лозинке за релеј следећим командама: - ----- -/secure set relay мојалозинка -/set relay.network.password "${sec.data.relay}" ----- - -Ова лозинка се користи и за _irc_ и за _weechat_ протокол. - -[[relay_totp]] -==== TOTP - -TOTP (Time-based One-Time Password) може уз лозинку да се користи као секундарни фактор аутентификације за _weechat_ протокол. - -Ово није обавезно, мада повећава ниво безбедности. - -једнократне лозинке могу да се генеришу апликацијама, на пример: - -* FreeOTP: https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp[Android], https://itunes.apple.com/fr/app/freeotp-authenticator/id872559395[iOS] (https://freeotp.github.io/[вебсајт]) -* Google Authenticator: https://play.google.com/store/apps/details?id=com.google.android.apps.authenticator2[Android], https://itunes.apple.com/fr/app/google-authenticator/id388497605[iOS] - -TOTP тајна мора да се постави у програму WeeChat и у апликацији која се користи за генерисање једнократних лозинки. - -То мора бити стринг кодиран у base32, само са словима и цифрама од 2 до 7, на пример: - ----- -/secure set relay_totp тајналозинкаbase32 -/set relay.network.totp_secret "${sec.data.relay_totp}" ----- - -[[relay_ssl]] -==== SSL - -SSL можете да користите креирањем сертификата и приватног кључа и употребом префикса „ssl.” у имену протокола. - -Подразумевана путања до сертификата/кључа је дефинисана опцијом <>. - -Сертификат и приватни кључ можете да креирате следећим командама: - ----- -$ mkdir -p ~/.config/weechat/ssl -$ cd ~/.config/weechat/ssl -$ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out relay.pem ----- - -[NOTE] -`~/.config/weechat` морате да замените путањом до вашег WeeChat config директоријума који на пример, такође може да буде `~/.weechat`. - -Ако се програм WeeChat већ извршава, сертификат и приватни кључ можете поново да учитате командом: - ----- -/relay sslcertkey ----- - -[[relay_irc_proxy]] -==== IRC прокси - -Релеј додатак може да се понаша као IRC прокси: симулираће IRC сервер, па можете да се повежете са програмом WeeChat помоћу било ког другог IRC клијента (укључујући и сам WeeChat). - -Можете да дефинишете по један порт за сваки IRC сервер, или један генерички за све сервере. - -Када се користи један порт за све сервере, клијент мора да пошаље интерно име сервера у IRC команди „PASS”, у следећем формату (погледајте пример испод): - ----- -PASS сервер:лозинка ----- - -Пример: IRC прокси са SSL за било који сервер (клијент ће изабрати): - ----- -/relay add ssl.irc 8000 ----- - -Пример: IRC прокси без SSL само за сервер „libera”: - ----- -/relay add irc.libera 8000 ----- - -Сада можете да успоставите везу на порту 8000 помоћу било ког IRC клијента употребом лозинке „мојалозинка” (или „libera:мојалозинка” ако у релеју није био наведен ниједан сервер). - -На пример, ако као IRC клијент користите програм WeeChat, а сервер се зове „relay” и релеј лозинка је „secret”, можете да поставите лозинку следећим командама: - ----- -/secure set relay_libera libera:secret -/set irc.server.relay.password "${sec.data.relay_libera}" ----- - -[[relay_weechat_protocol]] -==== WeeChat протокол - -Релеј додатак може да шаље податке удаљеном интерфејсу користећи WeeChat протокол. - -Можете да се повежете употребом удаљеног интерфејса, погледајте листу <>. - -[IMPORTANT] -Сам програм WeeChat НЕ може да се повеже на други програм WeeChat преко овог протокола. - -На пример: - ----- -/relay add weechat 9000 ----- - -Сада можете да се повежете са удаљеног интерфејса преко порта 9000 користећи лозинку „мојалозинка”. - -[[relay_websocket]] -==== ВебСокет - -Релеј додатак подржава ВебСокет протокол (https://tools.ietf.org/html/rfc6455[RFC 6455]) за све протоколе. - -ВебСокет руковање се аутоматски детектује и ако се у руковању пронађу одговарајућа заглавља и ако је порекло дозвољено (погледајте опцију <>), сокет постаје спреман за WebSocket. - -ВебСокет може да се отвори у HTML5 једном једином линијом JavaScript кода: - -[source, js] ----- -websocket = new WebSocket("ws://server.com:9000/weechat"); ----- - -Порт (9000 у примеру) је порт који је дефинисан у Релеј додатку. URI увек мора да се завршава са „/weechat” (и за _irc_ и за _weechat_ протокол). - -[[relay_unix_socket]] -==== UNIX доменски сокети - -Ако у `/relay add` команди употребите опцију протокола „unix”, можете да ослушкујете било којим протоколом на UNIX доменском сокету на задатој путањи. На пример: - ----- -/relay add unix.weechat ${weechat_runtime_dir}/relay_socket ----- - -Ово омогућава да се клијенти повежу користећи weechat протокол на _/run/user/1000/weechat/relay_socket_. Врло је корисно за дозвољавање SSH прослеђивања релеј клијентима, када други портови не могу да се отворе. - -Употребом OpenSSH: - ----- -$ ssh -L 9000:.weechat/relay_socket корисник@имехоста ----- - -Ово преусмерава локалне релеј клијенте који се повезују на порт 9000 на инстанцу програма WeeChat која се извршава на машини „имехоста”. - -[[relay_commands]] -==== Команде - -include::includes/autogen_user_commands.sr.adoc[tag=relay_commands] - -[[relay_options]] -==== Опције - -Одељци у фајлу _relay.conf_: - -[width="100%", cols="3m,6m,16", options="header"] -|=== -| Одељак | Команда за контролу | Опис -| look | /set relay.look.* | Изглед и осећај. -| color | /set relay.color.* | Боје. -| network | /set relay.network.* | Мрежне опције. -| irc | /set relay.irc.* | Опције специфичне за irc протокол (irc прокси). -| port | <> + - /set relay.port.* | Портови који се користе за релеј (irc и weechat протоколи) (у одељку је могуће додавање/уклањање опција). -|=== - -Опције: - -include::includes/autogen_user_options.sr.adoc[tag=relay_options] - [[scripts_plugins]] === Скрипте