浏览代码

Update default proxy port to 8080

Haoyu Qiu 3 年之前
父节点
当前提交
60511e9fd9
共有 3 个文件被更改,包括 9 次插入4 次删除
  1. 5 0
      editor/editor_settings.cpp
  2. 2 2
      editor/export_template_manager.cpp
  3. 2 2
      editor/plugins/asset_library_editor_plugin.cpp

+ 5 - 0
editor/editor_settings.cpp

@@ -652,6 +652,11 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
 	_initial_set("network/ssl/editor_ssl_certificates", _SYSTEM_CERTS_PATH);
 	hints["network/ssl/editor_ssl_certificates"] = PropertyInfo(Variant::STRING, "network/ssl/editor_ssl_certificates", PROPERTY_HINT_GLOBAL_FILE, "*.crt,*.pem");
 
+	// HTTP Proxy
+	_initial_set("network/http_proxy/host", "");
+	_initial_set("network/http_proxy/port", 8080);
+	hints["network/http_proxy/port"] = PropertyInfo(Variant::INT, "network/http_proxy/port", PROPERTY_HINT_RANGE, "1,65535,1");
+
 	/* Extra config */
 
 	_initial_set("project_manager/sorting_order", 0);

+ 2 - 2
editor/export_template_manager.cpp

@@ -150,8 +150,8 @@ void ExportTemplateManager::_download_template(const String &p_url, bool p_skip_
 	download_templates->set_download_file(EditorSettings::get_singleton()->get_cache_dir().plus_file("tmp_templates.tpz"));
 	download_templates->set_use_threads(true);
 
-	const String proxy_host = EDITOR_DEF("network/http_proxy/host", "");
-	const int proxy_port = EDITOR_DEF("network/http_proxy/port", -1);
+	const String proxy_host = EDITOR_GET("network/http_proxy/host");
+	const int proxy_port = EDITOR_GET("network/http_proxy/port");
 	download_templates->set_http_proxy(proxy_host, proxy_port);
 	download_templates->set_https_proxy(proxy_host, proxy_port);
 

+ 2 - 2
editor/plugins/asset_library_editor_plugin.cpp

@@ -40,8 +40,8 @@
 static inline void setup_http_request(HTTPRequest *request) {
 	request->set_use_threads(EDITOR_DEF("asset_library/use_threads", true));
 
-	const String proxy_host = EDITOR_DEF("network/http_proxy/host", "");
-	const int proxy_port = EDITOR_DEF("network/http_proxy/port", -1);
+	const String proxy_host = EDITOR_GET("network/http_proxy/host");
+	const int proxy_port = EDITOR_GET("network/http_proxy/port");
 	request->set_http_proxy(proxy_host, proxy_port);
 	request->set_https_proxy(proxy_host, proxy_port);
 }