real-debrid-downloader/src/main
Sucukdeluxe c8beaf96ed Ferndiagnose (MCP): Verbindungscode + abgesicherter Fernzugriff + stdio-Bridge
Neue Funktion, um Diagnose eines laufenden Servers aus der Ferne zu ermoeglichen:
Hilfe -> Remote-Support -> "Ferndiagnose (MCP)". Erzeugt einen Verbindungscode,
den der Assistent nutzt, um Status, Logs, Fehler und Accounts read-only zu lesen.

App-Seite:
- Live (re)startbarer Debug-Server ohne App-Neustart (restartDebugServer wartet auf
  'close' + closeAllConnections, behandelt EADDRINUSE).
- IP-Allowlist (debug_allowlist.txt, exakte IP + CIDR), erzwungen VOR der Auth.
  Fail-closed: Netzwerk-Bind (0.0.0.0) ohne Allowlist akzeptiert nur Loopback.
- One-Click Aktivieren/Aktualisieren/Deaktivieren + Token-Rotation (alter Code sofort
  ungueltig). Sichtbarkeit waehlbar: "Nur lokal" (Tunnel-Empfehlung) vs "Im Netzwerk".
- Verbindungscode rddiag:v1:base64url({v,h,p,t,n?,fp?,s?}); oeffentlicher Host frei
  waehlbar, Netzwerk-IPs als Schnellauswahl.
- Neue IPC: get/enable/disable/rotate Remote-Diagnostics; Controller-Methoden; Typen.

Bridge (tools/rd-diagnostics-mcp, standalone, KEINE App-Dependency):
- stdio MCP-Server (@modelcontextprotocol/sdk) mit 14 Tools, proxyt die bestehende
  HTTP-Debug-API. Multi-Server ueber code/server/RDDIAG_CODE/RDDIAG_SERVERS.
- TLS-Fingerprint-Pinning auf secureConnect (vor Token-Versand), falls https genutzt.
- test/harness.mjs: faehrt einen Fake-Debug-Server hoch und treibt die Bridge als
  echten stdio-Child per JSON-RPC -> voller Protokollpfad gruen.

Sicherheit (Audit): keine persistenten Secrets in den Logs der Debug-API (Passwoerter
redigiert, keine Debrid-Keys/aufgeloesten Download-URLs geloggt; settings/accounts
redigiert). Empfohlener Transport: Loopback + privater Tunnel; Direkt-Bind nur mit
Allowlist in vertrauenswuerdigen Netzen.

Tests: connection-code-Cross-Check (App-Encoder <-> Bridge-Decoder), Allowlist-Matrix
(Loopback, exakt, CIDR, fail-closed, Live-Restart). Volle Suite 905 gruen, tsc=6.
2026-06-19 17:05:28 +02:00
..
account-check.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
account-rotation-log.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
all-debrid-web.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
app-controller.ts Ferndiagnose (MCP): Verbindungscode + abgesicherter Fernzugriff + stdio-Bridge 2026-06-19 17:05:28 +02:00
audit-log.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
backup-crypto.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
backup-payload.ts Backup: nur Settings als Default + 4 Selektions/Flicker-Bugfixes 2026-06-07 04:40:54 +02:00
bestdebrid-web.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
cleanup.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
connection-code.ts Ferndiagnose (MCP): Verbindungscode + abgesicherter Fernzugriff + stdio-Bridge 2026-06-19 17:05:28 +02:00
constants.ts UI Phase 2: Einstellungen-Tab neu strukturiert (Untergruppen + Erklaertexte) + konfigurierbarer Verlauf (Obergrenze + Zeitlimit) 2026-06-15 00:49:19 +02:00
container.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
conversion-trace.ts Diagnose: Vollstaendiges Conversion-Trace-Logging (conversion.log) fuer haengende/langsame Link-Umwandlung 2026-06-17 02:52:44 +02:00
debrid.ts Fix: Mega-Debrid 'Linkgenerierung lieferte kein Ergebnis' nicht mehr als 30s-Cooldown (schneller Transient) 2026-06-17 20:38:32 +02:00
debug-server.ts Ferndiagnose (MCP): Verbindungscode + abgesicherter Fernzugriff + stdio-Bridge 2026-06-19 17:05:28 +02:00
debug-setup.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
desktop-rename-log.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
download-completion.ts Fix: Stille Datei-Korruption auf Windows bei vorab-allozierten Downloads (Null-Bytes am Ende) 2026-06-17 04:48:11 +02:00
download-manager.ts Fix: Statistik-Doppelzaehlung bei Retry + Debrid-Link Key-Cooldown bei Abbruch (Nutzer-Nachforderung Audit) 2026-06-17 20:23:28 +02:00
error-ring.ts Add extended diagnostics logging 2026-06-07 17:00:06 +02:00
extractor.ts Fix: Nicht-Archiv-".00x"-Dateien werden beim Aufräumen nicht mehr gelöscht (Datenverlust) 2026-06-17 04:52:54 +02:00
fs-error.ts Add extended diagnostics logging 2026-06-07 17:00:06 +02:00
integrity.ts Fix: Falsch benannte Hash-Manifeste löschen keine korrekten Dateien mehr 2026-06-17 05:07:13 +02:00
item-log.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
link-export.ts Add package and item link export 2026-03-09 04:11:18 +01:00
link-parser.ts Add package and item link export 2026-03-09 04:11:18 +01:00
log-timestamp.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
logger.ts Fix: Logger-Flush konnte ungeschriebene Zeilen verlieren (Race mit 1MB-Cap) 2026-06-08 22:33:11 +02:00
main.ts Ferndiagnose (MCP): Verbindungscode + abgesicherter Fernzugriff + stdio-Bridge 2026-06-19 17:05:28 +02:00
mega-public-api.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
mega-web-fallback.ts Fix: Mega-Web Selbst-Cooldown bei belegter Queue + Legacy-Config Mega-Demotion (Audit Runde 9+10) 2026-06-17 14:23:41 +02:00
notify.ts Fix: Webhook-Zustellung haertbar — Discord-Rate-Limit, Retries, Kappung, Logging 2026-06-10 00:17:57 +02:00
package-log.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
realdebrid-web.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
realdebrid.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
rename-log.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
session-log.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
startup-health-check.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
storage.ts Fix: Mega-Web Selbst-Cooldown bei belegter Queue + Legacy-Config Mega-Demotion (Audit Runde 9+10) 2026-06-17 14:23:41 +02:00
support-bundle.ts Fix: Support-Bundle-Export friert die UI nicht mehr 1-2 Minuten ein (asynchrones IO) 2026-06-17 03:14:01 +02:00
support-data.ts Fix: Webhook-Settings — Backup-Maskierung + Support-Bundle-Diagnose 2026-06-10 00:35:54 +02:00
trace-log.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
update-install-flow.ts Fix: Download-Queue läuft nach fehlgeschlagenem Update weiter (kein Stillstand bis Neustart) 2026-06-17 05:50:55 +02:00
update.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00
utils.ts Harden type safety and recovery guards 2026-03-10 05:54:19 +01:00
video-processor.ts Fix: deutsche Tonspur-Erkennung waehlt nicht mehr eine falsch-getaggte Spur per Titel (Datenverlust-Schutz, Runde-7-Audit) 2026-06-17 11:30:32 +02:00
windows-host-diagnostics.ts chore: remove all source code comments and internal artifacts 2026-06-06 04:53:54 +02:00