mirror of
https://github.com/TeamPiped/piped-proxy.git
synced 2024-08-14 23:50:45 +00:00
Fix compile issues.
This commit is contained in:
parent
63953d283e
commit
ef6250ba72
1 changed files with 6 additions and 4 deletions
10
src/main.rs
10
src/main.rs
|
@ -47,9 +47,9 @@ static CLIENT: Lazy<Client> = Lazy::new(|| {
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
|
||||||
if proxy.is_some() {
|
let builder = if proxy.is_some() {
|
||||||
// proxy basic auth
|
// proxy basic auth
|
||||||
let builder = if let Ok(proxy_auth_user) = env::var("PROXY_USER") {
|
if let Ok(proxy_auth_user) = env::var("PROXY_USER") {
|
||||||
let proxy_auth_pass = env::var("PROXY_PASS").unwrap_or_default();
|
let proxy_auth_pass = env::var("PROXY_PASS").unwrap_or_default();
|
||||||
builder.proxy(
|
builder.proxy(
|
||||||
proxy
|
proxy
|
||||||
|
@ -58,8 +58,10 @@ static CLIENT: Lazy<Client> = Lazy::new(|| {
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
builder.proxy(proxy.unwrap())
|
builder.proxy(proxy.unwrap())
|
||||||
};
|
}
|
||||||
}
|
} else {
|
||||||
|
builder
|
||||||
|
};
|
||||||
|
|
||||||
if env::var("IPV4_ONLY").is_ok() {
|
if env::var("IPV4_ONLY").is_ok() {
|
||||||
builder
|
builder
|
||||||
|
|
Loading…
Reference in a new issue