| 121 | } |
| 122 | |
| 123 | Json::Value ProxyManager::GetProxyAsJson() { |
| 124 | LOG(TRACE) << "ProxyManager::GetProxyAsJson"; |
| 125 | Json::Value proxy_value; |
| 126 | proxy_value["proxyType"] = this->proxy_type_; |
| 127 | if (this->proxy_type_ == WD_PROXY_TYPE_MANUAL) { |
| 128 | if (this->http_proxy_.size() > 0) { |
| 129 | proxy_value["httpProxy"] = this->http_proxy_; |
| 130 | } |
| 131 | if (this->ftp_proxy_.size() > 0) { |
| 132 | proxy_value["ftpProxy"] = this->ftp_proxy_; |
| 133 | } |
| 134 | if (this->ssl_proxy_.size() > 0) { |
| 135 | proxy_value["sslProxy"] = this->ssl_proxy_; |
| 136 | } |
| 137 | if (this->socks_proxy_.size() > 0) { |
| 138 | proxy_value["socksProxy"] = this->socks_proxy_; |
| 139 | if (this->socks_user_name_.size() > 0) { |
| 140 | proxy_value["socksUsername"] = this->socks_user_name_; |
| 141 | } |
| 142 | if (this->socks_password_.size() > 0) { |
| 143 | proxy_value["socksPassword"] = this->socks_password_; |
| 144 | } |
| 145 | } |
| 146 | } else if (this->proxy_type_ == WD_PROXY_TYPE_AUTOCONFIGURE) { |
| 147 | proxy_value["proxyAutoconfigUrl"] = this->proxy_autoconfigure_url_; |
| 148 | } |
| 149 | return proxy_value; |
| 150 | } |
| 151 | |
| 152 | std::wstring ProxyManager::BuildProxySettingsString() { |
| 153 | LOG(TRACE) << "ProxyManager::BuildProxySettingsString"; |
no test coverage detected