feat: add default user agent

This commit is contained in:
GyDi 2022-04-12 01:05:51 +08:00
parent c8ccba0192
commit b74696adba
No known key found for this signature in database
GPG Key ID: 1C95E0D3467B3084

View File

@ -196,9 +196,8 @@ impl PrfItem {
if !with_proxy { if !with_proxy {
builder = builder.no_proxy(); builder = builder.no_proxy();
} }
if let Some(user_agent) = user_agent {
builder = builder.user_agent(user_agent); builder = builder.user_agent(user_agent.unwrap_or("clash-verge/v0.1.0".into()));
}
let resp = builder.build()?.get(url).send().await?; let resp = builder.build()?.get(url).send().await?;
let header = resp.headers(); let header = resp.headers();