Expand the scope of "Proxy hostname lookup" option

This commit is contained in:
Vladimir Golovnev (Glassez)
2023-02-13 11:23:52 +03:00
parent 6ac14d0c57
commit 96da685e5d
11 changed files with 57 additions and 61 deletions

View File

@@ -782,10 +782,10 @@ void OptionsDialog::loadConnectionTabOptions()
m_ui->checkProxyAuth->setChecked(proxyConf.authEnabled);
m_ui->textProxyUsername->setText(proxyConf.username);
m_ui->textProxyPassword->setText(proxyConf.password);
m_ui->checkProxyHostnameLookup->setChecked(proxyConf.hostnameLookupEnabled);
m_ui->checkProxyBitTorrent->setChecked(Preferences::instance()->useProxyForBT());
m_ui->checkProxyPeerConnections->setChecked(session->isProxyPeerConnectionsEnabled());
m_ui->checkProxyHostnameLookup->setChecked(session->isProxyHostnameLookupEnabled());
m_ui->checkProxyRSS->setChecked(Preferences::instance()->useProxyForRSS());
m_ui->checkProxyMisc->setChecked(Preferences::instance()->useProxyForGeneralPurposes());
@@ -856,6 +856,7 @@ void OptionsDialog::saveConnectionTabOptions() const
proxyConf.authEnabled = m_ui->checkProxyAuth->isChecked();
proxyConf.username = getProxyUsername();
proxyConf.password = getProxyPassword();
proxyConf.hostnameLookupEnabled = m_ui->checkProxyHostnameLookup->isChecked();
proxyConfigManager->setProxyConfiguration(proxyConf);
Preferences::instance()->setUseProxyForBT(m_ui->checkProxyBitTorrent->isChecked());
@@ -863,7 +864,6 @@ void OptionsDialog::saveConnectionTabOptions() const
Preferences::instance()->setUseProxyForGeneralPurposes(m_ui->checkProxyMisc->isChecked());
session->setProxyPeerConnectionsEnabled(m_ui->checkProxyPeerConnections->isChecked());
session->setProxyHostnameLookupEnabled(m_ui->checkProxyHostnameLookup->isChecked());
// IPFilter
session->setIPFilteringEnabled(isIPFilteringEnabled());
@@ -1507,7 +1507,7 @@ void OptionsDialog::adjustProxyOptions()
// SOCKS5 or HTTP
m_ui->labelProxyTypeIncompatible->setVisible(false);
m_ui->checkProxyHostnameLookup->setEnabled(m_ui->checkProxyBitTorrent->isChecked());
m_ui->checkProxyHostnameLookup->setEnabled(true);
m_ui->checkProxyRSS->setEnabled(true);
m_ui->checkProxyMisc->setEnabled(true);
}

View File

@@ -1835,17 +1835,27 @@ readme[0-9].txt: filter 'readme1.txt', 'readme2.txt' but not 'readme10.txt'.</st
</layout>
</item>
<item>
<widget class="QLabel" name="labelProxyTypeIncompatible">
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>Some options are incompatible with the chosen proxy type!</string>
</property>
</widget>
</item>
<widget class="QLabel" name="labelProxyTypeIncompatible">
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>Some options are incompatible with the chosen proxy type!</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkProxyHostnameLookup">
<property name="toolTip">
<string>If checked, hostname lookups are done via the proxy</string>
</property>
<property name="text">
<string>Use proxy for hostname lookups</string>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="checkProxyAuth">
<property name="enabled">
@@ -1921,16 +1931,6 @@ readme[0-9].txt: filter 'readme1.txt', 'readme2.txt' but not 'readme10.txt'.</st
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkProxyHostnameLookup">
<property name="toolTip">
<string>If checked, hostname lookups are done via the proxy</string>
</property>
<property name="text">
<string>Use proxy for hostname lookups</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@@ -3716,12 +3716,12 @@ Use ';' to split multiple entries. Can use wildcard '*'.</string>
<tabstop>comboProxyType</tabstop>
<tabstop>textProxyIP</tabstop>
<tabstop>spinProxyPort</tabstop>
<tabstop>checkProxyHostnameLookup</tabstop>
<tabstop>checkProxyAuth</tabstop>
<tabstop>textProxyUsername</tabstop>
<tabstop>textProxyPassword</tabstop>
<tabstop>checkProxyBitTorrent</tabstop>
<tabstop>checkProxyPeerConnections</tabstop>
<tabstop>checkProxyHostnameLookup</tabstop>
<tabstop>checkProxyRSS</tabstop>
<tabstop>checkProxyMisc</tabstop>
<tabstop>checkIPFilter</tabstop>