mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-22 00:59:18 +01:00
Add Rudimentray Proxy Support (#68)
* Add Rudimentray Proxy Support to NAPI
This commit is contained in:
parent
b2b79b4844
commit
e524a6c16d
@ -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()
|
||||
@ -390,4 +400,4 @@ namespace NAPI
|
||||
result.apiError = NAPI_RESULT::SUCCESS;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
@ -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());
|
||||
@ -576,4 +578,4 @@ void CemuConfig::AddRecentNfcFile(std::wstring_view file)
|
||||
// keep maximum of entries
|
||||
while (recent_nfc_files.size() > kMaxRecentEntries)
|
||||
recent_nfc_files.pop_back();
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user