You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +00:00
Merge pull request #55747 from timothyqiu/editor-proxy
Add proxy support for the editor
This commit is contained in:
@@ -554,6 +554,14 @@ int HTTPRequest::get_body_size() const {
|
||||
return body_len;
|
||||
}
|
||||
|
||||
void HTTPRequest::set_http_proxy(const String &p_host, int p_port) {
|
||||
client->set_http_proxy(p_host, p_port);
|
||||
}
|
||||
|
||||
void HTTPRequest::set_https_proxy(const String &p_host, int p_port) {
|
||||
client->set_https_proxy(p_host, p_port);
|
||||
}
|
||||
|
||||
void HTTPRequest::set_timeout(int p_timeout) {
|
||||
ERR_FAIL_COND(p_timeout < 0);
|
||||
timeout = p_timeout;
|
||||
@@ -602,6 +610,9 @@ void HTTPRequest::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("set_download_chunk_size", "chunk_size"), &HTTPRequest::set_download_chunk_size);
|
||||
ClassDB::bind_method(D_METHOD("get_download_chunk_size"), &HTTPRequest::get_download_chunk_size);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_http_proxy", "host", "port"), &HTTPRequest::set_http_proxy);
|
||||
ClassDB::bind_method(D_METHOD("set_https_proxy", "host", "port"), &HTTPRequest::set_https_proxy);
|
||||
|
||||
ADD_PROPERTY(PropertyInfo(Variant::STRING, "download_file", PROPERTY_HINT_FILE), "set_download_file", "get_download_file");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "download_chunk_size", PROPERTY_HINT_RANGE, "256,16777216"), "set_download_chunk_size", "get_download_chunk_size");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_threads"), "set_use_threads", "is_using_threads");
|
||||
|
||||
Reference in New Issue
Block a user