proxyctl 0.5.12__tar.gz → 0.5.13__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {proxyctl-0.5.12 → proxyctl-0.5.13}/PKG-INFO +1 -1
- {proxyctl-0.5.12 → proxyctl-0.5.13}/pyproject.toml +1 -1
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/check.py +12 -6
- {proxyctl-0.5.12 → proxyctl-0.5.13}/.gitignore +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/LICENSE +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/README.md +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/man/proxyctl.1 +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/__init__.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/_io.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/audit.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/autostart.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/builtin_plugins/__init__.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/builtin_plugins/connectivity_basic.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/builtin_plugins/corp_network.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/cli.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/completion.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/connections.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/connections_filters.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/connections_human.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/core/__init__.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/core/plugin.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/engine/__init__.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/engine/base.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/engine/mihomo.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/engine/singbox.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/explain.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/status.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/subscription.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/suggest.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/suggest_rules.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/trace.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/traffic.py +0 -0
- {proxyctl-0.5.12 → proxyctl-0.5.13}/src/proxyctl/traffic_store.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: proxyctl
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.13
|
|
4
4
|
Summary: Proxy configuration lifecycle management for macOS and Linux
|
|
5
5
|
Project-URL: Homepage, https://github.com/crhan/proxyctl
|
|
6
6
|
Project-URL: Issues, https://github.com/crhan/proxyctl/issues
|
|
@@ -113,13 +113,19 @@ def _route_from_connections(conns: list[dict], host: str) -> dict:
|
|
|
113
113
|
Mihomo reports chains from leaf node to policy group, for example
|
|
114
114
|
``["TW-Residential-01", "residential-tw", "claude"]``. The human
|
|
115
115
|
"line" is the leaf node, not the policy group.
|
|
116
|
+
|
|
117
|
+
/connections 的顺序是任意的,且热 reload 不会掐断旧 keep-alive 连接——
|
|
118
|
+
规则改过之后旧连接的 chains 还是旧路由。取 start 最新的一条匹配连接
|
|
119
|
+
(check 刚发完探测请求,最新的最接近当前规则的真实路由)。
|
|
116
120
|
"""
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
matched = [
|
|
122
|
+
conn for conn in conns
|
|
123
|
+
if (h := (conn.get("metadata") or {}).get("host") or "") == host
|
|
124
|
+
or h.endswith("." + host)
|
|
125
|
+
]
|
|
126
|
+
if matched:
|
|
127
|
+
newest = max(matched, key=lambda c: str(c.get("start") or ""))
|
|
128
|
+
chains = [str(c) for c in (newest.get("chains") or []) if c]
|
|
123
129
|
return {
|
|
124
130
|
"found": True,
|
|
125
131
|
"line": chains[0] if chains else "?",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|