feat: erzwinge festen Proxy für API-Anfragen

This commit is contained in:
Sucukdeluxe
2026-08-31 13:20:03 +02:00
parent 17ac99d373
commit a562f9162a
23 changed files with 530 additions and 64 deletions
+9 -1
View File
@@ -32,6 +32,7 @@ import {
validateCollectorPersistenceState,
validateCollectorTextPreparationRequest
} from "../shared/collector";
import { getProxyAuthentication } from "./network-proxy";
forceDarkNativeTheme(nativeTheme);
@@ -1271,7 +1272,14 @@ function formatRendererErrorReport(rawReport: unknown): string {
return parts.join(" ");
}
app.on("child-process-gone", (_event, details) => {
app.on("login", (event, _webContents, _requestDetails, authInfo, callback) => {
const credentials = getProxyAuthentication(authInfo);
if (!credentials) return;
event.preventDefault();
callback(credentials.username, credentials.password);
});
app.on("child-process-gone", (_event, details) => {
const killed = details.reason !== "clean-exit" && details.reason !== "killed";
const line = `Subprozess beendet: type=${details.type} reason=${details.reason} exitCode=${details.exitCode ?? "?"}${details.name ? ` name=${details.name}` : ""}${details.serviceName ? ` service=${details.serviceName}` : ""}`;
if (killed) {