GuíaGuide
Esta guía describe el prototipo del protocolo 2 mostrado en los vídeos. Comprueba la versión del release publicado antes de usar estas instrucciones con un binario descargado.
This guide describes the protocol 2 prototype shown in the videos. Check the published release before using these instructions with a downloaded binary.
- Comandos del clienteClient commands
- Comandos de adminAdmin commands
- VariablesVariables
- Montar un servidorRunning a server
Comandos del clienteClient commands
Escribe en el compositor usuario-->. Lo que no empieza por / va a la sala.
Type into the user--> composer. Anything not starting with / goes to the room.
| ComandoCommand | DescripciónDescription |
|---|---|
/help | Lista los comandos locales.Lists local commands. |
/msg <usuario> <texto> | Mensaje privado cifrado de extremo a extremo. Alias: /pm, /w. Si el destinatario está desconectado, queda en cola.End-to-end encrypted private message. Aliases: /pm, /w. Queued if the recipient is offline. |
/r <texto> | Responde a la última conversación privada.Replies to the last private conversation. |
/users | Lista los nodos activos (alias /who).Lists active nodes (alias /who). |
/ping | Mide la latencia de ida y vuelta al servidor.Measures round-trip latency to the server. |
/clear | Limpia el feed local.Clears the local feed. |
/fingerprint [usuario] | Muestra tu huella de clave o la de otro usuario (alias /fp). Compárala por otro canal.Shows your key fingerprint or another user's (alias /fp). Compare it over another channel. |
/logout | Cierra la sesión y vuelve a la pantalla de acceso (alias /quit).Closes the session and returns to the login screen (alias /quit). |
/adminhelp | (Admins) Pide al servidor la lista de comandos de administración.(Admins) Asks the server for the admin command list. |
/fingerprint y se escriben en privado con /msg y /r. Más clips en la demo real.
Real recording: alice and bob compare fingerprints with /fingerprint and message each other privately with /msg and /r. More clips in the real demo.AtajosShortcuts
- ↑ / ↓ recuperan líneas enviadas antes.
- ↑ / ↓ recall previously sent lines.
- Tab completa nombres de usuario.
- Tab completes nicknames.
- Clic derecho sobre un usuario de la lista: Mensaje privado o Copiar nombre.
- Right-click a user in the node list: Private message or Copy name.
- Botón Adjuntar para enviar imágenes, vídeos o archivos (hasta 12 MiB); doble clic sobre un adjunto para abrirlo (un toque en la vista compacta).
- Attach button to send images, videos or files (up to 12 MiB); double-click an attachment to open it (single tap in compact layout).
- Botón EN/ES en la barra azul para cambiar el idioma de la interfaz.
- EN/ES button in the blue bar switches the interface language.
Si se cae el enlace, el cliente vuelve a autenticarse solo con las credenciales de la sesión (guardadas únicamente en memoria). No lo hace tras un kick, un baneo, /logout o si la misma cuenta entra desde otra conexión.
If the link drops, the client re-authenticates on its own with the session credentials (kept in memory only). It does not after a kick, a ban, /logout, or when the same account signs in from another connection.
Comandos de administraciónAdmin commands
Disponibles para cuentas admin desde el cliente gráfico o desde la consola the_river_admin (que además admite /msg <usuario> <texto>). Las acciones quedan auditadas.
Available to admin accounts from the graphical client or the the_river_admin console (which also supports /msg <user> <text>). Actions are audited.
| ComandoCommand | DescripciónDescription |
|---|---|
/newuser | Crea una cuenta nueva con la clave inicial de THE_RIVER_NEW_USER_PASSWORD; el usuario la cambia en su primer acceso.Creates a new account with the initial password from THE_RIVER_NEW_USER_PASSWORD; the user changes it on first login. |
/passwd <usuario> <clave> | Cambia la contraseña de un usuario (debe cumplir la política: 12 a 128 caracteres).Changes a user's password (must meet the policy: 12 to 128 characters). |
/users | Usuarios conectados ahora.Users online right now. |
/accounts | Todas las cuentas registradas, con marcas [admin], [pendiente], [sin hwid].All registered accounts, flagged [admin], [pendiente], [sin hwid]. |
/whois <usuario> | Estado, HWID, tiempo de sesión y huella de clave.Status, HWID, session time and key fingerprint. |
/kick <usuario> [razón] | Desconecta a un usuario.Disconnects a user. |
/banhwid <hwid> [razón] | Banea un HWID (recuerda: lo declara el cliente).Bans an HWID (remember: it is client-reported). |
/banuser <usuario> [razón] | Banea el HWID asociado a esa cuenta y la desconecta.Bans the HWID bound to that account and disconnects it. |
/unbanhwid <hwid> | Levanta un baneo de HWID.Lifts an HWID ban. |
/bans | Lista los HWID baneados.Lists banned HWIDs. |
/resethwid <usuario> | Libera el HWID de la cuenta; se asocia de nuevo en su próximo acceso.Releases the account's HWID; it binds again on next login. |
/deluser <usuario> | Elimina la cuenta y la expulsa; su acceso queda revocado al instante.Deletes the account and kicks it; access is revoked immediately. |
/announce <texto> | Envía un anuncio a toda la sala.Sends an announcement to the whole room. |
Variables de entornoEnvironment variables
Se leen del entorno o, si faltan, de tor_data/runtime.env / .env.local (carpeta actual o junto al ejecutable), una por línea en formato NOMBRE=valor.
They are read from the environment or, if missing, from tor_data/runtime.env / .env.local (current folder or next to the executable), one per line as NAME=value.
ServidorServer
| VariableVariable | Por defectoDefault | UsoPurpose |
|---|---|---|
THE_RIVER_AES_KEY | — | Obligatoria. 32+ caracteres aleatorios. Cifra en disco el historial y los registros. Solo servidor: nunca se entrega a los clientes.Required. 32+ random characters. Encrypts history and logs at rest. Server only: never handed to clients. |
THE_RIVER_ADMIN_BOOTSTRAP_PASSWORD | — | Obligatoria. Contraseña inicial de la cuenta admin. Cámbiala tras el primer arranque.Required. Initial password of the admin account. Change it after first start. |
THE_RIVER_NEW_USER_PASSWORD | — | Obligatoria. Clave inicial de un solo uso para cuentas creadas con /newuser.Required. Single-use initial password for accounts created with /newuser. |
THE_RIVER_ADMIN_USER | admin | Nombre de la cuenta administradora.Name of the admin account. |
THE_RIVER_DB | secure_river.db | Base de datos SQLite de usuarios, claves, historial y cola.SQLite database for users, keys, history and queue. |
THE_RIVER_LOG | chat_history.log | Registro de auditoría sellado.Sealed audit log. |
THE_RIVER_BIND_ADDR | 127.0.0.1 | Dirección de escucha. Déjala en loopback: Tor publica el servicio.Listen address. Keep it on loopback: Tor publishes the service. |
THE_RIVER_PORT | 8888 | Puerto TCP local del servidor (1–65535).Server local TCP port (1–65535). |
Cliente y consola de adminClient and admin console
| VariableVariable | Por defectoDefault | UsoPurpose |
|---|---|---|
THE_RIVER_ONION | — | Obligatoria. Dirección .onion del servidor. Es lo único que necesita el cliente.Required. The server's .onion address. It is all the client needs. |
THE_RIVER_CLIENT_LOG | — | Con 1, escribe client_runtime.log para diagnóstico (sin mensajes ni credenciales).With 1, writes client_runtime.log for troubleshooting (no messages or credentials). |
THE_RIVER_TOR_PROXY_PORT | 9050 | Puerto SOCKS5 de Tor. Con un valor distinto de 9050 el cliente no lanza Tor: debes tenerlo en marcha tú.Tor SOCKS5 port. With anything other than 9050 the client does not launch Tor: you must run it yourself. |
Nunca en el cliente
Never on clients
Con el protocolo 2 los clientes no usan THE_RIVER_AES_KEY. Si alguien te la pide para conectarte, desconfía. Tampoco compartas las contraseñas de arranque.
With protocol 2 clients do not use THE_RIVER_AES_KEY. If someone asks you for it in order to connect, be suspicious. Don't share the bootstrap passwords either.
Montar un servidorRunning a server
- Compila con
./build.shenthe_river_cpp/(ver Compilar). - Build with
./build.shinthe_river_cpp/(see Build from source). - Define los secretos en tu gestor de servicios o en un archivo privado, nunca en el repositorio.
- Set the secrets in your service manager or a private file, never in the repository.
- Configura un servicio oculto de Tor que apunte al puerto local del servidor (el cliente se conecta al puerto 80 del
.onion). - Configure a Tor hidden service pointing at the server's local port (clients connect to port 80 of the
.onion). - Arranca
./the_river_server, entra como admin, cambia la contraseña y crea cuentas con/newuser. - Start
./the_river_server, sign in as admin, change the password and create accounts with/newuser.
# entorno del servidor / server environment (ejemplo / example)
export THE_RIVER_AES_KEY="$(openssl rand -hex 32)" # guárdala / keep it
export THE_RIVER_ADMIN_BOOTSTRAP_PASSWORD="<cambia-esto>"
export THE_RIVER_NEW_USER_PASSWORD="<clave-inicial>"
./the_river_server
# torrc
HiddenServiceDir /var/lib/tor/the_river/
HiddenServicePort 80 127.0.0.1:8888
- Guarda
THE_RIVER_AES_KEY: si cambia, el historial sellado con la clave anterior deja de poder leerse. - Keep
THE_RIVER_AES_KEY: if it changes, history sealed with the old key can no longer be read. - El directorio
HiddenServiceDircontiene la clave privada del.onion. No lo subas a ningún repositorio; si se filtró, rota la dirección. - The
HiddenServiceDirholds the.onionprivate key. Never commit it; if it leaked, rotate the address. - Al actualizar desde v1, las credenciales se migran a SCRAM en el primer arranque. Una fila que no pueda migrarse queda registrada y esa cuenta necesitará
/passwd. - When upgrading from v1, credentials are migrated to SCRAM on first start. A row that cannot be migrated is logged and that account will need
/passwd.
Consola de administraciónAdmin console
La consola the_river_admin se conecta como cualquier cliente, a través de Tor: necesita THE_RIVER_ONION y un proxy Tor local (puerto 9050 o THE_RIVER_TOR_PROXY_PORT). Ejecútala, introduce tus credenciales de admin y escribe /help.
The the_river_admin console connects like any client, through Tor: it needs THE_RIVER_ONION and a local Tor proxy (port 9050 or THE_RIVER_TOR_PROXY_PORT). Run it, enter your admin credentials and type /help.
cd the_river/the_river_cpp
THE_RIVER_ONION=<tu-direccion>.onion ./the_river_admin