feature: Added network proxy support for hex::Net (#562)

* feat(i18n): update Chinese(Simplified) translation

* feat: proxy setting

* refactor: add hex::Net::setProxy

* fix: undefined symbol: hex::Net::m_proxyUrl

* style: m_proxyUrl -> s_proxyUrl
This commit is contained in:
Shiroki Satsuki
2022-07-01 20:05:32 +08:00
committed by GitHub
parent eadcc6f38c
commit ef5fbba56b
9 changed files with 88 additions and 2 deletions

View File

@@ -49,6 +49,8 @@ namespace hex {
void cancel() { this->m_shouldCancel = true; }
static void setProxy(const std::string &url);
private:
void setCommonSettings(std::string &response, const std::string &url, u32 timeout = 2000, const std::map<std::string, std::string> &extraHeaders = {}, const std::string &body = {});
std::optional<i32> execute();
@@ -62,6 +64,8 @@ namespace hex {
std::mutex m_transmissionActive;
float m_progress = 0.0F;
bool m_shouldCancel = false;
static std::string s_proxyUrl;
};
}