mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 06:02:29 -06:00
Allow to use proxy per subsystem
This commit is contained in:
@@ -39,20 +39,18 @@ namespace Net
|
||||
|
||||
enum class ProxyType
|
||||
{
|
||||
None = 0,
|
||||
HTTP = 1,
|
||||
SOCKS5 = 2,
|
||||
HTTP_PW = 3,
|
||||
SOCKS5_PW = 4,
|
||||
SOCKS4 = 5
|
||||
};
|
||||
Q_ENUM_NS(ProxyType)
|
||||
|
||||
struct ProxyConfiguration
|
||||
{
|
||||
ProxyType type = ProxyType::None;
|
||||
ProxyType type = ProxyType::HTTP;
|
||||
QString ip = u"0.0.0.0"_qs;
|
||||
ushort port = 8080;
|
||||
bool authEnabled = false;
|
||||
QString username;
|
||||
QString password;
|
||||
};
|
||||
@@ -74,10 +72,6 @@ namespace Net
|
||||
|
||||
ProxyConfiguration proxyConfiguration() const;
|
||||
void setProxyConfiguration(const ProxyConfiguration &config);
|
||||
bool isProxyOnlyForTorrents() const;
|
||||
void setProxyOnlyForTorrents(bool onlyForTorrents);
|
||||
|
||||
bool isAuthenticationRequired() const;
|
||||
|
||||
signals:
|
||||
void proxyConfigurationChanged();
|
||||
@@ -85,10 +79,10 @@ namespace Net
|
||||
private:
|
||||
static ProxyConfigurationManager *m_instance;
|
||||
ProxyConfiguration m_config;
|
||||
SettingValue<bool> m_storeProxyOnlyForTorrents;
|
||||
SettingValue<ProxyType> m_storeProxyType;
|
||||
SettingValue<QString> m_storeProxyIP;
|
||||
SettingValue<ushort> m_storeProxyPort;
|
||||
SettingValue<bool> m_storeProxyAuthEnabled;
|
||||
SettingValue<QString> m_storeProxyUsername;
|
||||
SettingValue<QString> m_storeProxyPassword;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user