proxyctl 0.3.1__tar.gz → 0.3.2__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.3.1 → proxyctl-0.3.2}/PKG-INFO +1 -1
- {proxyctl-0.3.1 → proxyctl-0.3.2}/pyproject.toml +1 -1
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/__init__.py +1 -1
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/audit.py +1 -1
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/check.py +1 -1
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/cli.py +3 -2
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/trace.py +4 -4
- {proxyctl-0.3.1 → proxyctl-0.3.2}/.gitignore +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/LICENSE +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/README.md +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/man/proxyctl.1 +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/_io.py +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/builtin_plugins/__init__.py +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/builtin_plugins/connectivity_basic.py +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/builtin_plugins/corp_network.py +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/completion.py +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/core/__init__.py +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/core/plugin.py +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/engine/__init__.py +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/engine/base.py +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/engine/mihomo.py +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/engine/singbox.py +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/explain.py +0 -0
- {proxyctl-0.3.1 → proxyctl-0.3.2}/src/proxyctl/status.py +0 -0
|
@@ -439,7 +439,7 @@ def cmd_audit(audit_days: int, api_base: str, api_secret: str, do_apply: bool):
|
|
|
439
439
|
if candidates and not do_apply:
|
|
440
440
|
print(f"\n执行 {BOLD}proxyctl audit apply{NC} 自动写入双 config")
|
|
441
441
|
|
|
442
|
-
_audit_emit(as_json, _sys, _real_stdout, collector)
|
|
442
|
+
_audit_emit(as_json, as_plain, _sys, _real_stdout, collector)
|
|
443
443
|
|
|
444
444
|
|
|
445
445
|
def _audit_emit(as_json: bool, as_plain: bool, _sys, _real_stdout,
|
|
@@ -944,7 +944,7 @@ def cmd_check(engine, api: str, api_secret: str,
|
|
|
944
944
|
"detail": "skipped_in_structured_modes"},
|
|
945
945
|
{"stage": "connectivity",
|
|
946
946
|
"ok": all(c.get("ok") for c in conn) if conn else False,
|
|
947
|
-
"detail": ";".join(f"{c.get('
|
|
947
|
+
"detail": ";".join(f"{c.get('name')}={'ok' if c.get('ok') else 'X'}"
|
|
948
948
|
for c in conn)},
|
|
949
949
|
{"stage": "outbound_ip",
|
|
950
950
|
"ok": bool(out_ip),
|
|
@@ -1230,6 +1230,7 @@ def cmd_dns_unlock(config: dict):
|
|
|
1230
1230
|
print(f"{YELLOW}dns-unlock 仅支持 macOS{NC}")
|
|
1231
1231
|
return
|
|
1232
1232
|
dns_lock_label = config.get("dns_lock_label", DEFAULTS["dns_lock_label"])
|
|
1233
|
+
dns_lock_plist = f"/Library/LaunchDaemons/{dns_lock_label}.plist"
|
|
1233
1234
|
|
|
1234
1235
|
r = run(["launchctl", "bootout", f"system/{dns_lock_label}"], sudo=True, capture=True)
|
|
1235
1236
|
if r.returncode == 0:
|
|
@@ -1723,7 +1724,7 @@ def _plan_mode(backend, target: str) -> list[dict]:
|
|
|
1723
1724
|
"reversible": True,
|
|
1724
1725
|
"side_effects": ["config-write"]},
|
|
1725
1726
|
{"action": "subprocess",
|
|
1726
|
-
"target": f"launchctl kickstart -k
|
|
1727
|
+
"target": f"launchctl kickstart -k {backend.label}",
|
|
1727
1728
|
"summary": f"重启 launchd 服务以读取新 mode",
|
|
1728
1729
|
"reversible": True, "requires_sudo": True,
|
|
1729
1730
|
"side_effects": ["process"]},
|
|
@@ -1740,7 +1741,7 @@ def _plan_engine(backend, target: str) -> list[dict]:
|
|
|
1740
1741
|
new_plist = f"/Library/LaunchDaemons/<{target}>.plist"
|
|
1741
1742
|
return [
|
|
1742
1743
|
{"action": "subprocess",
|
|
1743
|
-
"target": f"launchctl bootout
|
|
1744
|
+
"target": f"launchctl bootout {backend.label}",
|
|
1744
1745
|
"summary": f"停止当前引擎 {backend.name}",
|
|
1745
1746
|
"reversible": True, "requires_sudo": True,
|
|
1746
1747
|
"side_effects": ["process"]},
|
|
@@ -575,11 +575,12 @@ def cmd_trace(raw_input: str, api: str, secret: str, config: dict = None):
|
|
|
575
575
|
}
|
|
576
576
|
|
|
577
577
|
t.join()
|
|
578
|
-
lines,
|
|
578
|
+
lines, remote_ip = connectivity_result[0]
|
|
579
579
|
for line in lines:
|
|
580
580
|
print(line)
|
|
581
581
|
collector["stages"]["connectivity"] = {
|
|
582
|
-
"ok": bool(
|
|
582
|
+
"ok": bool(remote_ip),
|
|
583
|
+
"remote_ip": remote_ip,
|
|
583
584
|
"lines": [_strip_ansi(line) for line in lines],
|
|
584
585
|
}
|
|
585
586
|
|
|
@@ -588,8 +589,7 @@ def cmd_trace(raw_input: str, api: str, secret: str, config: dict = None):
|
|
|
588
589
|
if as_json:
|
|
589
590
|
_sys.stdout = _real_stdout
|
|
590
591
|
from proxyctl._io import emit_json, envelope, OK
|
|
591
|
-
emit_json(envelope("trace", data=collector,
|
|
592
|
-
ok=bool(conn_ok), code=OK))
|
|
592
|
+
emit_json(envelope("trace", data=collector, ok=True, code=OK))
|
|
593
593
|
_sys.exit(0)
|
|
594
594
|
|
|
595
595
|
|
|
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
|