feat: unify app and third-party wloc features

This commit is contained in:
xweiba
2026-08-10 13:35:47 +08:00
parent 27af50375d
commit 41dfe7a8ed
36 changed files with 1702 additions and 73 deletions
+40 -17
View File
@@ -1,15 +1,18 @@
# Third-party proxy module snapshots
# Third-party proxy modules
The files under `Resources/ThirdPartyProxyModules/` are bundled configuration
snapshots from [Yu9191/wloc](https://github.com/Yu9191/wloc). They are retained
in the App bundle for release provenance and offline inspection. The setup UI
copies the official subscription URL instead of exporting these files.
The files under `Resources/ThirdPartyProxyModules/` are project-owned module
definitions used by the App's default domestic-mirror subscription path. Their
executable scripts are built from `ThirdParty/WlocScripts/src/` and checked in
under the versioned `ThirdParty/WlocScripts/dist/v1/` directory.
- Upstream commit: `eec07a8dc8de6dbaee8eac1fb376e4d03020154a`
- Snapshot date: 2026-08-06
- Source directory: `modules/`
The direct GitHub Raw variants are stored under
`ThirdParty/WlocScripts/modules/direct/`. The Settings switch selects which
module URL the App copies:
| Bundled file | Client |
- enabled by default: `gh-proxy.org` in front of GitHub Raw;
- disabled: GitHub Raw directly.
| Module file | Client |
|---|---|
| `wloc.module` | Shadowrocket |
| `wloc.sgmodule` | Surge and Egern |
@@ -17,15 +20,35 @@ copies the official subscription URL instead of exporting these files.
| `wloc.lpx` | Loon |
| `wloc.stoverride` | Stash |
SHA-256:
Egern reuses the Surge module. Stash imports `.stoverride` directly.
Both script entry points are owned by this repository:
- `wloc.js` patches Apple WLOC response bodies;
- `wloc-settings.js` implements `/wloc-settings/save` and
`/wloc-settings/version`.
The generated scripts target ES2017 and avoid hard dependencies on `BigInt`,
optional chaining, nullish coalescing, `globalThis`, `URLSearchParams`, and
`Object.fromEntries`. This keeps them usable by older proxy-client releases
that still implement the established module syntax, binary response body,
`$done`, and persistent-storage APIs.
Already-installed legacy modules that point to another repository are not
silently migrated because their remote script URL is outside this project's
control. Those users must re-import the project-owned module before using the
versioned protocol and motion setting.
Current bundled module SHA-256 values:
```text
bb5e17b60027704971660b0ea2df3560ceff973c27d43e7f2c2c18b48d368ac6 wloc.conf
1fb451616fb17242849f72490f016afcdb8aa81a0b086f6dd5f94e1af3d58ee1 wloc.lpx
97cab104056428aa0e90521c3bf2646e9739b0b4c83272b31790f99584bca89e wloc.module
5d6b82c31316f4a7be65e3b8d2335f4338e01af98e262948118eefe63abf7034 wloc.sgmodule
cb06593752db8b223dfa5cd1cbd089115fe3a541f5c8532491615923e83df2cb wloc.stoverride
263f3eae0ec4ef19d03eefa58f28e6545cccbc6a2d32c5e1d3493ba207ca7605 wloc.conf
c0755a9edb2a1686190d12d156e9aa53693e15721efc4a29f9a06c2bf3115a5f wloc.lpx
06a426e4f37828d18b80abea04a8ade4fa7f93817cb1e37928c52da3e46f693a wloc.module
f6b9fc51c4d3c4fca837ff896dbe544f99604d9646f05841bad82bfdfdf5c4fa wloc.sgmodule
100e569e6ca3183f7da15fbb38ddb5cd91178488c0d9774acabc2721fa85a58c wloc.stoverride
```
The official subscription URLs are the setup UI's import path. Egern reuses the
Surge module. Stash imports `.stoverride` directly.
The project acknowledges [Yu9191/wloc](https://github.com/Yu9191/wloc) as a
reference for earlier WLOC implementation ideas. That acknowledgement is not
an executable dependency or subscription source.