允许使用系统属性禁用系统代理 (#2921)

This commit is contained in:
Glavo 2024-03-12 21:44:08 +08:00 committed by GitHub
parent 57e728991b
commit 7ca5744559
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,8 +55,8 @@ public final class Main {
}
public static void main(String[] args) {
System.setProperty("java.net.useSystemProxies", "true");
System.setProperty("javafx.autoproxy.disable", "true");
System.getProperties().putIfAbsent("java.net.useSystemProxies", "true");
System.getProperties().putIfAbsent("javafx.autoproxy.disable", "true");
System.getProperties().putIfAbsent("http.agent", "HMCL/" + Metadata.VERSION);
checkDirectoryPath();