feat: 维护中国代理池并支持账号自动均匀使用

This commit is contained in:
2026-11-15 02:18:17 +08:00
parent aa26d00c60
commit ce2d6e08dd
20 changed files with 1733 additions and 162 deletions
+12
View File
@@ -244,3 +244,15 @@ def test_proxy_off_scheme_clears_settings() -> None:
assert account.proxy_scheme == ""
assert account.proxy_host == ""
assert account.proxy_port is None
def test_proxy_pool_scheme_enables_auto() -> None:
account = _ProxyAccount()
apply_proxy(account, "pool")
view = proxy_view(account)
assert view["enabled"] is True
assert view["scheme"] == "pool"
assert account.use_proxy_pool is True
apply_proxy(account, "http", "10.0.0.1", 8080)
assert account.use_proxy_pool is False
assert proxy_view(account)["scheme"] == "http"