Skip to content
Snippets Groups Projects
Unverified Commit 33a5fb88 authored by GyDi's avatar GyDi Committed by GitHub
Browse files

fix: add https proxy

parent 59dae640
No related branches found
No related tags found
No related merge requests found
......@@ -212,9 +212,16 @@ impl PrfItem {
match Sysproxy::get_system_proxy() {
Ok(p @ Sysproxy { enable: true, .. }) => {
let proxy_scheme = format!("http://{}:{}", p.host, p.port);
if let Ok(proxy) = reqwest::Proxy::http(&proxy_scheme) {
builder = builder.proxy(proxy);
}
if let Ok(proxy) = reqwest::Proxy::https(&proxy_scheme) {
builder = builder.proxy(proxy);
}
if let Ok(proxy) = reqwest::Proxy::all(&proxy_scheme) {
builder = builder.proxy(proxy);
}
}
_ => {}
};
......@@ -233,7 +240,7 @@ impl PrfItem {
let header = resp.headers();
// parse the Subscription Userinfo
// parse the Subscription UserInfo
let extra = match header.get("Subscription-Userinfo") {
Some(value) => {
let sub_info = value.to_str().unwrap_or("");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment