Skip to content

Commit

Permalink
Revert "fix: proxy under AutoConfigUrl" (#247)
Browse files Browse the repository at this point in the history
This reverts commit f78ddce.
  • Loading branch information
tsukinaha authored Nov 21, 2024
1 parent f78ddce commit 6a1f895
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
4 changes: 1 addition & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ fn main() {
#[cfg(windows)]
{
println!("cargo:rerun-if-changed=tsukimi-manifest.rc");
embed_resource::compile("./tsukimi_manifest.rc", embed_resource::NONE)
.manifest_optional()
.unwrap();
embed_resource::compile("./tsukimi_manifest.rc", embed_resource::NONE);
}
}
12 changes: 1 addition & 11 deletions src/client/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl ReqClient {

client_builder.build().expect("failed to initialize client")
};

tower::ServiceBuilder::new()
.concurrency_limit(SETTINGS.threads() as usize)
.service(client)
Expand All @@ -68,16 +68,6 @@ pub fn get_proxy_settings() -> Option<String> {
{
let proxy = PCWSTR(proxy_config.lpszProxy.0).to_string().unwrap();
return Some(proxy);
} else if WinHttpGetIEProxyConfigForCurrentUser(&mut proxy_config).is_ok()
&& !proxy_config.lpszAutoConfigUrl.is_null()
{
let proxy_url = PCWSTR(proxy_config.lpszAutoConfigUrl.0)
.to_string()
.unwrap();
let proxy = proxy_url.split('/').collect::<Vec<_>>()[..3]
.join("/")
.to_string();
return Some(proxy);
}
}
None
Expand Down

0 comments on commit 6a1f895

Please sign in to comment.