connection: disabled outdated proxy settings (#13323)

This commit is contained in:
Oleg Agafonov 2025-02-09 19:51:10 +04:00
parent 19269b22b0
commit 62ba9f02ba
5 changed files with 40 additions and 19 deletions

View file

@ -55,6 +55,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
private static PreferencesDialog instance; // shared dialog instance
public static final boolean NETWORK_ENABLE_PROXY_SUPPORT = false; // TODO: delete proxy at all after few releases, 2025-02-09
// WARNING, do not change const values - it must be same for compatibility with user's saved settings
public static final String KEY_SHOW_TOOLTIPS_DELAY = "showTooltipsDelay";
public static final String KEY_SHOW_CARD_NAMES = "showCardNames";
@ -2795,7 +2797,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
tabsPanel.addTab("Sounds", tabSounds);
connection_Proxy.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Proxy for server connection and images download"));
connection_Proxy.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Proxy for server connection and images download (DO NOT SUPPORTED)"));
cbProxyType.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
@ -3317,6 +3319,11 @@ public class PreferencesDialog extends javax.swing.JDialog {
return;
}
if (!NETWORK_ENABLE_PROXY_SUPPORT) {
connection.setProxyType(ProxyType.NONE);
return;
}
connection.setProxyType(configProxyType);
if (configProxyType != ProxyType.NONE) {
String host = getCachedValue(KEY_PROXY_ADDRESS, "");