Add Rudimentray Proxy Support (#68)

* Add Rudimentray Proxy Support to NAPI
This commit is contained in:
tastymeatball 2022-08-26 17:04:46 +02:00 committed by GitHub
parent b2b79b4844
commit e524a6c16d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View file

@ -73,6 +73,11 @@ CurlRequestHelper::CurlRequestHelper()
curl_easy_setopt(m_curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(m_curl, CURLOPT_MAXREDIRS, 2);
if(GetConfig().proxy_server.GetValue() != "")
{
curl_easy_setopt(m_curl, CURLOPT_PROXY, GetConfig().proxy_server.GetValue().c_str());
}
}
CurlRequestHelper::~CurlRequestHelper()
@ -216,6 +221,11 @@ CurlSOAPHelper::CurlSOAPHelper()
// SSL
curl_easy_setopt(m_curl, CURLOPT_SSL_CTX_FUNCTION, _sslctx_function_SOAP);
curl_easy_setopt(m_curl, CURLOPT_SSL_CTX_DATA, NULL);
if(GetConfig().proxy_server.GetValue() != "")
{
curl_easy_setopt(m_curl, CURLOPT_PROXY, GetConfig().proxy_server.GetValue().c_str());
}
}
CurlSOAPHelper::~CurlSOAPHelper()

View file

@ -65,6 +65,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
did_show_vulkan_warning = parser.get("vk_warning", did_show_vulkan_warning);
did_show_graphic_pack_download = parser.get("gp_download", did_show_graphic_pack_download);
fullscreen = parser.get("fullscreen", fullscreen);
proxy_server = parser.get("proxy_server", "");
// cpu_mode = parser.get("cpu_mode", cpu_mode.GetInitValue());
//console_region = parser.get("console_region", console_region.GetInitValue());
@ -340,6 +341,7 @@ void CemuConfig::Save(XMLConfigParser& parser)
config.set<bool>("vk_warning", did_show_vulkan_warning);
config.set<bool>("gp_download", did_show_graphic_pack_download);
config.set<bool>("fullscreen", fullscreen);
config.set("proxy_server", proxy_server.GetValue().c_str());
// config.set("cpu_mode", cpu_mode.GetValue());
//config.set("console_region", console_region.GetValue());

View file

@ -331,6 +331,7 @@ struct CemuConfig
ConfigValue<std::wstring> mlc_path {};
ConfigValue<bool> fullscreen_menubar{ false };
ConfigValue<bool> fullscreen{ false };
ConfigValue<std::string> proxy_server{};
std::vector<std::wstring> game_paths;
std::mutex game_cache_entries_mutex;