From 142eeb2c22e56e5c1848a875f6f38bf865ed4cd2 Mon Sep 17 00:00:00 2001 From: crschnick Date: Thu, 20 Aug 2026 15:28:09 +0000 Subject: [PATCH] Rework --- .../main/java/io/xpipe/app/prefs/AppPrefs.java | 10 ++++++++++ .../io/xpipe/app/prefs/HttpProxyCategory.java | 13 ++++++++++++- .../main/java/io/xpipe/app/util/HttpProxy.java | 15 +++++++++++++++ .../io/xpipe/app/resources/style/style.css | 4 ++++ dist/changelog/24.0.md | 1 + lang/strings/translations_en.properties | 5 ++++- version | 2 +- 7 files changed, 47 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java index 51b21763c..209480fec 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java @@ -276,6 +276,12 @@ public final class AppPrefs { .valueClass(HttpProxy.class) .requiresRestart(true) .build()); + final ObjectProperty noProxyList = map(Mapping.builder() + .property(new GlobalObjectProperty<>()) + .key("noProxy") + .valueClass(String.class) + .requiresRestart(true) + .build()); final Property terminalProxy = map(Mapping.builder() .property(new GlobalObjectProperty<>()) .key("terminalProxy") @@ -595,6 +601,10 @@ public final class AppPrefs { return httpProxy; } + public ObservableValue noProxyList() { + return noProxyList; + } + public ObservableBooleanValue disableApiAuthentication() { return disableApiAuthentication; } diff --git a/app/src/main/java/io/xpipe/app/prefs/HttpProxyCategory.java b/app/src/main/java/io/xpipe/app/prefs/HttpProxyCategory.java index fbbf810d8..d63fbf64e 100644 --- a/app/src/main/java/io/xpipe/app/prefs/HttpProxyCategory.java +++ b/app/src/main/java/io/xpipe/app/prefs/HttpProxyCategory.java @@ -92,8 +92,19 @@ public class HttpProxyCategory extends AppPrefsCategory { DesktopHelper.browseFile(AppCertStore.getDir()); }); })) + .pref(prefs.noProxyList) + .addComp(new TextAreaComp(prefs.noProxyList) + .applyStructure(structure -> { + structure.getTextArea().setPromptText(""" + my.domain + *.example.com + + """); + }) + .maxWidth(600), prefs.noProxyList) .pref(prefs.disableHttpsTlsCheck) - .addToggle(prefs.disableHttpsTlsCheck)) + .addToggle(prefs.disableHttpsTlsCheck) + ) .buildComp(); } diff --git a/app/src/main/java/io/xpipe/app/util/HttpProxy.java b/app/src/main/java/io/xpipe/app/util/HttpProxy.java index 160d6fba8..3eda0c86d 100644 --- a/app/src/main/java/io/xpipe/app/util/HttpProxy.java +++ b/app/src/main/java/io/xpipe/app/util/HttpProxy.java @@ -1,5 +1,6 @@ package io.xpipe.app.util; +import io.xpipe.app.core.AppCertStore; import io.xpipe.app.ext.ProcModuleProvider; import io.xpipe.app.issue.ErrorEventFactory; import io.xpipe.app.prefs.AppPrefs; @@ -17,6 +18,7 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.stream.Collectors; @Value @Builder @@ -61,6 +63,19 @@ public class HttpProxy { // Use HTTP protocol as well here as most proxies still require that map.put("https_proxy", http); map.put("HTTPS_PROXY", http); + + AppCertStore.getBundleFile().ifPresent(bundleFile -> { + map.put("ssl_cert_file", bundleFile.toString()); + map.put("SSL_CERT_FILE", bundleFile.toString()); + }); + + var np = AppPrefs.get().noProxyList().getValue(); + if (np != null && !np.isEmpty()) { + var val = np.lines().collect(Collectors.joining(",")); + map.put("no_proxy", val); + map.put("NO_PROXY", val); + } + return map; } diff --git a/app/src/main/resources/io/xpipe/app/resources/style/style.css b/app/src/main/resources/io/xpipe/app/resources/style/style.css index 18f04da82..529f779f0 100644 --- a/app/src/main/resources/io/xpipe/app/resources/style/style.css +++ b/app/src/main/resources/io/xpipe/app/resources/style/style.css @@ -249,6 +249,10 @@ -fx-prompt-text-fill: -color-fg-subtle; } +.text-area:focused { + -fx-prompt-text-fill: -color-fg-subtle; +} + .agent-socket-choice:disabled .text-field { -fx-opacity: 1.0; } diff --git a/dist/changelog/24.0.md b/dist/changelog/24.0.md index c51b31368..31beb4de6 100644 --- a/dist/changelog/24.0.md +++ b/dist/changelog/24.0.md @@ -121,6 +121,7 @@ The latest release of the [apple container runtime](https://github.com/apple/con - Serial connections now also support being assigned to abstract hosts - Add option to reinstall XPipe on Windows if an incremental update fails - The API endpoints for /connection/... have been renamed to /store/... and API parameter names have been changed from connection to store +- There is now a setting for controlling NO_PROXY for a configured http proxy - Fix various rendering performance issues ## Important migration notice (Does not apply to PTB) diff --git a/lang/strings/translations_en.properties b/lang/strings/translations_en.properties index bb5de5fe1..8597e7333 100644 --- a/lang/strings/translations_en.properties +++ b/lang/strings/translations_en.properties @@ -1366,7 +1366,10 @@ documentationDescription=Check out the documentation customEditorCommandInTerminal=Run custom command in a terminal customEditorCommandInTerminalDescription=If your editor is terminal-based, you can enable this option to automatically open a terminal and run the command in the terminal session instead.\n\nYou can use this option for editors like vi, vim, nvim, and others. disableHttpsTlsCheck=Disable HTTPS request certificate verification -disableHttpsTlsCheckDescription=If your organization is decrypting your HTTPS traffic in firewalls using SSL interception, any update checks or license checks will fail due to the certificates not matching up. You can fix this by enabling this option and disabling TLS certificate validation. +#force +disableHttpsTlsCheckDescription=If your organization is decrypting your HTTPS traffic in firewalls using SSL interception, any HTTP requests will fail unless the certificates are trusted. You can enable this option and disable TLS certificate validation for testing if something does not work as expected with the custom certificates. +noProxy=No proxy +noProxyDescription=Do not use proxy server for addresses matching the following values connectionsSelected=$NUMBER$ connections selected addConnections=Add connections browseDirectory=Browse directory diff --git a/version b/version index 63de2e821..db86509bb 100644 --- a/version +++ b/version @@ -1 +1 @@ -24.0-41 +24.0-42