mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-18 16:26:05 -04:00
Use system proxy by default
This commit is contained in:
parent
99d2816ea7
commit
2e9c237367
@ -40,6 +40,8 @@ import org.jackhuang.hmcl.upgrade.UpdateHandler;
|
|||||||
public final class Main {
|
public final class Main {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
System.setProperty("java.net.useSystemProxies", "true");
|
||||||
|
|
||||||
checkJavaFX();
|
checkJavaFX();
|
||||||
checkDirectoryPath();
|
checkDirectoryPath();
|
||||||
checkDSTRootCAX3();
|
checkDSTRootCAX3();
|
||||||
|
@ -103,7 +103,7 @@ public final class SettingsPage extends StackPane implements DecoratorPage {
|
|||||||
@FXML
|
@FXML
|
||||||
private StackPane themeColorPickerContainer;
|
private StackPane themeColorPickerContainer;
|
||||||
@FXML
|
@FXML
|
||||||
private JFXCheckBox chkEnableProxy;
|
private JFXCheckBox chkDisableProxy;
|
||||||
@FXML
|
@FXML
|
||||||
private JFXRadioButton chkProxyHttp;
|
private JFXRadioButton chkProxyHttp;
|
||||||
@FXML
|
@FXML
|
||||||
@ -160,10 +160,12 @@ public final class SettingsPage extends StackPane implements DecoratorPage {
|
|||||||
txtProxyUsername.textProperty().bindBidirectional(config().proxyUserProperty());
|
txtProxyUsername.textProperty().bindBidirectional(config().proxyUserProperty());
|
||||||
txtProxyPassword.textProperty().bindBidirectional(config().proxyPassProperty());
|
txtProxyPassword.textProperty().bindBidirectional(config().proxyPassProperty());
|
||||||
|
|
||||||
proxyPane.disableProperty().bind(chkEnableProxy.selectedProperty().not());
|
proxyPane.disableProperty().bind(chkDisableProxy.selectedProperty());
|
||||||
authPane.disableProperty().bind(chkProxyAuthentication.selectedProperty().not());
|
authPane.disableProperty().bind(chkProxyAuthentication.selectedProperty().not());
|
||||||
|
|
||||||
chkEnableProxy.selectedProperty().bindBidirectional(config().hasProxyProperty());
|
chkDisableProxy.setSelected(!config().hasProxy());
|
||||||
|
chkDisableProxy.selectedProperty().addListener(o -> config().setHasProxy(!chkDisableProxy.isSelected()));
|
||||||
|
config().hasProxyProperty().addListener(o -> chkDisableProxy.setSelected(!config().hasProxy()));
|
||||||
chkProxyAuthentication.selectedProperty().bindBidirectional(config().hasProxyAuthProperty());
|
chkProxyAuthentication.selectedProperty().bindBidirectional(config().hasProxyAuthProperty());
|
||||||
|
|
||||||
selectedProxyType = new SimpleObjectProperty<Proxy.Type>(Proxy.Type.HTTP) {
|
selectedProxyType = new SimpleObjectProperty<Proxy.Type>(Proxy.Type.HTTP) {
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
|
|
||||||
<ComponentList title="%settings.launcher.proxy"> <!-- proxy -->
|
<ComponentList title="%settings.launcher.proxy"> <!-- proxy -->
|
||||||
<VBox spacing="10">
|
<VBox spacing="10">
|
||||||
<JFXCheckBox fx:id="chkEnableProxy" text="%settings.launcher.proxy.enable" />
|
<JFXCheckBox fx:id="chkDisableProxy" text="%settings.launcher.proxy.disable" />
|
||||||
<VBox fx:id="proxyPane" style="-fx-padding: 0 0 0 30;">
|
<VBox fx:id="proxyPane" style="-fx-padding: 0 0 0 30;">
|
||||||
<HBox>
|
<HBox>
|
||||||
<JFXRadioButton fx:id="chkProxyHttp" text="%settings.launcher.proxy.http" />
|
<JFXRadioButton fx:id="chkProxyHttp" text="%settings.launcher.proxy.http" />
|
||||||
|
@ -293,7 +293,7 @@ settings.launcher.language=Language
|
|||||||
settings.launcher.log_font=Log Font
|
settings.launcher.log_font=Log Font
|
||||||
settings.launcher.proxy=Proxy
|
settings.launcher.proxy=Proxy
|
||||||
settings.launcher.proxy.authentication=Proxy Authentication
|
settings.launcher.proxy.authentication=Proxy Authentication
|
||||||
settings.launcher.proxy.enable=Enable Proxy
|
settings.launcher.proxy.disable=Use system proxies
|
||||||
settings.launcher.proxy.host=Host
|
settings.launcher.proxy.host=Host
|
||||||
settings.launcher.proxy.http=HTTP
|
settings.launcher.proxy.http=HTTP
|
||||||
settings.launcher.proxy.password=Password
|
settings.launcher.proxy.password=Password
|
||||||
|
@ -293,7 +293,7 @@ settings.launcher.language=語言
|
|||||||
settings.launcher.log_font=日誌字體
|
settings.launcher.log_font=日誌字體
|
||||||
settings.launcher.proxy=代理
|
settings.launcher.proxy=代理
|
||||||
settings.launcher.proxy.authentication=身份驗證
|
settings.launcher.proxy.authentication=身份驗證
|
||||||
settings.launcher.proxy.enable=启用代理
|
settings.launcher.proxy.disable=使用系統代理
|
||||||
settings.launcher.proxy.host=主機
|
settings.launcher.proxy.host=主機
|
||||||
settings.launcher.proxy.http=HTTP
|
settings.launcher.proxy.http=HTTP
|
||||||
settings.launcher.proxy.password=密碼
|
settings.launcher.proxy.password=密碼
|
||||||
|
@ -293,7 +293,7 @@ settings.launcher.language=语言
|
|||||||
settings.launcher.log_font=日志字体
|
settings.launcher.log_font=日志字体
|
||||||
settings.launcher.proxy=代理
|
settings.launcher.proxy=代理
|
||||||
settings.launcher.proxy.authentication=身份验证
|
settings.launcher.proxy.authentication=身份验证
|
||||||
settings.launcher.proxy.enable=启用代理
|
settings.launcher.proxy.disable=使用系统代理
|
||||||
settings.launcher.proxy.host=主机
|
settings.launcher.proxy.host=主机
|
||||||
settings.launcher.proxy.http=HTTP
|
settings.launcher.proxy.http=HTTP
|
||||||
settings.launcher.proxy.password=密码
|
settings.launcher.proxy.password=密码
|
||||||
|
Loading…
x
Reference in New Issue
Block a user