Environment
- CC Switch: 3.15.0
- OS: macOS (Darwin)
- Proxy: Clash Verge (mihomo) mixed port
127.0.0.1:7890 — serves both HTTP CONNECT and SOCKS5
Summary
WebDAV cloud sync fails when cc-switch's outbound proxy is set to socks5://127.0.0.1:7890, but succeeds when set to http://127.0.0.1:7890/ — the same proxy server and port, only the scheme differs.
Repro
- Set the outbound proxy (
global_proxy_url) to socks5://127.0.0.1:7890.
- Configure WebDAV sync and trigger it.
- Sync fails;
webdavSync.status.lastError reports e.g.:
WebDAV MKCOL 请求失败(连接失败): https://<nas-host>:5006/misc/
WebDAV MKCOL 请求失败(请求超时): https://<nas-host>:5006/misc/
- Change the proxy to
http://127.0.0.1:7890/ and re-trigger → sync succeeds immediately (lastError cleared, lastSyncAt updated).
Findings
- The WebDAV server is healthy: direct
PROPFIND → 207, MKCOL on the existing dir → 405, all instant, both direct and via the proxy.
- So this is not a server/network problem. The only variable is the proxy scheme:
socks5:// fails, http:// works on the same port.
Likely cause
cc-switch's outbound HTTP client treats socks5:// through a different code path than http:// (HTTP CONNECT). The SOCKS5 path appears flaky — "connection failed" at startup, then timeouts — while the HTTP CONNECT path is reliable. Side-effect worth noting: with socks5:// the host is resolved locally and an IP literal is tunneled (mihomo logs show match GeoIP/cn), whereas http:// sends the hostname to the proxy.
Expected
socks5:// and http:// should behave equivalently for the same proxy endpoint.
Note: this is distinct from #2686 (which is about MKCOL on an already-existing directory being misreported). Here the http:// path succeeds on 3.15.0, so the failure is specific to the SOCKS5 proxy path.
Environment
127.0.0.1:7890— serves both HTTP CONNECT and SOCKS5Summary
WebDAV cloud sync fails when cc-switch's outbound proxy is set to
socks5://127.0.0.1:7890, but succeeds when set tohttp://127.0.0.1:7890/— the same proxy server and port, only the scheme differs.Repro
global_proxy_url) tosocks5://127.0.0.1:7890.webdavSync.status.lastErrorreports e.g.:WebDAV MKCOL 请求失败(连接失败): https://<nas-host>:5006/misc/WebDAV MKCOL 请求失败(请求超时): https://<nas-host>:5006/misc/http://127.0.0.1:7890/and re-trigger → sync succeeds immediately (lastErrorcleared,lastSyncAtupdated).Findings
PROPFIND→207,MKCOLon the existing dir →405, all instant, both direct and via the proxy.socks5://fails,http://works on the same port.Likely cause
cc-switch's outbound HTTP client treats
socks5://through a different code path thanhttp://(HTTP CONNECT). The SOCKS5 path appears flaky — "connection failed" at startup, then timeouts — while the HTTP CONNECT path is reliable. Side-effect worth noting: withsocks5://the host is resolved locally and an IP literal is tunneled (mihomo logs showmatch GeoIP/cn), whereashttp://sends the hostname to the proxy.Expected
socks5://andhttp://should behave equivalently for the same proxy endpoint.Note: this is distinct from #2686 (which is about MKCOL on an already-existing directory being misreported). Here the
http://path succeeds on 3.15.0, so the failure is specific to the SOCKS5 proxy path.