~= the river <3>

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

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.

ComandoCommandDescripciónDescription
/helpLista 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.
/usersLista los nodos activos (alias /who).Lists active nodes (alias /who).
/pingMide la latencia de ida y vuelta al servidor.Measures round-trip latency to the server.
/clearLimpia 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.
/logoutCierra 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.
REC 0:16 Grabación real: alice y bob comparan huellas con /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

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.

ComandoCommandDescripciónDescription
/newuserCrea 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).
/usersUsuarios conectados ahora.Users online right now.
/accountsTodas 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.
/bansLista 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

VariableVariablePor defectoDefaultUsoPurpose
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_USERadminNombre de la cuenta administradora.Name of the admin account.
THE_RIVER_DBsecure_river.dbBase de datos SQLite de usuarios, claves, historial y cola.SQLite database for users, keys, history and queue.
THE_RIVER_LOGchat_history.logRegistro de auditoría sellado.Sealed audit log.
THE_RIVER_BIND_ADDR127.0.0.1Dirección de escucha. Déjala en loopback: Tor publica el servicio.Listen address. Keep it on loopback: Tor publishes the service.
THE_RIVER_PORT8888Puerto TCP local del servidor (1–65535).Server local TCP port (1–65535).

Cliente y consola de adminClient and admin console

VariableVariablePor defectoDefaultUsoPurpose
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_PORT9050Puerto 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

  1. Compila con ./build.sh en the_river_cpp/ (ver Compilar).
  2. Build with ./build.sh in the_river_cpp/ (see Build from source).
  3. Define los secretos en tu gestor de servicios o en un archivo privado, nunca en el repositorio.
  4. Set the secrets in your service manager or a private file, never in the repository.
  5. Configura un servicio oculto de Tor que apunte al puerto local del servidor (el cliente se conecta al puerto 80 del .onion).
  6. Configure a Tor hidden service pointing at the server's local port (clients connect to port 80 of the .onion).
  7. Arranca ./the_river_server, entra como admin, cambia la contraseña y crea cuentas con /newuser.
  8. 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

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