diff --git a/CHANGELOG.md b/CHANGELOG.md index cab40ce..b6a06b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.11.0 + +- **Alarms in the history:** a new tab under “History” shows the alarms the RustDesk app + sends, e.g. after more than 6 wrong passwords within a minute or a connection from an + address that is not on the device's allowed list, with the address, ID and name of the + other side. RDAPI stored these reports before, but did not show them. +- **Import and export of address books:** download an address book as JSON or CSV and + import such a file. Existing entries are updated and keep their tags, nothing is deleted. + Passwords saved in the app are never exported or imported. Imports and exports are + recorded in the activity log. +- **Updated dependencies:** FastAPI 0.150.0. The tests use `httpx2` instead of `httpx`, and + the code is checked for Python 3.14. + ## 0.10.8 - **Python 3.14:** the container image is now based on `python:3.14-slim` instead of diff --git a/README.de.md b/README.de.md index 3a36996..5356699 100644 --- a/README.de.md +++ b/README.de.md @@ -38,13 +38,15 @@ Weboberfläche, um alles zu verwalten. - **Anmeldung in der App** mit Benutzername und Passwort, mehrere Benutzer, Admins und normale Benutzer - **Adressbuch** je Benutzer mit Tags, abgeglichen zwischen allen Geräten, auf denen du - angemeldet bist, und auch in der Weboberfläche bearbeitbar + angemeldet bist, und auch in der Weboberfläche bearbeitbar, mit **Import und Export** als + JSON oder CSV - **Geteilte Adressbücher** für Familie oder Team, je Benutzer oder Gruppe mit nur lesen, lesen und ändern oder voller Kontrolle - **Geräteliste** mit Online-Status, Betriebssystem und Version; die App zeigt deine Geräte und die deiner **Gruppen** unter „Zugängliche Geräte“ - **Verbindungsverlauf:** wer sich wann und wie lange mit welchem Gerät verbunden hat, - dazu die Dateien, die während einer Verbindung kopiert wurden + dazu die Dateien, die während einer Verbindung kopiert wurden, und die **Alarme** der + App, z. B. nach vielen falschen Passwörtern - **Weboberfläche** für Geräte, Verlauf, Adressbuch, Benutzer, Anmeldungen und dein Konto, in sechs Sprachen (Deutsch, Englisch, Französisch, Spanisch, Italienisch, Niederländisch), hell und dunkel diff --git a/README.md b/README.md index 56af692..8f5d66c 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,14 @@ devices and a history of incoming connections, plus a web interface to manage it - **Sign-in in the app** with username and password, several users, admins and regular users - **Address book** per user with tags, synchronised between all devices you sign in on and - editable in the web interface as well + editable in the web interface as well, with **import and export** as JSON or CSV - **Shared address books** for the family or the team, per user or group with read only, read and change or full control - **Device list** with online status, operating system and version; the app shows your devices and those of your **groups** under “Accessible devices” - **Connection history:** who connected to which device, when and for how long, plus the - files copied during a connection + files copied during a connection and the **alarms** the app raises, e.g. after many + wrong passwords - **Web interface** for devices, history, address book, users, sign-ins and your account, in six languages (English, German, French, Spanish, Italian, Dutch), light and dark theme - **Two-factor sign-in** with an authenticator app, in the web interface and in the diff --git a/docs/de/usage.md b/docs/de/usage.md index a2f5eb0..e6856b7 100644 --- a/docs/de/usage.md +++ b/docs/de/usage.md @@ -46,7 +46,12 @@ ist angemeldet. In der Weboberfläche steht derselbe Knopf auf der Anmeldeseite. Beginn, Dauer, Art und der Adresse der Gegenseite. Nicht angenommene Versuche sind grau. Auch Dateien, die während einer Verbindung auf oder von einem Gerät kopiert werden (Dateiübertragung oder Kopieren und Einfügen von Dateien), werden festgehalten, mit - Richtung, Ordner, Anzahl und den ersten Dateinamen. + Richtung, Ordner, Anzahl und den ersten Dateinamen. Ebenso die Alarme, die die App auf + einem Gerät auslöst: mehr als 6 falsche Passwörter in einer Minute oder mehr als 30 + insgesamt, zu viele falsche Passwörter aus einem IPv6-Netz, eine Adresse oder ID, die + nicht in der Liste der erlaubten des Geräts steht, eine pausierte oder überlastete + Terminal-Anmeldung und eine Verbindung, die mehr getan hat, als ihr erlaubt war. Jeder + Alarm zeigt die Adresse und, wenn bekannt, ID und Namen der Gegenseite. ## Weboberfläche @@ -56,13 +61,20 @@ der App an. - **Geräte:** Name, ID, Besitzer, Betriebssystem, Version und Online-Status; ein Klick zeigt Details wie CPU und Arbeitsspeicher, die letzten Verbindungen, eine Notiz und den Besitzer, den Admins ändern können -- **Verlauf:** alle eingehenden Verbindungen und auf einem zweiten Reiter alle - Dateiübertragungen, neueste zuerst, nach Gerät filterbar +- **Verlauf:** alle eingehenden Verbindungen und auf weiteren Reitern alle + Dateiübertragungen und Alarme, neueste zuerst, nach Gerät filterbar - **Adressbuch:** Einträge anlegen, bearbeiten und entfernen (ID, Alias, Notiz, Tags) und Tags mit ihren Farben verwalten; Felder, die nur die App kennt, z. B. gespeicherte Passwörter, bleiben erhalten und werden nie angezeigt. Die Reiter oben wechseln zwischen dem eigenen und den geteilten Adressbüchern; Admins legen dort geteilte Adressbücher an - und bestimmen, wer sie sieht + und bestimmen, wer sie sieht. + **Import und Export:** ein Adressbuch als JSON (mit Tag-Farben) oder CSV herunterladen + und eine solche Datei in ein Adressbuch einlesen, das du ändern darfst. Eine CSV-Tabelle + braucht eine Spalte `id`; `alias`, `note`, `tags`, `hostname`, `platform` und `username` + sind freiwillig, mehrere Tags trennt ein Semikolon. Neue IDs kommen dazu, vorhandene + Einträge werden aktualisiert und behalten ihre Tags, gelöscht wird nichts. Gespeicherte + Passwörter werden weder exportiert noch importiert. Höchstens 5.000 Einträge je + Adressbuch - **Benutzer** (nur Admins): Benutzer anlegen, bearbeiten, sperren und löschen, neue Passwörter setzen, jemanden zum Admin machen sowie Gruppen und ihre Mitglieder verwalten - **Anmeldungen** (nur Admins): alle Anmeldeversuche in App und Weboberfläche, diff --git a/docs/en/usage.md b/docs/en/usage.md index c691201..f544011 100644 --- a/docs/en/usage.md +++ b/docs/en/usage.md @@ -43,7 +43,12 @@ page. start, duration, type and the address of the other side. Attempts that were not accepted are shown in grey. Files copied to or from a device during a connection (file transfer or copy and paste of files) are recorded as well, with direction, - folder, number of files and the first file names. + folder, number of files and the first file names. Alarms the app raises on a device are + kept too: more than 6 wrong passwords within a minute or more than 30 in total, too many + wrong passwords from one IPv6 network, an address or ID that is not on the device's + allowed list, a paused or crowded terminal sign-in and a connection that went beyond what + it was allowed to do. Each alarm shows the address and, if known, the ID and name of the + other side. ## Web interface @@ -53,12 +58,18 @@ app. - **Devices:** name, ID, owner, operating system, version and online status; a click shows details such as CPU and memory, the latest connections, a note and the owner, which admins can change -- **History:** all incoming connections and, on a second tab, all file transfers, newest - first, filterable by device +- **History:** all incoming connections and, on further tabs, all file transfers and + alarms, newest first, filterable by device - **Address book:** add, edit and remove entries (ID, alias, note, tags) and manage tags with their colours; fields only the app knows, such as saved passwords, are kept and never shown. The tabs at the top switch between your own and the shared address - books; admins create shared address books there and choose who may see them + books; admins create shared address books there and choose who may see them. + **Import and export:** download an address book as JSON (with tag colours) or CSV, and + import such a file into an address book you may change. A CSV table needs a column + `id`; `alias`, `note`, `tags`, `hostname`, `platform` and `username` are optional, and + several tags are separated by a semicolon. New IDs are added, existing entries are + updated and keep their tags, nothing is deleted. Saved passwords are neither exported + nor imported. At most 5,000 entries per address book - **Users** (admins only): create, edit, disable and delete users, set new passwords, make someone an admin, and manage groups and their members - **Logins** (admins only): all sign-in attempts in the app and the web interface, diff --git a/pyproject.toml b/pyproject.toml index 89c473a..329b52a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "rdapi" version = "0.1.0" description = "Schlanker eigener API-Server für die RustDesk-App" -requires-python = ">=3.11" +requires-python = ">=3.14" [tool.pytest.ini_options] testpaths = ["tests"] @@ -10,7 +10,7 @@ pythonpath = [".", "tests"] [tool.ruff] line-length = 100 -target-version = "py311" +target-version = "py314" [tool.ruff.lint] select = ["E", "F", "W", "I", "B", "UP", "SIM"] diff --git a/rdapi/api.py b/rdapi/api.py index 8fd7b24..a13480e 100644 --- a/rdapi/api.py +++ b/rdapi/api.py @@ -106,7 +106,7 @@ def text(value: Any, limit: int = 255) -> str: def as_int(value: Any) -> int | None: try: return int(value) - except (TypeError, ValueError): + except TypeError, ValueError: return None @@ -960,7 +960,7 @@ async def legacy_ab_post( tags = [text(t, 100) for t in book.get("tags") or [] if text(t, 100)] try: colors = json.loads(book.get("tag_colors") or "{}") - except (TypeError, ValueError): + except TypeError, ValueError: colors = {} if not isinstance(colors, dict): colors = {} diff --git a/rdapi/locales/de.json b/rdapi/locales/de.json index 981241c..49d318c 100644 --- a/rdapi/locales/de.json +++ b/rdapi/locales/de.json @@ -2,6 +2,7 @@ "(leave empty to keep)": "(leer lassen = unverändert)", "1. Scan the code": "1. Code scannen", "2. Confirm": "2. Bestätigen", + "A JSON export from RDAPI or a CSV table with the columns id, alias, note, tags, hostname, platform and username; only id is required, several tags are separated by a semicolon. New IDs are added, existing entries are updated and keep their tags, nothing is deleted.": "Ein JSON-Export aus RDAPI oder eine CSV-Tabelle mit den Spalten id, alias, note, tags, hostname, platform und username; nötig ist nur id, mehrere Tags trennt ein Semikolon. Neue IDs kommen dazu, vorhandene Einträge werden aktualisiert und behalten ihre Tags, gelöscht wird nichts.", "A backup of the database is made every day; the last {count} are kept.": "Die Datenbank wird jeden Tag gesichert; die letzten {count} Sicherungen bleiben erhalten.", "A device belongs to the user who last signed in to the app on it.": "Ein Gerät gehört dem Benutzer, der sich zuletzt in der App darauf angemeldet hat.", "A new password or disabling the user ends all of their sessions.": "Ein neues Passwort oder eine Sperre beendet alle Anmeldungen dieses Benutzers.", @@ -19,7 +20,10 @@ "Added a passkey": "Passkey hinzugefügt", "Address book": "Adressbuch", "Address books": "Adressbücher", + "Address not on the allowed list": "Adresse nicht in der Liste der erlaubten", "Admin": "Admin", + "Alarm": "Alarm", + "Alarms": "Alarme", "Alias": "Name", "All devices that have reported to this server.": "Alle Geräte, die sich bei diesem Server gemeldet haben.", "App": "App", @@ -48,6 +52,7 @@ "Colour": "Farbe", "Concerns": "Betrifft", "Connection history": "Verbindungsverlauf", + "Connection went beyond what it was allowed to do": "Verbindung hat mehr getan, als ihr erlaubt war", "Connections": "Verbindungen", "Copied from this device": "Von diesem Gerät kopiert", "Copied to this device": "Auf dieses Gerät kopiert", @@ -85,6 +90,7 @@ "Done": "Fertig", "Done. The RustDesk app is signing you in; you can close this window.": "Fertig. Die RustDesk-App meldet dich jetzt an; du kannst dieses Fenster schließen.", "Download": "Herunterladen", + "Download the entries with their tags, e.g. to move them to another server or to edit them in a spreadsheet. Passwords saved in the app are not included.": "Lädt die Einträge mit ihren Tags herunter, etwa für den Umzug auf einen anderen Server oder zum Bearbeiten in einer Tabellenkalkulation. In der App gespeicherte Passwörter sind nicht enthalten.", "Downloaded a backup": "Sicherung heruntergeladen", "Duration": "Dauer", "Edit": "Bearbeiten", @@ -92,6 +98,10 @@ "Email": "E-Mail", "End": "Beenden", "Everyone who may sign in to the RustDesk app and the web interface. A click opens the details.": "Alle, die sich in der RustDesk-App und der Weboberfläche anmelden dürfen. Ein Klick öffnet die Details.", + "Export as CSV": "Als CSV exportieren", + "Export as JSON": "Als JSON exportieren", + "Exported an address book": "Adressbuch exportiert", + "File to import": "Datei zum Importieren", "File transfer": "Dateiübertragung", "File transfers": "Dateiübertragungen", "Files": "Dateien", @@ -112,8 +122,13 @@ "History": "Verlauf", "Hostname": "Rechner", "ID": "ID", + "ID not on the allowed list": "ID nicht in der Liste der erlaubten", "IP": "IP", "If you lose your phone, you can sign in with one of these codes instead of the code from the app. Each code works once.": "Wenn du dein Telefon verlierst, kannst du dich mit einem dieser Codes statt mit dem Code aus der App anmelden. Jeder Code funktioniert einmal.", + "Import": "Importieren", + "Import and export": "Import und Export", + "Import finished: {added} new, {updated} updated, {skipped} skipped.": "Import fertig: {added} neu, {updated} aktualisiert, {skipped} übersprungen.", + "Imported entries into an address book": "Einträge in ein Adressbuch importiert", "Incoming connections to all devices.": "Eingehende Verbindungen auf allen Geräten.", "Incoming connections to your devices.": "Eingehende Verbindungen auf deinen Geräten.", "It is in the container log, e.g. via {cmd}. This way nobody else on the network can create the account before you.": "Steht im Protokoll des Containers, zum Beispiel mit {cmd}. So kann niemand anderes im Netz das Konto vor dir anlegen.", @@ -134,6 +149,8 @@ "Members of a group see each other’s devices in the RustDesk app. Shared address books can also be given to a whole group.": "Mitglieder einer Gruppe sehen die Geräte der anderen in der RustDesk-App. Geteilte Adressbücher lassen sich auch einer ganzen Gruppe geben.", "Memory": "Arbeitsspeicher", "Menu": "Menü", + "More than 30 wrong passwords": "Mehr als 30 falsche Passwörter", + "More than 6 wrong passwords within a minute": "Mehr als 6 falsche Passwörter in einer Minute", "My address book": "Mein Adressbuch", "Name": "Name", "New group": "Neue Gruppe", @@ -143,6 +160,7 @@ "New tag": "Neuer Tag", "New user": "Neuer Benutzer", "Newer": "Neuer", + "No alarms.": "Keine Alarme.", "No backups yet.": "Noch keine Sicherungen.", "No connections.": "Keine Verbindungen.", "No devices yet. As soon as this server is set as API server in the RustDesk app, the device shows up here.": "Noch keine Geräte. Sobald in der RustDesk-App dieser Server als API-Server eingetragen ist, erscheint das Gerät hier.", @@ -160,6 +178,7 @@ "Only confirm if you started the sign-in in the app yourself just now.": "Bestätige nur, wenn du die Anmeldung gerade selbst in der App gestartet hast.", "Only if your passkey is not at hand.": "Nur, wenn dein Passkey nicht zur Hand ist.", "Operating system": "Betriebssystem", + "Other alarm ({code})": "Anderer Alarm ({code})", "Owner": "Gehört zu", "Page {page} of {pages} ({total} entries)": "Seite {page} von {pages} ({total} Einträge)", "Pages": "Seiten", @@ -233,6 +252,8 @@ "System user": "Systembenutzer", "Tags": "Tags", "Terminal": "Terminal", + "Terminal sign-in paused after failed attempts": "Terminal-Anmeldung nach Fehlversuchen pausiert", + "The CSV file needs a column named id.": "Die CSV-Datei braucht eine Spalte namens id.", "The address book has been created. Now choose who may see it.": "Das Adressbuch ist angelegt. Lege jetzt fest, wer es sehen darf.", "The address book is still empty.": "Das Adressbuch ist noch leer.", "The backup has been created.": "Die Sicherung wurde erstellt.", @@ -241,6 +262,8 @@ "The backup is damaged.": "Die Sicherung ist beschädigt.", "The backup is from a newer version of RDAPI.": "Die Sicherung stammt von einer neueren Version von RDAPI.", "The current password is wrong.": "Das bisherige Passwort ist falsch.", + "The file has too many entries.": "Die Datei hat zu viele Einträge.", + "The file is not a valid address book export.": "Die Datei ist kein gültiger Adressbuch-Export.", "The file is too large.": "Die Datei ist zu groß.", "The group has been created. Now add its members.": "Die Gruppe ist angelegt. Füge jetzt ihre Mitglieder hinzu.", "The new passwords do not match.": "Die neuen Passwörter stimmen nicht überein.", @@ -274,6 +297,8 @@ "Time": "Zeit", "Too many failed attempts. Please try again later.": "Zu viele Fehlversuche. Bitte später erneut versuchen.", "Too many failed logins. Please try again later.": "Zu viele fehlgeschlagene Anmeldungen. Bitte später erneut versuchen.", + "Too many terminal sign-ins at the same time": "Zu viele Terminal-Anmeldungen gleichzeitig", + "Too many wrong passwords from one IPv6 network": "Zu viele falsche Passwörter aus einem IPv6-Netz", "Turn off": "Ausschalten", "Turn off two-factor sign-in": "Zwei-Faktor-Anmeldung ausschalten", "Turn off two-factor sign-in for {name} and remove their passkeys? Do this only if they lost their phone, passkeys and recovery codes.": "Zwei-Faktor-Anmeldung für {name} ausschalten und die Passkeys entfernen? Nur tun, wenn Telefon, Passkeys und Wiederherstellungscodes verloren sind.", @@ -297,6 +322,8 @@ "Verification code": "Bestätigungscode", "Version": "Version", "Via": "Über", + "Warnings the RustDesk app sent from all devices, e.g. after many wrong passwords.": "Warnungen, die die RustDesk-App von allen Geräten geschickt hat, z. B. nach vielen falschen Passwörtern.", + "Warnings the RustDesk app sent from your devices, e.g. after many wrong passwords.": "Warnungen, die die RustDesk-App von deinen Geräten geschickt hat, z. B. nach vielen falschen Passwörtern.", "Web": "Web", "Welcome to RDAPI. Create your account first; you can add more users afterwards under “Users”.": "Willkommen bei RDAPI. Lege zuerst dein Konto an; weitere Benutzer fügst du danach unter „Benutzer“ hinzu.", "What": "Was", diff --git a/rdapi/locales/es.json b/rdapi/locales/es.json index 499dd69..ad06242 100644 --- a/rdapi/locales/es.json +++ b/rdapi/locales/es.json @@ -2,6 +2,7 @@ "(leave empty to keep)": "(déjalo vacío para conservarla)", "1. Scan the code": "1. Escanea el código", "2. Confirm": "2. Confirma", + "A JSON export from RDAPI or a CSV table with the columns id, alias, note, tags, hostname, platform and username; only id is required, several tags are separated by a semicolon. New IDs are added, existing entries are updated and keep their tags, nothing is deleted.": "Una exportación JSON de RDAPI o una tabla CSV con las columnas id, alias, note, tags, hostname, platform y username; solo id es obligatoria, varias etiquetas se separan con punto y coma. Los ID nuevos se añaden, las entradas existentes se actualizan y conservan sus etiquetas, no se borra nada.", "A backup of the database is made every day; the last {count} are kept.": "Cada día se hace una copia de seguridad de la base de datos; se conservan las últimas {count}.", "A device belongs to the user who last signed in to the app on it.": "Un dispositivo pertenece al usuario que inició sesión en la app por última vez en él.", "A new password or disabling the user ends all of their sessions.": "Una contraseña nueva o desactivar al usuario cierra todas sus sesiones.", @@ -19,7 +20,10 @@ "Added a passkey": "Llave de acceso añadida", "Address book": "Agenda", "Address books": "Agendas", + "Address not on the allowed list": "Dirección fuera de la lista permitida", "Admin": "Admin", + "Alarm": "Alarma", + "Alarms": "Alarmas", "Alias": "Alias", "All devices that have reported to this server.": "Todos los dispositivos que se han comunicado con este servidor.", "App": "App", @@ -48,6 +52,7 @@ "Colour": "Color", "Concerns": "Afecta a", "Connection history": "Historial de conexiones", + "Connection went beyond what it was allowed to do": "La conexión hizo más de lo que tenía permitido", "Connections": "Conexiones", "Copied from this device": "Copiado desde este dispositivo", "Copied to this device": "Copiado a este dispositivo", @@ -85,6 +90,7 @@ "Done": "Listo", "Done. The RustDesk app is signing you in; you can close this window.": "Listo. La app de RustDesk está iniciando tu sesión; puedes cerrar esta ventana.", "Download": "Descargar", + "Download the entries with their tags, e.g. to move them to another server or to edit them in a spreadsheet. Passwords saved in the app are not included.": "Descarga las entradas con sus etiquetas, p. ej. para pasarlas a otro servidor o editarlas en una hoja de cálculo. Las contraseñas guardadas en la app no se incluyen.", "Downloaded a backup": "Copia de seguridad descargada", "Duration": "Duración", "Edit": "Editar", @@ -92,6 +98,10 @@ "Email": "Correo electrónico", "End": "Cerrar", "Everyone who may sign in to the RustDesk app and the web interface. A click opens the details.": "Todas las personas que pueden iniciar sesión en la app RustDesk y en la interfaz web. Un clic abre los detalles.", + "Export as CSV": "Exportar como CSV", + "Export as JSON": "Exportar como JSON", + "Exported an address book": "Exportó una libreta de direcciones", + "File to import": "Archivo para importar", "File transfer": "Transferencia de archivos", "File transfers": "Transferencias de archivos", "Files": "Archivos", @@ -112,8 +122,13 @@ "History": "Historial", "Hostname": "Equipo", "ID": "ID", + "ID not on the allowed list": "ID fuera de la lista permitida", "IP": "IP", "If you lose your phone, you can sign in with one of these codes instead of the code from the app. Each code works once.": "Si pierdes el teléfono, puedes iniciar sesión con uno de estos códigos en lugar del código de la app. Cada código funciona una sola vez.", + "Import": "Importar", + "Import and export": "Importar y exportar", + "Import finished: {added} new, {updated} updated, {skipped} skipped.": "Importación terminada: {added} nuevas, {updated} actualizadas, {skipped} omitidas.", + "Imported entries into an address book": "Importó entradas en una libreta de direcciones", "Incoming connections to all devices.": "Conexiones entrantes en todos los dispositivos.", "Incoming connections to your devices.": "Conexiones entrantes en tus dispositivos.", "It is in the container log, e.g. via {cmd}. This way nobody else on the network can create the account before you.": "Aparece en el registro del contenedor, por ejemplo con {cmd}. Así nadie más en la red puede crear la cuenta antes que tú.", @@ -134,6 +149,8 @@ "Members of a group see each other’s devices in the RustDesk app. Shared address books can also be given to a whole group.": "Los miembros de un grupo ven los dispositivos de los demás en la app RustDesk. Las agendas compartidas también se pueden dar a un grupo entero.", "Memory": "Memoria", "Menu": "Menú", + "More than 30 wrong passwords": "Más de 30 contraseñas incorrectas", + "More than 6 wrong passwords within a minute": "Más de 6 contraseñas incorrectas en un minuto", "My address book": "Mi agenda", "Name": "Nombre", "New group": "Nuevo grupo", @@ -143,6 +160,7 @@ "New tag": "Nueva etiqueta", "New user": "Nuevo usuario", "Newer": "Más recientes", + "No alarms.": "No hay alarmas.", "No backups yet.": "Aún no hay copias de seguridad.", "No connections.": "No hay conexiones.", "No devices yet. As soon as this server is set as API server in the RustDesk app, the device shows up here.": "Aún no hay dispositivos. En cuanto este servidor esté configurado como servidor API en la app de RustDesk, el dispositivo aparecerá aquí.", @@ -160,6 +178,7 @@ "Only confirm if you started the sign-in in the app yourself just now.": "Confirma solo si acabas de iniciar tú mismo el inicio de sesión en la app.", "Only if your passkey is not at hand.": "Solo si no tienes tu llave de acceso a mano.", "Operating system": "Sistema operativo", + "Other alarm ({code})": "Otra alarma ({code})", "Owner": "Propietario", "Page {page} of {pages} ({total} entries)": "Página {page} de {pages} ({total} entradas)", "Pages": "Páginas", @@ -233,6 +252,8 @@ "System user": "Usuario del sistema", "Tags": "Etiquetas", "Terminal": "Terminal", + "Terminal sign-in paused after failed attempts": "Inicio de sesión en terminal pausado tras intentos fallidos", + "The CSV file needs a column named id.": "El archivo CSV necesita una columna llamada id.", "The address book has been created. Now choose who may see it.": "Se ha creado la agenda. Ahora elige quién puede verla.", "The address book is still empty.": "La libreta de direcciones aún está vacía.", "The backup has been created.": "Se ha creado la copia de seguridad.", @@ -241,6 +262,8 @@ "The backup is damaged.": "La copia de seguridad está dañada.", "The backup is from a newer version of RDAPI.": "La copia procede de una versión más reciente de RDAPI.", "The current password is wrong.": "La contraseña actual es incorrecta.", + "The file has too many entries.": "El archivo tiene demasiadas entradas.", + "The file is not a valid address book export.": "El archivo no es una exportación válida de libreta de direcciones.", "The file is too large.": "El archivo es demasiado grande.", "The group has been created. Now add its members.": "Se ha creado el grupo. Ahora añade sus miembros.", "The new passwords do not match.": "Las contraseñas nuevas no coinciden.", @@ -274,6 +297,8 @@ "Time": "Hora", "Too many failed attempts. Please try again later.": "Demasiados intentos fallidos. Inténtalo de nuevo más tarde.", "Too many failed logins. Please try again later.": "Demasiados inicios de sesión fallidos. Inténtalo de nuevo más tarde.", + "Too many terminal sign-ins at the same time": "Demasiados inicios de sesión en terminal a la vez", + "Too many wrong passwords from one IPv6 network": "Demasiadas contraseñas incorrectas desde una red IPv6", "Turn off": "Desactivar", "Turn off two-factor sign-in": "Desactivar el inicio de sesión en dos pasos", "Turn off two-factor sign-in for {name} and remove their passkeys? Do this only if they lost their phone, passkeys and recovery codes.": "¿Desactivar el inicio de sesión en dos pasos de {name} y eliminar sus llaves de acceso? Hazlo solo si ha perdido el teléfono, las llaves de acceso y los códigos de recuperación.", @@ -297,6 +322,8 @@ "Verification code": "Código de verificación", "Version": "Versión", "Via": "Mediante", + "Warnings the RustDesk app sent from all devices, e.g. after many wrong passwords.": "Avisos que la app de RustDesk envió desde todos los dispositivos, p. ej. tras muchas contraseñas incorrectas.", + "Warnings the RustDesk app sent from your devices, e.g. after many wrong passwords.": "Avisos que la app de RustDesk envió desde tus dispositivos, p. ej. tras muchas contraseñas incorrectas.", "Web": "Web", "Welcome to RDAPI. Create your account first; you can add more users afterwards under “Users”.": "Bienvenido a RDAPI. Crea primero tu cuenta; después puedes añadir más usuarios en «Usuarios».", "What": "Qué", diff --git a/rdapi/locales/fr.json b/rdapi/locales/fr.json index 7a0046f..377da18 100644 --- a/rdapi/locales/fr.json +++ b/rdapi/locales/fr.json @@ -2,6 +2,7 @@ "(leave empty to keep)": "(laisser vide pour ne pas changer)", "1. Scan the code": "1. Scanner le code", "2. Confirm": "2. Confirmer", + "A JSON export from RDAPI or a CSV table with the columns id, alias, note, tags, hostname, platform and username; only id is required, several tags are separated by a semicolon. New IDs are added, existing entries are updated and keep their tags, nothing is deleted.": "Un export JSON de RDAPI ou un tableau CSV avec les colonnes id, alias, note, tags, hostname, platform et username ; seule id est obligatoire, plusieurs tags sont séparés par un point-virgule. Les nouveaux ID sont ajoutés, les entrées existantes sont mises à jour et gardent leurs tags, rien n’est supprimé.", "A backup of the database is made every day; the last {count} are kept.": "La base de données est sauvegardée chaque jour ; les {count} dernières sauvegardes sont conservées.", "A device belongs to the user who last signed in to the app on it.": "Un appareil appartient à l’utilisateur qui s’y est connecté en dernier dans l’application.", "A new password or disabling the user ends all of their sessions.": "Un nouveau mot de passe ou la désactivation met fin à toutes les sessions de cet utilisateur.", @@ -19,7 +20,10 @@ "Added a passkey": "Clé d’accès ajoutée", "Address book": "Carnet d’adresses", "Address books": "Carnets d’adresses", + "Address not on the allowed list": "Adresse absente de la liste autorisée", "Admin": "Admin", + "Alarm": "Alarme", + "Alarms": "Alarmes", "Alias": "Nom", "All devices that have reported to this server.": "Tous les appareils qui se sont signalés auprès de ce serveur.", "App": "Application", @@ -48,6 +52,7 @@ "Colour": "Couleur", "Concerns": "Concerne", "Connection history": "Historique des connexions", + "Connection went beyond what it was allowed to do": "La connexion a dépassé ce qui lui était permis", "Connections": "Connexions", "Copied from this device": "Copié depuis cet appareil", "Copied to this device": "Copié vers cet appareil", @@ -85,6 +90,7 @@ "Done": "Terminé", "Done. The RustDesk app is signing you in; you can close this window.": "Terminé. L’application RustDesk vous connecte maintenant ; vous pouvez fermer cette fenêtre.", "Download": "Télécharger", + "Download the entries with their tags, e.g. to move them to another server or to edit them in a spreadsheet. Passwords saved in the app are not included.": "Télécharge les entrées avec leurs tags, par exemple pour les transférer vers un autre serveur ou les modifier dans un tableur. Les mots de passe enregistrés dans l’application ne sont pas inclus.", "Downloaded a backup": "Sauvegarde téléchargée", "Duration": "Durée", "Edit": "Modifier", @@ -92,6 +98,10 @@ "Email": "E-mail", "End": "Terminer", "Everyone who may sign in to the RustDesk app and the web interface. A click opens the details.": "Toutes les personnes qui peuvent se connecter à l’app RustDesk et à l’interface web. Un clic ouvre les détails.", + "Export as CSV": "Exporter en CSV", + "Export as JSON": "Exporter en JSON", + "Exported an address book": "A exporté un carnet d’adresses", + "File to import": "Fichier à importer", "File transfer": "Transfert de fichiers", "File transfers": "Transferts de fichiers", "Files": "Fichiers", @@ -112,8 +122,13 @@ "History": "Historique", "Hostname": "Ordinateur", "ID": "ID", + "ID not on the allowed list": "ID absent de la liste autorisée", "IP": "IP", "If you lose your phone, you can sign in with one of these codes instead of the code from the app. Each code works once.": "Si vous perdez votre téléphone, vous pouvez vous connecter avec l’un de ces codes au lieu du code de l’application. Chaque code ne fonctionne qu’une fois.", + "Import": "Importer", + "Import and export": "Import et export", + "Import finished: {added} new, {updated} updated, {skipped} skipped.": "Import terminé : {added} nouvelles, {updated} mises à jour, {skipped} ignorées.", + "Imported entries into an address book": "A importé des entrées dans un carnet d’adresses", "Incoming connections to all devices.": "Connexions entrantes sur tous les appareils.", "Incoming connections to your devices.": "Connexions entrantes sur vos appareils.", "It is in the container log, e.g. via {cmd}. This way nobody else on the network can create the account before you.": "Il figure dans le journal du conteneur, par exemple avec {cmd}. Ainsi, personne d’autre sur le réseau ne peut créer le compte avant vous.", @@ -134,6 +149,8 @@ "Members of a group see each other’s devices in the RustDesk app. Shared address books can also be given to a whole group.": "Les membres d’un groupe voient les appareils des autres dans l’app RustDesk. Un carnet d’adresses partagé peut aussi être donné à tout un groupe.", "Memory": "Mémoire vive", "Menu": "Menu", + "More than 30 wrong passwords": "Plus de 30 mots de passe erronés", + "More than 6 wrong passwords within a minute": "Plus de 6 mots de passe erronés en une minute", "My address book": "Mon carnet d’adresses", "Name": "Nom", "New group": "Nouveau groupe", @@ -143,6 +160,7 @@ "New tag": "Nouveau tag", "New user": "Nouvel utilisateur", "Newer": "Plus récent", + "No alarms.": "Aucune alarme.", "No backups yet.": "Aucune sauvegarde pour l’instant.", "No connections.": "Aucune connexion.", "No devices yet. As soon as this server is set as API server in the RustDesk app, the device shows up here.": "Aucun appareil pour l’instant. Dès que ce serveur est défini comme serveur API dans l’application RustDesk, l’appareil apparaît ici.", @@ -160,6 +178,7 @@ "Only confirm if you started the sign-in in the app yourself just now.": "Ne confirmez que si vous venez de lancer vous-même la connexion dans l’application.", "Only if your passkey is not at hand.": "Uniquement si votre clé d’accès n’est pas sous la main.", "Operating system": "Système d’exploitation", + "Other alarm ({code})": "Autre alarme ({code})", "Owner": "Propriétaire", "Page {page} of {pages} ({total} entries)": "Page {page} sur {pages} ({total} entrées)", "Pages": "Pages", @@ -233,6 +252,8 @@ "System user": "Utilisateur système", "Tags": "Tags", "Terminal": "Terminal", + "Terminal sign-in paused after failed attempts": "Connexion au terminal suspendue après des échecs", + "The CSV file needs a column named id.": "Le fichier CSV doit avoir une colonne nommée id.", "The address book has been created. Now choose who may see it.": "Le carnet d’adresses a été créé. Choisissez maintenant qui peut le voir.", "The address book is still empty.": "Le carnet d’adresses est encore vide.", "The backup has been created.": "La sauvegarde a été créée.", @@ -241,6 +262,8 @@ "The backup is damaged.": "La sauvegarde est endommagée.", "The backup is from a newer version of RDAPI.": "La sauvegarde provient d’une version plus récente de RDAPI.", "The current password is wrong.": "Le mot de passe actuel est incorrect.", + "The file has too many entries.": "Le fichier contient trop d’entrées.", + "The file is not a valid address book export.": "Le fichier n’est pas un export de carnet d’adresses valide.", "The file is too large.": "Le fichier est trop volumineux.", "The group has been created. Now add its members.": "Le groupe a été créé. Ajoutez maintenant ses membres.", "The new passwords do not match.": "Les nouveaux mots de passe ne correspondent pas.", @@ -274,6 +297,8 @@ "Time": "Heure", "Too many failed attempts. Please try again later.": "Trop de tentatives échouées. Veuillez réessayer plus tard.", "Too many failed logins. Please try again later.": "Trop de connexions échouées. Veuillez réessayer plus tard.", + "Too many terminal sign-ins at the same time": "Trop de connexions au terminal en même temps", + "Too many wrong passwords from one IPv6 network": "Trop de mots de passe erronés depuis un réseau IPv6", "Turn off": "Désactiver", "Turn off two-factor sign-in": "Désactiver la connexion à deux facteurs", "Turn off two-factor sign-in for {name} and remove their passkeys? Do this only if they lost their phone, passkeys and recovery codes.": "Désactiver la connexion à deux facteurs pour {name} et retirer ses clés d’accès ? À ne faire que si le téléphone, les clés d’accès et les codes de récupération sont perdus.", @@ -297,6 +322,8 @@ "Verification code": "Code de vérification", "Version": "Version", "Via": "Via", + "Warnings the RustDesk app sent from all devices, e.g. after many wrong passwords.": "Avertissements envoyés par l’application RustDesk depuis tous les appareils, par ex. après de nombreux mots de passe erronés.", + "Warnings the RustDesk app sent from your devices, e.g. after many wrong passwords.": "Avertissements envoyés par l’application RustDesk depuis vos appareils, par ex. après de nombreux mots de passe erronés.", "Web": "Web", "Welcome to RDAPI. Create your account first; you can add more users afterwards under “Users”.": "Bienvenue dans RDAPI. Créez d’abord votre compte ; vous pourrez ensuite ajouter d’autres utilisateurs sous « Utilisateurs ».", "What": "Quoi", diff --git a/rdapi/locales/it.json b/rdapi/locales/it.json index c93afdd..39523aa 100644 --- a/rdapi/locales/it.json +++ b/rdapi/locales/it.json @@ -2,6 +2,7 @@ "(leave empty to keep)": "(lascia vuoto per non modificare)", "1. Scan the code": "1. Scansiona il codice", "2. Confirm": "2. Conferma", + "A JSON export from RDAPI or a CSV table with the columns id, alias, note, tags, hostname, platform and username; only id is required, several tags are separated by a semicolon. New IDs are added, existing entries are updated and keep their tags, nothing is deleted.": "Un export JSON di RDAPI o una tabella CSV con le colonne id, alias, note, tags, hostname, platform e username; è obbligatoria solo id, più tag si separano con un punto e virgola. I nuovi ID vengono aggiunti, le voci esistenti vengono aggiornate e mantengono i loro tag, non viene eliminato nulla.", "A backup of the database is made every day; the last {count} are kept.": "Ogni giorno viene eseguito un backup del database; vengono conservati gli ultimi {count}.", "A device belongs to the user who last signed in to the app on it.": "Un dispositivo appartiene all’utente che vi ha effettuato l’ultimo accesso nell’app.", "A new password or disabling the user ends all of their sessions.": "Una nuova password o la disattivazione dell’utente chiude tutte le sue sessioni.", @@ -19,7 +20,10 @@ "Added a passkey": "Passkey aggiunta", "Address book": "Rubrica", "Address books": "Rubriche", + "Address not on the allowed list": "Indirizzo non nell’elenco consentito", "Admin": "Admin", + "Alarm": "Allarme", + "Alarms": "Allarmi", "Alias": "Alias", "All devices that have reported to this server.": "Tutti i dispositivi che si sono registrati su questo server.", "App": "App", @@ -48,6 +52,7 @@ "Colour": "Colore", "Concerns": "Riguarda", "Connection history": "Cronologia connessioni", + "Connection went beyond what it was allowed to do": "La connessione ha fatto più di quanto le era consentito", "Connections": "Connessioni", "Copied from this device": "Copiato da questo dispositivo", "Copied to this device": "Copiato su questo dispositivo", @@ -85,6 +90,7 @@ "Done": "Completato", "Done. The RustDesk app is signing you in; you can close this window.": "Completato. L’app RustDesk sta effettuando l’accesso; puoi chiudere questa finestra.", "Download": "Scarica", + "Download the entries with their tags, e.g. to move them to another server or to edit them in a spreadsheet. Passwords saved in the app are not included.": "Scarica le voci con i loro tag, ad es. per spostarle su un altro server o modificarle in un foglio di calcolo. Le password salvate nell’app non sono incluse.", "Downloaded a backup": "Backup scaricato", "Duration": "Durata", "Edit": "Modifica", @@ -92,6 +98,10 @@ "Email": "E-mail", "End": "Termina", "Everyone who may sign in to the RustDesk app and the web interface. A click opens the details.": "Tutte le persone che possono accedere all’app RustDesk e all’interfaccia web. Un clic apre i dettagli.", + "Export as CSV": "Esporta come CSV", + "Export as JSON": "Esporta come JSON", + "Exported an address book": "Ha esportato una rubrica", + "File to import": "File da importare", "File transfer": "Trasferimento file", "File transfers": "Trasferimenti di file", "Files": "File", @@ -112,8 +122,13 @@ "History": "Cronologia", "Hostname": "Nome host", "ID": "ID", + "ID not on the allowed list": "ID non nell’elenco consentito", "IP": "IP", "If you lose your phone, you can sign in with one of these codes instead of the code from the app. Each code works once.": "Se perdi il telefono, puoi accedere con uno di questi codici invece del codice dell’app. Ogni codice funziona una sola volta.", + "Import": "Importa", + "Import and export": "Importa ed esporta", + "Import finished: {added} new, {updated} updated, {skipped} skipped.": "Importazione completata: {added} nuove, {updated} aggiornate, {skipped} saltate.", + "Imported entries into an address book": "Ha importato voci in una rubrica", "Incoming connections to all devices.": "Connessioni in entrata su tutti i dispositivi.", "Incoming connections to your devices.": "Connessioni in entrata sui tuoi dispositivi.", "It is in the container log, e.g. via {cmd}. This way nobody else on the network can create the account before you.": "Si trova nel registro del container, ad es. con {cmd}. Così nessun altro in rete può creare l’account prima di te.", @@ -134,6 +149,8 @@ "Members of a group see each other’s devices in the RustDesk app. Shared address books can also be given to a whole group.": "I membri di un gruppo vedono i dispositivi degli altri nell’app RustDesk. Le rubriche condivise si possono assegnare anche a un intero gruppo.", "Memory": "Memoria", "Menu": "Menu", + "More than 30 wrong passwords": "Più di 30 password errate", + "More than 6 wrong passwords within a minute": "Più di 6 password errate in un minuto", "My address book": "La mia rubrica", "Name": "Nome", "New group": "Nuovo gruppo", @@ -143,6 +160,7 @@ "New tag": "Nuovo tag", "New user": "Nuovo utente", "Newer": "Più recenti", + "No alarms.": "Nessun allarme.", "No backups yet.": "Ancora nessun backup.", "No connections.": "Nessuna connessione.", "No devices yet. As soon as this server is set as API server in the RustDesk app, the device shows up here.": "Ancora nessun dispositivo. Non appena questo server viene impostato come server API nell’app RustDesk, il dispositivo appare qui.", @@ -160,6 +178,7 @@ "Only confirm if you started the sign-in in the app yourself just now.": "Conferma solo se hai appena avviato tu stesso l’accesso nell’app.", "Only if your passkey is not at hand.": "Solo se la tua passkey non è a portata di mano.", "Operating system": "Sistema operativo", + "Other alarm ({code})": "Altro allarme ({code})", "Owner": "Proprietario", "Page {page} of {pages} ({total} entries)": "Pagina {page} di {pages} ({total} voci)", "Pages": "Pagine", @@ -233,6 +252,8 @@ "System user": "Utente di sistema", "Tags": "Tag", "Terminal": "Terminale", + "Terminal sign-in paused after failed attempts": "Accesso al terminale sospeso dopo tentativi falliti", + "The CSV file needs a column named id.": "Il file CSV deve avere una colonna chiamata id.", "The address book has been created. Now choose who may see it.": "La rubrica è stata creata. Ora scegli chi può vederla.", "The address book is still empty.": "La rubrica è ancora vuota.", "The backup has been created.": "Il backup è stato creato.", @@ -241,6 +262,8 @@ "The backup is damaged.": "Il backup è danneggiato.", "The backup is from a newer version of RDAPI.": "Il backup proviene da una versione più recente di RDAPI.", "The current password is wrong.": "La password attuale è errata.", + "The file has too many entries.": "Il file contiene troppe voci.", + "The file is not a valid address book export.": "Il file non è un export di rubrica valido.", "The file is too large.": "Il file è troppo grande.", "The group has been created. Now add its members.": "Il gruppo è stato creato. Ora aggiungi i membri.", "The new passwords do not match.": "Le nuove password non coincidono.", @@ -274,6 +297,8 @@ "Time": "Ora", "Too many failed attempts. Please try again later.": "Troppi tentativi falliti. Riprova più tardi.", "Too many failed logins. Please try again later.": "Troppi accessi falliti. Riprova più tardi.", + "Too many terminal sign-ins at the same time": "Troppi accessi al terminale contemporaneamente", + "Too many wrong passwords from one IPv6 network": "Troppe password errate da una rete IPv6", "Turn off": "Disattiva", "Turn off two-factor sign-in": "Disattiva l’accesso a due fattori", "Turn off two-factor sign-in for {name} and remove their passkeys? Do this only if they lost their phone, passkeys and recovery codes.": "Disattivare l’accesso a due fattori per {name} e rimuovere le sue passkey? Fallo solo se ha perso telefono, passkey e codici di recupero.", @@ -297,6 +322,8 @@ "Verification code": "Codice di verifica", "Version": "Versione", "Via": "Tramite", + "Warnings the RustDesk app sent from all devices, e.g. after many wrong passwords.": "Avvisi inviati dall’app RustDesk da tutti i dispositivi, ad es. dopo molte password errate.", + "Warnings the RustDesk app sent from your devices, e.g. after many wrong passwords.": "Avvisi inviati dall’app RustDesk dai tuoi dispositivi, ad es. dopo molte password errate.", "Web": "Web", "Welcome to RDAPI. Create your account first; you can add more users afterwards under “Users”.": "Benvenuto in RDAPI. Crea prima il tuo account; potrai aggiungere altri utenti in seguito in «Utenti».", "What": "Cosa", diff --git a/rdapi/locales/nl.json b/rdapi/locales/nl.json index c8f0612..f6255c0 100644 --- a/rdapi/locales/nl.json +++ b/rdapi/locales/nl.json @@ -2,6 +2,7 @@ "(leave empty to keep)": "(leeg laten = ongewijzigd)", "1. Scan the code": "1. Code scannen", "2. Confirm": "2. Bevestigen", + "A JSON export from RDAPI or a CSV table with the columns id, alias, note, tags, hostname, platform and username; only id is required, several tags are separated by a semicolon. New IDs are added, existing entries are updated and keep their tags, nothing is deleted.": "Een JSON-export uit RDAPI of een CSV-tabel met de kolommen id, alias, note, tags, hostname, platform en username; alleen id is verplicht, meerdere tags scheid je met een puntkomma. Nieuwe ID’s worden toegevoegd, bestaande items worden bijgewerkt en houden hun tags, er wordt niets verwijderd.", "A backup of the database is made every day; the last {count} are kept.": "Van de database wordt elke dag een back-up gemaakt; de laatste {count} blijven bewaard.", "A device belongs to the user who last signed in to the app on it.": "Een apparaat hoort bij de gebruiker die zich er als laatste in de app op heeft aangemeld.", "A new password or disabling the user ends all of their sessions.": "Een nieuw wachtwoord of het blokkeren van de gebruiker beëindigt al diens sessies.", @@ -19,7 +20,10 @@ "Added a passkey": "Passkey toegevoegd", "Address book": "Adresboek", "Address books": "Adresboeken", + "Address not on the allowed list": "Adres niet op de toegestane lijst", "Admin": "Admin", + "Alarm": "Alarm", + "Alarms": "Alarmen", "Alias": "Naam", "All devices that have reported to this server.": "Alle apparaten die zich bij deze server hebben gemeld.", "App": "App", @@ -48,6 +52,7 @@ "Colour": "Kleur", "Concerns": "Betreft", "Connection history": "Verbindingsgeschiedenis", + "Connection went beyond what it was allowed to do": "Verbinding deed meer dan was toegestaan", "Connections": "Verbindingen", "Copied from this device": "Gekopieerd van dit apparaat", "Copied to this device": "Gekopieerd naar dit apparaat", @@ -85,6 +90,7 @@ "Done": "Klaar", "Done. The RustDesk app is signing you in; you can close this window.": "Klaar. De RustDesk-app meldt je nu aan; je kunt dit venster sluiten.", "Download": "Downloaden", + "Download the entries with their tags, e.g. to move them to another server or to edit them in a spreadsheet. Passwords saved in the app are not included.": "Downloadt de items met hun tags, bijv. om ze naar een andere server te verhuizen of in een spreadsheet te bewerken. In de app opgeslagen wachtwoorden zitten er niet in.", "Downloaded a backup": "Back-up gedownload", "Duration": "Duur", "Edit": "Bewerken", @@ -92,6 +98,10 @@ "Email": "E-mail", "End": "Beëindigen", "Everyone who may sign in to the RustDesk app and the web interface. A click opens the details.": "Iedereen die zich mag aanmelden in de RustDesk-app en de webinterface. Een klik opent de details.", + "Export as CSV": "Exporteren als CSV", + "Export as JSON": "Exporteren als JSON", + "Exported an address book": "Adresboek geëxporteerd", + "File to import": "Bestand om te importeren", "File transfer": "Bestandsoverdracht", "File transfers": "Bestandsoverdrachten", "Files": "Bestanden", @@ -112,8 +122,13 @@ "History": "Geschiedenis", "Hostname": "Computernaam", "ID": "ID", + "ID not on the allowed list": "ID niet op de toegestane lijst", "IP": "IP", "If you lose your phone, you can sign in with one of these codes instead of the code from the app. Each code works once.": "Als je je telefoon kwijtraakt, kun je je met een van deze codes aanmelden in plaats van met de code uit de app. Elke code werkt één keer.", + "Import": "Importeren", + "Import and export": "Importeren en exporteren", + "Import finished: {added} new, {updated} updated, {skipped} skipped.": "Import klaar: {added} nieuw, {updated} bijgewerkt, {skipped} overgeslagen.", + "Imported entries into an address book": "Items in een adresboek geïmporteerd", "Incoming connections to all devices.": "Inkomende verbindingen op alle apparaten.", "Incoming connections to your devices.": "Inkomende verbindingen op je apparaten.", "It is in the container log, e.g. via {cmd}. This way nobody else on the network can create the account before you.": "Staat in het log van de container, bijvoorbeeld met {cmd}. Zo kan niemand anders in het netwerk het account eerder aanmaken dan jij.", @@ -134,6 +149,8 @@ "Members of a group see each other’s devices in the RustDesk app. Shared address books can also be given to a whole group.": "Leden van een groep zien elkaars apparaten in de RustDesk-app. Gedeelde adresboeken kun je ook aan een hele groep geven.", "Memory": "Werkgeheugen", "Menu": "Menu", + "More than 30 wrong passwords": "Meer dan 30 verkeerde wachtwoorden", + "More than 6 wrong passwords within a minute": "Meer dan 6 verkeerde wachtwoorden binnen een minuut", "My address book": "Mijn adresboek", "Name": "Naam", "New group": "Nieuwe groep", @@ -143,6 +160,7 @@ "New tag": "Nieuwe tag", "New user": "Nieuwe gebruiker", "Newer": "Nieuwer", + "No alarms.": "Geen alarmen.", "No backups yet.": "Nog geen back-ups.", "No connections.": "Geen verbindingen.", "No devices yet. As soon as this server is set as API server in the RustDesk app, the device shows up here.": "Nog geen apparaten. Zodra deze server in de RustDesk-app als API-server is ingesteld, verschijnt het apparaat hier.", @@ -160,6 +178,7 @@ "Only confirm if you started the sign-in in the app yourself just now.": "Bevestig alleen als je de aanmelding zojuist zelf in de app hebt gestart.", "Only if your passkey is not at hand.": "Alleen als je passkey niet bij de hand is.", "Operating system": "Besturingssysteem", + "Other alarm ({code})": "Ander alarm ({code})", "Owner": "Eigenaar", "Page {page} of {pages} ({total} entries)": "Pagina {page} van {pages} ({total} items)", "Pages": "Pagina’s", @@ -233,6 +252,8 @@ "System user": "Systeemgebruiker", "Tags": "Tags", "Terminal": "Terminal", + "Terminal sign-in paused after failed attempts": "Terminal-aanmelding gepauzeerd na mislukte pogingen", + "The CSV file needs a column named id.": "Het CSV-bestand heeft een kolom met de naam id nodig.", "The address book has been created. Now choose who may see it.": "Het adresboek is aangemaakt. Kies nu wie het mag zien.", "The address book is still empty.": "Het adresboek is nog leeg.", "The backup has been created.": "De back-up is gemaakt.", @@ -241,6 +262,8 @@ "The backup is damaged.": "De back-up is beschadigd.", "The backup is from a newer version of RDAPI.": "De back-up komt van een nieuwere versie van RDAPI.", "The current password is wrong.": "Het huidige wachtwoord is onjuist.", + "The file has too many entries.": "Het bestand bevat te veel items.", + "The file is not a valid address book export.": "Het bestand is geen geldige adresboekexport.", "The file is too large.": "Het bestand is te groot.", "The group has been created. Now add its members.": "De groep is aangemaakt. Voeg nu de leden toe.", "The new passwords do not match.": "De nieuwe wachtwoorden komen niet overeen.", @@ -274,6 +297,8 @@ "Time": "Tijd", "Too many failed attempts. Please try again later.": "Te veel mislukte pogingen. Probeer het later opnieuw.", "Too many failed logins. Please try again later.": "Te veel mislukte aanmeldingen. Probeer het later opnieuw.", + "Too many terminal sign-ins at the same time": "Te veel terminal-aanmeldingen tegelijk", + "Too many wrong passwords from one IPv6 network": "Te veel verkeerde wachtwoorden vanuit één IPv6-netwerk", "Turn off": "Uitschakelen", "Turn off two-factor sign-in": "Tweestapsaanmelding uitschakelen", "Turn off two-factor sign-in for {name} and remove their passkeys? Do this only if they lost their phone, passkeys and recovery codes.": "Tweestapsaanmelding voor {name} uitschakelen en de passkeys verwijderen? Doe dit alleen als telefoon, passkeys en herstelcodes kwijt zijn.", @@ -297,6 +322,8 @@ "Verification code": "Verificatiecode", "Version": "Versie", "Via": "Via", + "Warnings the RustDesk app sent from all devices, e.g. after many wrong passwords.": "Waarschuwingen die de RustDesk-app vanaf alle apparaten heeft gestuurd, bijv. na veel verkeerde wachtwoorden.", + "Warnings the RustDesk app sent from your devices, e.g. after many wrong passwords.": "Waarschuwingen die de RustDesk-app vanaf je apparaten heeft gestuurd, bijv. na veel verkeerde wachtwoorden.", "Web": "Web", "Welcome to RDAPI. Create your account first; you can add more users afterwards under “Users”.": "Welkom bij RDAPI. Maak eerst je account aan; daarna voeg je onder ‘Gebruikers’ meer gebruikers toe.", "What": "Wat", diff --git a/rdapi/secretbox.py b/rdapi/secretbox.py index 2963a33..705be06 100644 --- a/rdapi/secretbox.py +++ b/rdapi/secretbox.py @@ -47,7 +47,7 @@ def open_(secret_key: str, value: str) -> str: try: data = base64.urlsafe_b64decode(value[len(PREFIX) :]) return _aead(secret_key).decrypt(data[:12], data[12:], None).decode() - except (ValueError, InvalidTag): + except ValueError, InvalidTag: return "" diff --git a/rdapi/security.py b/rdapi/security.py index cc42519..ae4b85c 100644 --- a/rdapi/security.py +++ b/rdapi/security.py @@ -55,7 +55,7 @@ def authenticate(conn: sqlite3.Connection, username: str, password: str) -> sqli return None try: _hasher.verify(row["password_hash"], password) - except (VerifyMismatchError, VerificationError, InvalidHashError): + except VerifyMismatchError, VerificationError, InvalidHashError: return None if _hasher.check_needs_rehash(row["password_hash"]): conn.execute( diff --git a/rdapi/templates/_history_tabs.html b/rdapi/templates/_history_tabs.html index eb203da..5172683 100644 --- a/rdapi/templates/_history_tabs.html +++ b/rdapi/templates/_history_tabs.html @@ -2,4 +2,5 @@ diff --git a/rdapi/templates/address_book.html b/rdapi/templates/address_book.html index 38ffb8b..9344652 100644 --- a/rdapi/templates/address_book.html +++ b/rdapi/templates/address_book.html @@ -125,6 +125,30 @@
{{ _('Download the entries with their tags, e.g. to move them to another server or to edit them in a spreadsheet. Passwords saved in the app are not included.') }}
+ + {% endif %} + {% if book.writable %} + + {% elif not peers %} +{{ _('The address book is still empty.') }}
+ {% endif %} +
+ {% if user.is_admin %}{{ _('Warnings the RustDesk app sent from all devices, e.g. after many wrong passwords.') }}{% else %}{{ _('Warnings the RustDesk app sent from your devices, e.g. after many wrong passwords.') }}{% endif %}
+ {% if device %}
{{ _('Filtered to device') }} {{ device }} · {{ _('Clear filter') }}{% endif %}
+
| {{ _('Time') }} | {{ _('On device') }} | {{ _('Alarm') }} | {{ _('From') }} | {{ _('IP') }} |
|---|---|---|---|---|
| {{ a.created_at | dt }} | +{{ a.device_id }}{% if a.hostname %} {{ a.hostname }}{% endif %} |
+
+ {% if a.typ in ALARM_TYPES %}{{ _(ALARM_TYPES[a.typ]) }}{% else %}{{ _('Other alarm ({code})', code=a.typ if a.typ is not none else '?') }}{% endif %}
+ {% if a.message %} {{ a.message }}{% endif %} + |
+ {% if a.peer_id %}{{ a.peer_id }} {{ a.peer_name }}{% else %}{{ a.peer_name or "–" }}{% endif %} |
+ {{ a.ip or "–" }} | +
{{ _('No alarms.') }}
+{% endif %} +{% set pager_query = 'device=' ~ (device | urlencode) ~ '&' if device else '' %} +{% include "_pager.html" %} +{% endblock %} diff --git a/rdapi/web.py b/rdapi/web.py index 3799479..f583240 100644 --- a/rdapi/web.py +++ b/rdapi/web.py @@ -7,6 +7,8 @@ from __future__ import annotations +import csv +import io import json import re import secrets @@ -27,7 +29,7 @@ from fastapi.templating import Jinja2Templates from . import __version__, backup, i18n, oidc, passkeys, secretbox, sharing -from .api import add_tag, load_peer, rewrite_peer_tags, save_peer +from .api import MAX_AB_PEERS, add_tag, load_peer, rewrite_peer_tags, save_peer from .config import Settings from .db import connect, now, transaction from .deps import client_ip, get_db, limiter, public_limiter, settings @@ -225,13 +227,14 @@ def render( **ctx: Any, ) -> HTMLResponse: message = MESSAGES.get(request.query_params.get("ok", "")) + message = _(message) if message else ctx.pop("message", None) cfg = request.app.state.settings ctx.update( user=user, csrf=user["t_csrf"] if user is not None else "", sso_name=cfg.oidc_name if cfg.oidc_enabled else "", passkey_login=name == "login.html" and _any_passkeys(cfg.db_path), - message=_(message) if message else None, + message=message, online_after=now() - cfg.online_seconds, ) ctx.setdefault("error", None) @@ -854,7 +857,7 @@ def _file_event(row: sqlite3.Row) -> dict[str, Any]: data = {} try: info = json.loads(data.get("info") or "{}") - except (TypeError, ValueError): + except TypeError, ValueError: info = {} if not isinstance(info, dict): info = {} @@ -911,6 +914,83 @@ def history_files( ) +# Alarmarten, wie die App sie meldet (AlarmAuditType); 3–5 nutzt die App nicht mehr. +ALARM_TYPES = { + 0: "Address not on the allowed list", + 1: "More than 30 wrong passwords", + 2: "More than 6 wrong passwords within a minute", + 6: "Too many wrong passwords from one IPv6 network", + 7: "Terminal sign-in paused after failed attempts", + 8: "Too many terminal sign-ins at the same time", + 9: "Connection went beyond what it was allowed to do", + 10: "ID not on the allowed list", +} + + +def _alarm_event(row: sqlite3.Row) -> dict[str, Any]: + """Ein Alarm der App (Audit „alarm“) für die Anzeige.""" + try: + data = json.loads(row["payload"]) + except ValueError: + data = {} + if not isinstance(data, dict): + data = {} + try: + info = json.loads(data.get("info") or "{}") + except TypeError, ValueError: + info = {} + if not isinstance(info, dict): + info = {} + typ = data.get("typ") + return { + "created_at": row["created_at"], + "device_id": row["device_id"], + "hostname": row["hostname"], + "typ": typ if isinstance(typ, int) and not isinstance(typ, bool) else None, + "peer_id": str(info.get("id") or "")[:64], + "peer_name": str(info.get("name") or "")[:100], + "ip": str(info.get("ip") or "")[:64], + "message": str(info.get("message") or "")[:200], + } + + +@router.get("/history/alarms", response_class=HTMLResponse) +def history_alarms( + request: Request, + device: str = "", + page: int = 1, + user: sqlite3.Row = Depends(web_user), + conn: sqlite3.Connection = Depends(get_db), +) -> HTMLResponse: + where, params = ["a.kind = 'alarm'"], [] + if not user["is_admin"]: + where.append("d.user_id = ?") + params.append(user["id"]) + if device: + where.append("a.device_id = ?") + params.append(device) + base = "FROM audit_events a LEFT JOIN devices d ON d.id = a.device_id WHERE " + " AND ".join( + where + ) + total = conn.execute(f"SELECT COUNT(*) {base}", params).fetchone()[0] + page, pages, offset = _pages(total, page, PAGE_SIZE) + rows = conn.execute( + f"SELECT a.*, d.hostname {base} ORDER BY a.created_at DESC, a.id DESC LIMIT ? OFFSET ?", + (*params, PAGE_SIZE, offset), + ).fetchall() + return render( + request, + "history_alarms.html", + user, + rows=[_alarm_event(r) for r in rows], + device=device, + page=page, + pages=pages, + total=total, + ALARM_TYPES=ALARM_TYPES, + ) + + @router.get("/history", response_class=HTMLResponse) def history( request: Request, @@ -1007,6 +1087,7 @@ def _ab_page( book: sharing.Book, error: str | None = None, edit: dict[str, Any] | None = None, + message: str | None = None, ) -> HTMLResponse: tags = conn.execute( "SELECT name, color FROM ab_tags WHERE ab_guid = ? ORDER BY position", (book.guid,) @@ -1045,6 +1126,7 @@ def _ab_page( color_css="/address-book/colors.css?c=" + ",".join(used), edit=edit, error=error, + message=message, RULES=sharing.RULES, **admin_ctx, ) @@ -1177,6 +1259,221 @@ def address_book_delete_tag( return redirect(_ab_url(chosen), "deleted") +# Import und Export: nur Felder, die man auch in der Weboberfläche sieht. Gespeicherte +# Passwörter der App (hash, password) verlassen den Server nie und lassen sich nicht setzen. +EXPORT_FIELDS = ("id", "alias", "note", "tags", "hostname", "platform", "username") +FIELD_LIMITS = {"alias": 100, "note": 500, "hostname": 100, "platform": 100, "username": 100} +EXPORT_FORMAT = "rdapi-address-book" +MAX_IMPORT = 2 * 1024 * 1024 - 64 * 1024 # passt mit dem Formular in die Grenze der Anfrage +CSV_TAG_SEPARATOR = ";" +IMPORT_RESULT = "Import finished: {added} new, {updated} updated, {skipped} skipped." + + +def _export_name(book: sharing.Book, user: sqlite3.Row, suffix: str) -> str: + base = user["username"] if book.personal else book.name + slug = re.sub(r"[^A-Za-z0-9._-]+", "-", base).strip("-.")[:60] or "shared" + return f"address-book-{slug}.{suffix}" + + +def _csv_cell(value: str) -> str: + """Schützt Tabellenprogramme vor Formeln in Feldern (CSV-Injection).""" + return "'" + value if value[:1] in ("=", "+", "-", "@", "\t", "\r") else value + + +@router.get("/address-book/export") +def address_book_export( + request: Request, + book: str = "", + format: str = "json", + user: sqlite3.Row = Depends(web_user), + conn: sqlite3.Connection = Depends(get_db), +) -> Response: + chosen = _book(conn, user, book) + tags = conn.execute( + "SELECT name, color FROM ab_tags WHERE ab_guid = ? ORDER BY position", (chosen.guid,) + ).fetchall() + peers = [] + for r in conn.execute( + "SELECT data FROM ab_peers WHERE ab_guid = ? ORDER BY position", (chosen.guid,) + ): + data = json.loads(r["data"]) + peer = {k: data[k] for k in EXPORT_FIELDS if isinstance(data.get(k), str) and data[k]} + peer["tags"] = [t for t in data.get("tags") or [] if isinstance(t, str)] + peers.append(peer) + log_activity( + conn, + user, + "ab_exported", + user["username"] if chosen.personal else chosen.name, + f"{len(peers)} entries, {'csv' if format == 'csv' else 'json'}", + ip=client_ip(request), + ) + if format == "csv": + out = io.StringIO() + out.write("\ufeff") # damit Tabellenprogramme Umlaute als UTF-8 erkennen + writer = csv.writer(out) + writer.writerow(EXPORT_FIELDS) + for p in peers: + writer.writerow( + [ + _csv_cell(CSV_TAG_SEPARATOR.join(p["tags"]) if k == "tags" else p.get(k, "")) + for k in EXPORT_FIELDS + ] + ) + body, media, suffix = out.getvalue(), "text/csv; charset=utf-8", "csv" + else: + body = json.dumps( + { + "format": EXPORT_FORMAT, + "version": 1, + "name": "" if chosen.personal else chosen.name, + "tags": [{"name": t["name"], "color": _color_hex(t["color"])} for t in tags], + "peers": peers, + }, + ensure_ascii=False, + indent=2, + ) + media, suffix = "application/json", "json" + return Response( + body, + media_type=media, + headers={ + "Content-Disposition": f'attachment; filename="{_export_name(chosen, user, suffix)}"', + "Cache-Control": "no-store", + }, + ) + + +class AddressBookFileError(ValueError): + """Datei lässt sich nicht als Adressbuch lesen; die Meldung ist schon übersetzt.""" + + +def _clean_import_peer(raw: dict[str, Any]) -> dict[str, Any] | None: + peer_id = "".join(str(raw.get("id") or "").split())[:64] + if not peer_id: + return None + peer: dict[str, Any] = {"id": peer_id} + for key, limit in FIELD_LIMITS.items(): + value = raw.get(key) + if isinstance(value, str) and value.strip(): + peer[key] = value.strip()[:limit] + tags = raw.get("tags") + if isinstance(tags, str): + tags = tags.split(CSV_TAG_SEPARATOR) + if isinstance(tags, list): + names = [t.strip()[:100] for t in tags if isinstance(t, str) and t.strip()] + peer["tags"] = list(dict.fromkeys(names)) + return peer + + +def _parse_import(content: bytes) -> tuple[list[dict[str, Any]], dict[str, int], int]: + """Liest eine Export-Datei (JSON) oder eine CSV-Tabelle mit Spalte „id“. + Ergibt Einträge, Tag-Farben und die Zahl der Zeilen ohne ID.""" + try: + textual = content.decode("utf-8-sig") + except UnicodeDecodeError: + raise AddressBookFileError(_("The file is not a valid address book export.")) from None + colors: dict[str, int] = {} + if textual.lstrip().startswith("{"): + try: + data = json.loads(textual) + except ValueError: + raise AddressBookFileError(_("The file is not a valid address book export.")) from None + if not isinstance(data, dict) or not isinstance(data.get("peers"), list): + raise AddressBookFileError(_("The file is not a valid address book export.")) + rows = [p for p in data["peers"] if isinstance(p, dict)] + for t in data.get("tags") or []: + if isinstance(t, dict) and isinstance(t.get("name"), str) and t["name"].strip(): + colors[t["name"].strip()[:100]] = _color_int(str(t.get("color") or "")) + else: + # Tabellenprogramme mit deutscher Einstellung speichern CSV mit Semikolon. + head = textual.split("\n", 1)[0] + delimiter = ";" if head.count(";") > head.count(",") else "," + reader = csv.DictReader(io.StringIO(textual), delimiter=delimiter) + fields = {(f or "").strip().lower(): f for f in reader.fieldnames or []} + if "id" not in fields: + raise AddressBookFileError(_("The CSV file needs a column named id.")) + rows = [ + {k: (row.get(orig) or "") for k, orig in fields.items() if k in EXPORT_FIELDS} + for row in reader + ] + if len(rows) > MAX_AB_PEERS: + raise AddressBookFileError(_("The file has too many entries.")) + peers, skipped = [], 0 + for raw in rows: + peer = _clean_import_peer(raw) + if peer is None: + skipped += 1 + else: + peers.append(peer) + return peers, colors, skipped + + +@router.post("/address-book/import") +async def address_book_import( + request: Request, + csrf: str = Form(""), + book: str = Form(""), + file: UploadFile = File(...), + user: sqlite3.Row = Depends(web_user), + conn: sqlite3.Connection = Depends(get_db), +) -> Response: + """Ergänzt das Adressbuch: neue IDs kommen dazu, vorhandene Einträge bekommen die Felder + aus der Datei, Tags werden hinzugefügt. Gelöscht wird nichts.""" + check_csrf(user, csrf) + chosen = _book(conn, user, book, write=True) + content = await file.read(MAX_IMPORT + 1) + if len(content) > MAX_IMPORT: + return _ab_page(request, user, conn, chosen, _("The file is too large.")) + try: + peers, colors, skipped = _parse_import(content) + except AddressBookFileError as exc: + return _ab_page(request, user, conn, chosen, str(exc)) + guid = chosen.guid + added = updated = 0 + with transaction(conn): + existing = conn.execute( + "SELECT COUNT(*) FROM ab_peers WHERE ab_guid = ?", (guid,) + ).fetchone()[0] + known = { + r["name"] for r in conn.execute("SELECT name FROM ab_tags WHERE ab_guid = ?", (guid,)) + } + for name in dict.fromkeys([*colors, *(t for p in peers for t in p.get("tags", []))]): + if name not in known: + add_tag(conn, guid, name, colors.get(name, _color_int(""))) + known.add(name) + for peer in peers: + current = load_peer(conn, guid, peer["id"]) + if current is None: + if existing + added >= MAX_AB_PEERS: + skipped += 1 + continue + added += 1 + current = {} + else: + updated += 1 + tags = current.get("tags") if isinstance(current.get("tags"), list) else [] + peer["tags"] = list(dict.fromkeys([*tags, *peer.get("tags", [])])) + current.update(peer) + current.setdefault("tags", []) + save_peer(conn, guid, current) + log_activity( + conn, + user, + "ab_imported", + user["username"] if chosen.personal else chosen.name, + f"{added} new, {updated} updated, {skipped} skipped", + ip=client_ip(request), + ) + return _ab_page( + request, + user, + conn, + chosen, + message=_(IMPORT_RESULT, added=added, updated=updated, skipped=skipped), + ) + + # Geteilte Adressbücher verwalten (nur Admins) @@ -1871,6 +2168,8 @@ def groups_delete( "sso_linked": "Linked the account for single sign-on", "device_owner": "Changed the owner of a device", "device_deleted": "Removed a device", + "ab_imported": "Imported entries into an address book", + "ab_exported": "Exported an address book", "backup_created": "Created a backup", "backup_downloaded": "Downloaded a backup", "backup_uploaded": "Uploaded a backup", diff --git a/requirements-dev.txt b/requirements-dev.txt index ac09f6b..5f0daeb 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -r requirements.txt pytest==9.1.1 -httpx==0.28.1 +httpx2==2.16.0 ruff==0.17.1 diff --git a/tests/test_alarms_and_transfer.py b/tests/test_alarms_and_transfer.py new file mode 100644 index 0000000..4417cb3 --- /dev/null +++ b/tests/test_alarms_and_transfer.py @@ -0,0 +1,225 @@ +from __future__ import annotations + +import csv +import io +import json + +from conftest import USER_PW, app_login, web_login +from test_sharing import _share, _shared_book, _user_id + +from rdapi.db import now + + +def _alarm(client, typ, info: dict, nonce: str, device: str = "111222333"): + body = {"id": device, "uuid": "dXVpZA==", "typ": typ, "info": json.dumps(info), "nonce": nonce} + assert client.post("/api/audit/alarm", json=body).content == b"" + + +def test_alarms_in_history(client, db): + app_login(client, device="111222333") + client.post("/api/sysinfo", json={"id": "111222333", "uuid": "dXVpZA==", "hostname": "PC"}) + _alarm(client, 2, {"ip": "198.51.100.9", "id": "444555666", "name": "Fremd"}, "a") + _alarm(client, 9, {"ip": "198.51.100.10", "message": "file transfer denied"}, "b") + _alarm(client, 42, {"ip": "198.51.100.11"}, "c") + web_login(client, "alice", USER_PW) + page = client.get("/history/alarms").text + assert "More than 6 wrong passwords within a minute" in page + assert "444555666" in page and "Fremd" in page and "198.51.100.9" in page + assert "Connection went beyond what it was allowed to do" in page + assert "file transfer denied" in page + assert "Other alarm (42)" in page + assert 'href="/history/alarms"' in client.get("/history").text + # Filter auf ein Gerät und fremde Geräte. + assert client.get("/history/alarms?device=999").text.count("