mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-06 02:53:45 +08:00
feat: allow webdav directory redirect
This commit is contained in:
parent
babc2c8f9b
commit
16846aefd3
@ -21,6 +21,7 @@
|
|||||||
- 关闭系统代理时关闭已建立的网络连接
|
- 关闭系统代理时关闭已建立的网络连接
|
||||||
- 托盘显示当前轻量模式状态
|
- 托盘显示当前轻量模式状态
|
||||||
- Webdav 请求加入 UA
|
- Webdav 请求加入 UA
|
||||||
|
- Webdav 支持目录重定向
|
||||||
|
|
||||||
#### 优化了:
|
#### 优化了:
|
||||||
- 系统代理 Bypass 设置
|
- 系统代理 Bypass 设置
|
||||||
|
@ -112,6 +112,14 @@ impl WebDavClient {
|
|||||||
"clash-verge/{} ({} WebDAV-Client)",
|
"clash-verge/{} ({} WebDAV-Client)",
|
||||||
APP_VERSION, OS
|
APP_VERSION, OS
|
||||||
))
|
))
|
||||||
|
.redirect(reqwest::redirect::Policy::custom(|attempt| {
|
||||||
|
// 允许所有请求类型的重定向,包括PUT
|
||||||
|
if attempt.previous().len() >= 5 {
|
||||||
|
attempt.error("重定向次数过多")
|
||||||
|
} else {
|
||||||
|
attempt.follow()
|
||||||
|
}
|
||||||
|
}))
|
||||||
.build()
|
.build()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user