From 444ee998e7434fb2d7f0061eca331593b065c046 Mon Sep 17 00:00:00 2001 From: Artem Chepurnoy Date: Mon, 18 Nov 2024 12:21:11 +0200 Subject: [PATCH] improvement(Desktop): Use system default proxy settings #709 --- desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt b/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt index 8e005cfe..c29359fc 100644 --- a/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt +++ b/desktopApp/src/jvmMain/kotlin/com/artemchep/keyguard/Main.kt @@ -99,6 +99,10 @@ fun main() { Security.insertProviderAt(BouncyCastleProvider(), 1) Security.insertProviderAt(BouncyCastleJsseProvider(), 2) + // Allow the app to use system default proxies: + // https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html + System.setProperty("java.net.useSystemProxies", "true") + val kamelConfig = KamelConfig { this.takeFrom(KamelConfig.Default) mapper(FaviconUrlMapper)