fix: add https proxy
This commit is contained in:
parent
59dae640db
commit
33a5fb8837
@ -212,9 +212,16 @@ impl PrfItem {
|
|||||||
match Sysproxy::get_system_proxy() {
|
match Sysproxy::get_system_proxy() {
|
||||||
Ok(p @ Sysproxy { enable: true, .. }) => {
|
Ok(p @ Sysproxy { enable: true, .. }) => {
|
||||||
let proxy_scheme = format!("http://{}:{}", p.host, p.port);
|
let proxy_scheme = format!("http://{}:{}", p.host, p.port);
|
||||||
|
|
||||||
if let Ok(proxy) = reqwest::Proxy::http(&proxy_scheme) {
|
if let Ok(proxy) = reqwest::Proxy::http(&proxy_scheme) {
|
||||||
builder = builder.proxy(proxy);
|
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();
|
let header = resp.headers();
|
||||||
|
|
||||||
// parse the Subscription Userinfo
|
// parse the Subscription UserInfo
|
||||||
let extra = match header.get("Subscription-Userinfo") {
|
let extra = match header.get("Subscription-Userinfo") {
|
||||||
Some(value) => {
|
Some(value) => {
|
||||||
let sub_info = value.to_str().unwrap_or("");
|
let sub_info = value.to_str().unwrap_or("");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user