proxyctl 0.1.4__tar.gz → 0.1.5__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: proxyctl
3
- Version: 0.1.4
3
+ Version: 0.1.5
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
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "proxyctl"
3
- version = "0.1.4"
3
+ version = "0.1.5"
4
4
  description = "Proxy configuration lifecycle management for macOS and Linux"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -45,6 +45,9 @@ DEFAULTS = {
45
45
  "dns_lock_label": "com.proxyctl.dns-lock",
46
46
  # 引擎对外暴露的 HTTP/SOCKS mixed-port(应与 mihomo config 的 port/mixed-port 一致)
47
47
  "proxy_port": 7890,
48
+ # 个人附加的 NO_PROXY 项(追加到默认 localhost/私网集合之后)
49
+ # 例: ["corp.example.com", "intranet.local"] 或 "corp.example.com,intranet.local"
50
+ "no_proxy_extra": [],
48
51
  }
49
52
 
50
53
  SCRIPTS_DIR = os.path.dirname(os.path.realpath(__file__))
@@ -1207,6 +1210,12 @@ def cmd_env(config: dict, unset: bool = False):
1207
1210
  proxy_http = f"http://127.0.0.1:{port}"
1208
1211
  proxy_socks = f"socks5://127.0.0.1:{port}"
1209
1212
  no_proxy = "localhost,127.0.0.1,::1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16"
1213
+ # 用户附加的 NO_PROXY 项(个人域名等);接受 list[str] 或逗号分隔 str
1214
+ extra = config.get("no_proxy_extra") or []
1215
+ if isinstance(extra, str):
1216
+ extra = [s.strip() for s in extra.split(",") if s.strip()]
1217
+ if extra:
1218
+ no_proxy = no_proxy + "," + ",".join(extra)
1210
1219
 
1211
1220
  for var in ("http_proxy", "HTTP_PROXY"):
1212
1221
  print(f"export {var}={proxy_http};")
@@ -1220,7 +1229,7 @@ def cmd_env(config: dict, unset: bool = False):
1220
1229
 
1221
1230
  # ── 帮助 ──────────────────────────────────────────────────────────────────────
1222
1231
 
1223
- VERSION = "0.1.4"
1232
+ VERSION = "0.1.5"
1224
1233
 
1225
1234
  def cmd_help(verbose: bool = False):
1226
1235
  """打印帮助信息
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes