Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 4 additions & 2 deletions README.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 16 additions & 4 deletions docs/de/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down
19 changes: 15 additions & 4 deletions docs/en/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
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"]
pythonpath = [".", "tests"]

[tool.ruff]
line-length = 100
target-version = "py311"
target-version = "py314"

[tool.ruff.lint]
select = ["E", "F", "W", "I", "B", "UP", "SIM"]
Expand Down
4 changes: 2 additions & 2 deletions rdapi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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 = {}
Expand Down
27 changes: 27 additions & 0 deletions rdapi/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -85,13 +90,18 @@
"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",
"Edit entry": "Eintrag bearbeiten",
"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",
Expand All @@ -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.",
Expand All @@ -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",
Expand All @@ -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.",
Expand All @@ -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",
Expand Down Expand Up @@ -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.",
Expand All @@ -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.",
Expand Down Expand Up @@ -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.",
Expand All @@ -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",
Expand Down
Loading
Loading