proxygauge 1.5.6 → 1.5.7

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.
package/README.en.md ADDED
@@ -0,0 +1,377 @@
1
+ # ProxyGauge
2
+
3
+ <p align="center">
4
+ <a href="README.md">简体中文</a> · <strong>English</strong>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <img src="Resources/ProxyGauge.png" width="144" alt="ProxyGauge icon">
9
+ </p>
10
+
11
+ ProxyGauge is an open-source, native proxy health, route-verification, and leak-protection dashboard
12
+ for the latest stable releases of macOS and Windows 11. It detects the Mihomo / Clash Verge Rev core,
13
+ mixed proxy entry, system proxy, and TUN state; cross-checks the real proxy egress; and can prevent
14
+ direct-connection fallback with an optional macOS PF or Windows WFP Kill Switch. ProxyGauge ships no
15
+ proxy subscriptions or nodes and collects no telemetry.
16
+
17
+ ## Features
18
+
19
+ - Native SwiftUI on macOS and native WPF on Windows
20
+ - Automatic light/dark appearance on both platforms, with High Contrast taking priority on Windows
21
+ - macOS and Windows icons generated from the same 1024 px `ProxyGauge-source.png` master asset
22
+ - Detection of the Mihomo core, mixed port, system proxy, and TUN route
23
+ - First-run discovery of the Clash Verge Rev / Mihomo local entry and traffic mode; a manual loopback
24
+ port is requested only when discovery fails
25
+ - A traffic-entry card that reflects the real state: green for system proxy or TUN alone, orange when
26
+ both are enabled, and gray when neither is active
27
+ - Proxy-egress cross-checking through three independent public-IP sources to detect egress drift,
28
+ split routing, and transparent-proxy interference
29
+ - Fake-IP DNS verification (`198.18.x.x`) when TUN is active, exposing missing domain-routing rules
30
+ - A focused route test covering the core, entry, DNS, egress, and split-routing path without mixing
31
+ third-party IP-reputation scores into the result
32
+ - A separate, opt-in IP reputation review on both platforms: four auto-detection pages plus two direct
33
+ result pages opened only after the current proxy egress IP has been obtained
34
+ - An explainable 0–100 route score with linear progress during the test
35
+ - A topology-neutral default mode, with optional secondary egress, policy-group, and domain-rule checks
36
+ - An editable Google / Gemini / Claude chained-egress template
37
+ - Deep review in the user's default browser and real browser network path; ProxyGauge neither pins the
38
+ browser to a node nor changes the system proxy
39
+ - A shareable Clash Verge Rev / Mihomo rule pack containing no subscription or node data
40
+ - An optional, isolated PF anchor Kill Switch on macOS
41
+ - Persistent, per-user WFP leak-protection rules maintained by a dedicated LocalSystem service on Windows
42
+ - Route-test, Kill Switch, and privileged-helper scripts embedded in the macOS App Bundle
43
+
44
+ ## Platform support
45
+
46
+ | Platform | Status dashboard | Route test | Kill Switch | Artifact |
47
+ |---|---:|---:|---:|---|
48
+ | macOS 26 (Apple Silicon) | ✓ | ✓ | Optional PF anchor | `ProxyGauge.app` |
49
+ | Windows 11 x64 | ✓ | ✓ | Persistent WFP rules | Self-contained MSI |
50
+ | Windows 11 ARM64 | ✓ | ✓ | Persistent WFP rules | Self-contained MSI |
51
+
52
+ All officially released Windows 11 versions are supported. Windows 10 is explicitly rejected and does
53
+ not receive a compatibility branch.
54
+
55
+ ## Install a release
56
+
57
+ Developers can install ProxyGauge globally through npm. Node.js 18 or newer is required. The package
58
+ selects the correct platform and architecture, installs the GitHub release matching the npm package
59
+ version, and verifies the installer against `SHA256SUMS.txt` from the same release:
60
+
61
+ ```bash
62
+ npm install -g proxygauge
63
+ ```
64
+
65
+ If npm is configured to skip lifecycle scripts, run `proxygauge install` after the global install.
66
+ Without npm, use one of the platform installers below. They install the **Latest Release**, do not build
67
+ from source, and do not install a proxy client, subscription, or node.
68
+
69
+ Apple Silicon Mac:
70
+
71
+ ```bash
72
+ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ValenLan/ProxyGauge/main/Scripts/install-release-macos.sh)"
73
+ ```
74
+
75
+ Windows 11 (PowerShell; x64 or ARM64 is selected automatically, and MSI installation requests
76
+ administrator approval):
77
+
78
+ ```powershell
79
+ irm https://raw.githubusercontent.com/ValenLan/ProxyGauge/main/Scripts/install-release-windows.ps1 | iex
80
+ ```
81
+
82
+ These entry points execute the npm package or an installer script from this repository. Before running
83
+ them, consider inspecting the npm package or opening the script URL and confirming that the repository
84
+ owner is `ValenLan`. Current releases are not signed with commercial platform certificates: the macOS
85
+ app uses ad-hoc signing and is not notarized, while the Windows MSI is unsigned. Gatekeeper, SmartScreen,
86
+ and administrator-consent checks remain intact; the installers do not disable or bypass them.
87
+
88
+ ## Rule pack and subscriptions
89
+
90
+ ProxyGauge deliberately keeps these separate:
91
+
92
+ - **Subscriptions** remain under the user's proxy client. ProxyGauge does not read, store, or distribute
93
+ subscription URLs, nodes, or credentials.
94
+ - The **rule pack** lives at [`Rules/ProxyGauge-Merge.yaml`](Rules/ProxyGauge-Merge.yaml), is bundled with
95
+ both the macOS app and Windows MSI, and can be previewed, copied, or exported from Rule Management.
96
+
97
+ The rule pack uses Clash Verge Rev `prepend-rules`, placing AI and development-site rules before a
98
+ subscription's own `GEOIP` / `MATCH` rules. It also includes the Fake-IP DNS configuration needed for
99
+ TUN. The default policy-group name is `PROXY`; replace the final column before importing when a
100
+ subscription uses a different name. Export the file, create and enable a `Merge` profile in Clash Verge
101
+ Rev, and refresh the active subscription. This makes the rules shareable while every user retains
102
+ control of their own subscription.
103
+
104
+ ## macOS
105
+
106
+ ### Requirements
107
+
108
+ - Latest stable macOS 26 on Apple Silicon
109
+ - A proxy client using the Mihomo core (default process name: `verge-mihomo`)
110
+ - Default mixed entry: `127.0.0.1:7890`
111
+
112
+ ### Build
113
+
114
+ Building requires Xcode Command Line Tools. They are not required to run a prebuilt release.
115
+
116
+ ```bash
117
+ chmod +x Scripts/*.sh
118
+ Scripts/build.sh
119
+ Scripts/package-macos.sh
120
+ open "build/ProxyGauge.app"
121
+ ```
122
+
123
+ Run `Scripts/generate-icons.mjs` only after modifying the icon master; it requires Node.js and rebuilds
124
+ all icon sizes for both platforms.
125
+
126
+ The app is produced at `build/ProxyGauge.app`, and the distributable archive at
127
+ `dist/ProxyGauge-<version>-macOS-arm64.zip`. The app is ad-hoc signed and currently has neither a
128
+ Developer ID signature nor Apple notarization.
129
+
130
+ ### Share a prebuilt release
131
+
132
+ Share the GitHub Release artifacts rather than the source tree, unpacked app, or `Scripts/` directory:
133
+
134
+ - `ProxyGauge-<version>-macOS-arm64.zip`
135
+ - `ProxyGauge-<version>-win-x64.msi`
136
+ - `ProxyGauge-<version>-win-arm64.msi`
137
+
138
+ Users should download the artifact for their platform together with `SHA256SUMS.txt` and verify it
139
+ before running. A Mac user can unzip the archive and move `ProxyGauge.app` to Applications; the app
140
+ already contains the route checks, rule pack, and privileged helper needed for normal GUI use.
141
+
142
+ Because the current macOS build is not notarized, Gatekeeper may block the first launch. Only after
143
+ confirming the download source and checksum should the user choose **Open Anyway** in **System Settings →
144
+ Privacy & Security**. Developer ID signing and notarization are required before broad public distribution.
145
+
146
+ On first launch, ProxyGauge tries the Mihomo local control socket, macOS system-proxy state, and Clash
147
+ Verge Rev root settings to identify the current mixed port. It then presents the detected client, local
148
+ entry, and traffic mode for one-time confirmation. Discovery extracts only the port and traffic mode;
149
+ it does not read or store subscription URLs, nodes, UUIDs, passwords, or keys. The confirmed entry is
150
+ stored in ProxyGauge's own preferences and can be rediscovered from Connection Settings.
151
+
152
+ The release contains no proxy client, subscription, node, server address, or personal configuration.
153
+ The PF Kill Switch scripts and default rules are included, but they are installed and activated only
154
+ after the user explicitly enables the switch and approves administrator access.
155
+
156
+ ### Local installation
157
+
158
+ ```bash
159
+ Scripts/install.sh
160
+ ```
161
+
162
+ The default app location is `~/Applications/ProxyGauge.app`. Command-line and compatibility helpers are
163
+ installed at:
164
+
165
+ - `~/.local/bin/proxygauge-check`
166
+ - `~/.local/bin/proxygauge-ip-risk.jxa`
167
+ - `~/.local/bin/proxygauge-chain-check.jxa`
168
+ - `~/.local/bin/proxygauge-killswitch`
169
+ - `~/.local/share/proxygauge/`
170
+
171
+ The GUI prefers the copies embedded in its App Bundle, so moving `ProxyGauge.app` by itself does not
172
+ remove route-test or privileged-helper functionality.
173
+
174
+ ### Configuration
175
+
176
+ Normal macOS GUI users do not need a configuration file. The first-run local entry is passed directly
177
+ to the scripts embedded in the app. The following file is for developer CLI usage and advanced chained
178
+ egress, and is created by the local installation script:
179
+
180
+ ```text
181
+ ~/.config/proxygauge/config
182
+ ```
183
+
184
+ Key settings:
185
+
186
+ ```bash
187
+ PROXYGAUGE_MIXED="127.0.0.1:7890"
188
+ PROXYGAUGE_EXPECT_IP="" # Optional: verify an exact proxy egress IP
189
+ PROXYGAUGE_SECONDARY_ENABLED="0" # Keep disabled for an ordinary single-egress setup
190
+ PROXYGAUGE_SECONDARY_LABEL="Google / Gemini / Claude" # Editable template label
191
+ PROXYGAUGE_SECONDARY_GROUP="Google-Chain"
192
+ PROXYGAUGE_DEFAULT_GROUP="PROXY"
193
+ PROXYGAUGE_SECONDARY_MIXED="127.0.0.1:7891"
194
+ PROXYGAUGE_SECONDARY_DOMAINS="gemini.google.com,generativelanguage.googleapis.com,www.google.com,claude.ai,api.anthropic.com,platform.claude.com,bridge.claudeusercontent.com"
195
+ PROXYGAUGE_EXPECT_SECONDARY_IP="" # Optional: verify the secondary-egress baseline
196
+ PROXYGAUGE_ACTIVE_AI_PROBES="0" # Disabled by default: do not request any AI platform
197
+ ```
198
+
199
+ Installation and runtime identifiers are limited to `com.valenlan.proxygauge`, `ProxyGauge`,
200
+ `proxygauge`, and `PROXYGAUGE_*`. The repository contains no real server address or personal
201
+ configuration.
202
+
203
+ For an enabled secondary chained egress, checking only the policy group and rule match is insufficient.
204
+ The template merges the `listeners` configuration from
205
+ [`Rules/ProxyGauge-Google-Chain-Probe.yaml`](Rules/ProxyGauge-Google-Chain-Probe.yaml) into the active
206
+ Mihomo configuration. ProxyGauge then queries the real egress through a dedicated mixed entry bound
207
+ only to `127.0.0.1:7891` and displays it beside the default egress. The example entry is fixed to
208
+ `Google-Chain`, never switches a policy group temporarily, and is not exposed to the LAN. Users can
209
+ replace its group, port, and domains under **Route Test → Profile**.
210
+
211
+ ### Optional PF Kill Switch
212
+
213
+ The home-screen Kill Switch is a persistent on/off control and does not collect server IPs, interface
214
+ names, or other rule parameters. The first time it is enabled, ProxyGauge uses its embedded template to
215
+ detect the physical interface and confirm that the Mihomo core is running as a system service. In one
216
+ administrator-approved operation, it validates the anchor and a temporary main configuration, backs up
217
+ `/etc/pf.conf`, installs the rules, and enables protection. A failure at any stage leaves protection off
218
+ and rolls back that installation attempt.
219
+
220
+ Normal app launch and status refresh never request administrator access and never modify PF.
221
+
222
+ When protection is enabled, the helper installs a root-owned recovery executable at
223
+ `/Library/PrivilegedHelperTools/com.valenlan.proxygauge.killswitch` and registers
224
+ `/Library/LaunchDaemons/com.valenlan.proxygauge.killswitch.plist`. A root-only intent marker is stored at
225
+ `/var/db/proxygauge/enabled`. At boot and every 15 seconds, the LaunchDaemon validates the anchor,
226
+ physical interface, and PF enable reference. Explicitly disabling protection removes the marker, so
227
+ both enabled and disabled intent survive app exits and reboots. The UI reads the root-owned runtime
228
+ state at `/var/run/proxygauge-killswitch.state` and verifies the current boot's PF reference instead of
229
+ reusing a stale green state.
230
+
231
+ Because PF affects the entire Mac, automatic installation permits only the root-owned proxy core and
232
+ other root system services to use the physical interface. Ordinary apps must use the local proxy or
233
+ TUN, and user processes receive no separate direct port-53 exception. Enabling protection also clears
234
+ existing PF states on the physical interface so old connections are re-evaluated. CLI users can install
235
+ the same parameter-free configuration with:
236
+
237
+ ```bash
238
+ Scripts/install-pf.sh
239
+ ```
240
+
241
+ The script:
242
+
243
+ 1. Generates `/etc/pf.anchors/proxygauge`.
244
+ 2. Registers `anchor "proxygauge"` in the current `/etc/pf.conf`.
245
+ 3. Validates both the anchor and system PF configuration before installation.
246
+ 4. Backs up `/etc/pf.conf` to `/etc/pf.conf.proxygauge.bak` on the first run.
247
+
248
+ The CLI installer detects the interface automatically, writes only the bundled rules, and leaves
249
+ protection disabled until the user enables it in ProxyGauge. Only the `proxygauge` anchor is supported;
250
+ systems with another legacy anchor must clean it up or migrate it separately.
251
+
252
+ The Kill Switch trusts the proxy core itself. macOS PF must allow root-owned Mihomo and system services
253
+ to send traffic; Windows WFP must allow the executable that owns the mixed-port listener. Protection
254
+ therefore prevents ordinary applications from falling back to direct connections when the proxy stops,
255
+ but it cannot prevent the proxy core from choosing `DIRECT`. ProxyGauge neither reads subscriptions and
256
+ nodes nor guesses endpoint IPs from transient connections. A stricter endpoint-only mode will be added
257
+ only if the complete endpoint set can be obtained, verified, and replaced atomically.
258
+
259
+ ## Windows
260
+
261
+ The Windows implementation lives in [`Windows/`](Windows/) and uses .NET 10 WPF without a third-party
262
+ UI framework.
263
+
264
+ ### Use a prebuilt release
265
+
266
+ 1. Download `ProxyGauge-<version>-win-x64.msi` from GitHub Releases, or
267
+ `ProxyGauge-<version>-win-arm64.msi` on Windows ARM, and verify it with `SHA256SUMS.txt`.
268
+ 2. Run the MSI and approve administrator access once to install the auto-starting Guard Service.
269
+ 3. Launch ProxyGauge from the Start menu, confirm the mixed address and port, and explicitly enable
270
+ **System Protection**.
271
+
272
+ The UI and service in the MSI are self-contained; users do not need to install .NET. SmartScreen may
273
+ warn on the first launch of the current unsigned personal build.
274
+
275
+ ### Local build
276
+
277
+ Building requires the .NET 10 SDK, CMake, MSVC, and Windows 11:
278
+
279
+ ```powershell
280
+ dotnet publish Windows/ProxyGauge.Windows.csproj `
281
+ --configuration Release `
282
+ --runtime win-x64 `
283
+ --self-contained true
284
+ ```
285
+
286
+ Windows configuration is stored at:
287
+
288
+ ```text
289
+ %APPDATA%\ProxyGauge\config.json
290
+ ```
291
+
292
+ Windows Guard uses the built-in Windows Filtering Platform and installs no kernel driver. When enabled,
293
+ the service creates rules only for the user who enabled protection: loopback proxy traffic, the actual
294
+ owner of the mixed-port listener, and recognized TUN interfaces are allowed, while all other direct
295
+ IPv4 and IPv6 connections are blocked. The rules are persistent WFP objects independent of the WPF UI;
296
+ closing or crashing the UI, signing out, or rebooting does not remove protection.
297
+
298
+ Only an explicit **Disable** action in the UI or the administrator recovery command permanently removes
299
+ the rules. If the UI is unavailable, run this in an elevated terminal:
300
+
301
+ ```powershell
302
+ & "C:\Program Files\ProxyGauge\ProxyGauge.Guard.exe" --emergency-off
303
+ ```
304
+
305
+ If that file is also damaged, run `sc.exe config ProxyGaugeGuard start= disabled` as administrator and
306
+ reboot. BFE will not load persistent rules belonging to a disabled provider service. This is a final
307
+ recovery path, not an everyday switch.
308
+
309
+ The uninstaller first stops the service and performs the same cleanup. If it cannot remove every
310
+ persistent rule, uninstallation fails instead of leaving an unrecoverable partial state.
311
+
312
+ ## Releases
313
+
314
+ Every push and pull request builds and tests macOS, Windows x64, and Windows ARM64. Only a
315
+ `v<version>` tag exactly matching the app version causes the workflow to stage one macOS ZIP and two
316
+ Windows MSIs as Actions artifacts, create a GitHub Release, and upload those installers together with
317
+ `SHA256SUMS.txt`. Temporary artifacts are retained for one day; Release artifacts are retained by
318
+ GitHub. For the current version, the expected release tag is `v1.5.7`.
319
+
320
+ A tag creates a production release and must be pushed explicitly by a maintainer only after all local
321
+ tests and ordinary push CI have passed. Build scripts never create the tag. Releases are neither drafts
322
+ nor prereleases and are marked Latest; the one-line installers select only the Latest production release.
323
+
324
+ ## Contributing and security reports
325
+
326
+ - See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the development environment, test requirements, and pull
327
+ request checklist.
328
+ - Report vulnerabilities privately as described in [`SECURITY.md`](SECURITY.md). Do not include
329
+ vulnerability details, real subscriptions, nodes, egress IPs, or personal configuration in a public issue.
330
+ - See [`THIRD-PARTY-NOTICES.md`](THIRD-PARTY-NOTICES.md) for third-party build and distribution notices.
331
+
332
+ ## License
333
+
334
+ ProxyGauge is open source under the [`MIT License`](LICENSE). It permits use, copying, modification,
335
+ merging, publication, and distribution provided that copies or substantial portions retain the copyright
336
+ and license notice. The software is provided as-is, without warranty. The license itself does not replace
337
+ verification of the authorization and provenance of code, icons, copy, and third-party dependencies.
338
+
339
+ ## Privacy and security
340
+
341
+ - Route tests access public IP-query and test services through the configured local proxy.
342
+ - Default route tests do not request Claude, ChatGPT, or Gemini pages or APIs. With the secondary-routing
343
+ template enabled, rule hits are read from the local Mihomo runtime, neutral 204 URLs are used for
344
+ latency, and the real egress is confirmed through the dedicated local entry and public IP services.
345
+ Only macOS users who explicitly set `PROXYGAUGE_ACTIVE_AI_PROBES=1` enable active requests to the three
346
+ AI APIs; account pages are never opened automatically.
347
+ - Egress consistency is checked through `api.ipify.org`, `ifconfig.me`, and `ip.sb`. At least two sources
348
+ must agree. The same sources are used for an optional secondary-egress probe.
349
+ - Normal route tests do not submit the egress IP to reputation services or produce an IP-reputation score.
350
+ - IPPure, IPCheck.ing, BrowserLeaks, IPQS, Scamalytics, and AbuseIPDB are opened only after the user clicks
351
+ the separate review action and confirms it. Some services may require a CAPTCHA. Their databases,
352
+ definitions, and update cycles differ, so results should be read independently rather than combined
353
+ into a false-precision score.
354
+ - After confirmation, ProxyGauge obtains the current egress IP through the configured mixed entry solely
355
+ to build direct `scamalytics.com/ip/<IP>` and `abuseipdb.com/check/<IP>` result URLs. If the lookup fails,
356
+ those two parameterized pages are not opened. The remaining four pages detect the visitor IP themselves.
357
+ - ProxyGauge does not read Claude, ChatGPT, or other website cookies or account data. Account status is
358
+ never inserted into the route report.
359
+ - The route score covers the active test profile. In general mode it normalizes the core, port, entry,
360
+ and egress stages; policy, rule, and secondary-egress weights are included only when secondary routing
361
+ is enabled. A warning loses half the relevant weight, a failure loses all of it, and a critical entry
362
+ failure caps the score at 49. This is not a speed, reputation, anonymity, or account-security score.
363
+ - The macOS IP reputation review uses the default browser, existing browser profile, and real browser
364
+ network path. It neither creates a temporary profile nor changes the system proxy.
365
+ - ProxyGauge uploads no configuration, collects no telemetry, and stores no browsing history.
366
+ - macOS administrator access is limited to ProxyGauge's PF anchor and the root-owned recovery helper,
367
+ LaunchDaemon, and enable marker described above.
368
+ - The Windows UI does not run as administrator. The MSI requests elevation only to install or remove the
369
+ LocalSystem Guard Service, which manages its own WFP provider and sublayer without changing the
370
+ Windows Firewall default policy.
371
+ - Never commit `~/.config/proxygauge/config`.
372
+
373
+ ## Project status
374
+
375
+ ProxyGauge is a focused utility for the maintainer's current macOS and Windows 11 environments. Other
376
+ proxy clients, ports, and PF network interfaces may require configuration changes. Older operating
377
+ systems are outside the tested and maintained scope.
package/README.md CHANGED
@@ -294,7 +294,7 @@ BFE 在启动时不会装载属于已禁用服务的持久 provider 规则。这
294
294
  每次 push 与 pull request 都会构建并测试 macOS、Windows x64 和 Windows ARM64。只有推送与
295
295
  应用版本完全一致的 `v<版本>` 标签时,工作流才会把一个 macOS ZIP 和两个 Windows MSI 暂存
296
296
  为 Actions artifacts,创建 GitHub Release,并上传这些安装包与 `SHA256SUMS.txt`。临时 artifacts
297
- 只保留 1 天;正式安装包由 Release 长期保存。例如当前版本对应的发布标签应为 `v1.5.6`。
297
+ 只保留 1 天;正式安装包由 Release 长期保存。例如当前版本对应的发布标签应为 `v1.5.7`。
298
298
 
299
299
  创建标签会产生正式发布结果,必须在全部本地测试和普通 push CI 通过后由维护者明确执行;
300
300
  构建脚本本身不会自动创建标签。
@@ -1,4 +1,4 @@
1
- $ErrorActionPreference = "Stop"
1
+ $ErrorActionPreference = "Stop"
2
2
  $ProgressPreference = "SilentlyContinue"
3
3
  [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proxygauge",
3
- "version": "1.5.6",
3
+ "version": "1.5.7",
4
4
  "description": "Open-source native proxy health, route verification, and leak-protection dashboard for macOS and Windows 11.",
5
5
  "license": "MIT",
6
6
  "author": "ValenLan",