mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-06 10:03:45 +08:00
feat: add UA to webdav
This commit is contained in:
parent
a0b70f9c34
commit
babc2c8f9b
@ -20,6 +20,7 @@
|
||||
- 允许代理主机地址设置为非 127.0.0.1 对 WSL 代理友好
|
||||
- 关闭系统代理时关闭已建立的网络连接
|
||||
- 托盘显示当前轻量模式状态
|
||||
- Webdav 请求加入 UA
|
||||
|
||||
#### 优化了:
|
||||
- 系统代理 Bypass 设置
|
||||
|
@ -15,6 +15,9 @@ use std::{
|
||||
use tokio::time::timeout;
|
||||
use zip::write::SimpleFileOptions;
|
||||
|
||||
// 应用版本常量,来自 tauri.conf.json
|
||||
const APP_VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
|
||||
const TIMEOUT_UPLOAD: u64 = 300; // 上传超时 5 分钟
|
||||
const TIMEOUT_DOWNLOAD: u64 = 300; // 下载超时 5 分钟
|
||||
const TIMEOUT_LIST: u64 = 3; // 列表超时 30 秒
|
||||
@ -105,6 +108,10 @@ impl WebDavClient {
|
||||
reqwest::Client::builder()
|
||||
.danger_accept_invalid_certs(true)
|
||||
.timeout(Duration::from_secs(op.timeout()))
|
||||
.user_agent(format!(
|
||||
"clash-verge/{} ({} WebDAV-Client)",
|
||||
APP_VERSION, OS
|
||||
))
|
||||
.build()
|
||||
.unwrap(),
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user