http/https proxy (#7600)

* add http(s) proxy

* Add front-end translation

* fix ui description

* For linux platform, add rustls support

* fix: Fix the proxy address test function.

* add: Added default prompts for agency agreement and some multi-language translations

* add: Http proxy request client

* fix: add async http proxy func and format the code

* add: Preliminary support for flutter front-end calling rust back-end http request

* Optimize HTTP calls

* Optimize HTTP calls

* fix: Optimize HTTP requests, refine translations, and fix dependencies
This commit is contained in:
yuluo
2024-04-23 15:00:23 +08:00
committed by GitHub
parent f11c332cb4
commit da57fcb641
68 changed files with 1231 additions and 133 deletions

View File

@@ -749,6 +749,10 @@ pub fn main_get_async_status() -> String {
get_async_job_status()
}
pub fn main_get_http_status(url: String) -> Option<String> {
get_async_http_status(url)
}
pub fn main_get_option(key: String) -> String {
get_option(key)
}
@@ -805,6 +809,10 @@ pub fn main_set_socks(proxy: String, username: String, password: String) {
set_socks(proxy, username, password)
}
pub fn main_get_proxy_status() -> bool {
get_proxy_status()
}
pub fn main_get_socks() -> Vec<String> {
get_socks()
}
@@ -878,9 +886,8 @@ pub fn main_get_api_server() -> String {
get_api_server()
}
// This function doesn't seem to be used.
pub fn main_post_request(url: String, body: String, header: String) {
post_request(url, body, header)
pub fn main_http_request(url: String, method: String, body: Option<String>, header: String) {
http_request(url,method, body, header)
}
pub fn main_get_local_option(key: String) -> SyncReturn<String> {