mirror of
https://github.com/xweiba/location-spoofer.git
synced 2026-09-21 22:30:46 +08:00
fix(i18n): 完善国际化并迁移 WLOC 脚本
This commit is contained in:
+46
-21
@@ -1,20 +1,26 @@
|
||||
# Third-party proxy modules
|
||||
|
||||
Third-party proxy mode (Surge / Quantumult X / Loon / Shadowrocket / Stash /
|
||||
Egern) now relies entirely on the upstream
|
||||
[Yu9191/wloc](https://github.com/Yu9191/wloc) modules. The App no longer
|
||||
maintains or ships project-owned module/script copies, so it never drifts
|
||||
from the upstream protocol.
|
||||
The third-party proxy modules and WLOC scripts are maintained in this
|
||||
repository. The original `Yu9191/wloc` repository was deleted, and its Raw
|
||||
URLs now return HTTP 404, so it is retained only as provenance and is not a
|
||||
runtime dependency.
|
||||
|
||||
## Subscription addresses
|
||||
## Hosted files
|
||||
|
||||
The App builds each client's module subscription URL directly from the
|
||||
upstream repository:
|
||||
- Mirrored module subscriptions: `Resources/ThirdPartyProxyModules/`
|
||||
- Direct module subscriptions: `ThirdParty/WlocScripts/modules/direct/`
|
||||
- Versioned generated scripts: `ThirdParty/WlocScripts/dist/v1/`
|
||||
- Script source and tests: `ThirdParty/WlocScripts/src/` and
|
||||
`ThirdParty/WlocScripts/test/`
|
||||
|
||||
- default mirror (gh-proxy):
|
||||
`https://gh-proxy.org/https://raw.githubusercontent.com/Yu9191/wloc/refs/heads/main/modules/<file>`
|
||||
The App appends `?v=1.0.7` to module subscription URLs, and every module uses
|
||||
the same query parameter for its generated script URLs, to invalidate client
|
||||
caches:
|
||||
|
||||
- default mirror:
|
||||
`https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/Resources/ThirdPartyProxyModules/<file>?v=1.0.7`
|
||||
- direct:
|
||||
`https://raw.githubusercontent.com/Yu9191/wloc/refs/heads/main/modules/<file>`
|
||||
`https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/modules/direct/<file>?v=1.0.7`
|
||||
|
||||
| Module file | Client |
|
||||
|---|---|
|
||||
@@ -24,17 +30,36 @@ upstream repository:
|
||||
| `wloc.lpx` | Loon |
|
||||
| `wloc.stoverride` | Stash |
|
||||
|
||||
No `?v=` cache-bust is appended: the URL points at upstream's latest content,
|
||||
and re-importing the subscription in the proxy client re-fetches it.
|
||||
The hosted files become downloadable from these URLs after this change is
|
||||
merged into `main`. Until then, validate them from the checked-out paths.
|
||||
|
||||
## Script protocol
|
||||
|
||||
The upstream `wloc.js` patches Apple WLOC responses and reads coordinates from
|
||||
the `wloc_settings` persistent key or the module `argument` config. The
|
||||
upstream `wloc-settings.js` implements `wloc-settings/save` (query/clear/save)
|
||||
using `lon`/`lat`/`acc`/`randomRadius` parameters.
|
||||
`wloc.js` patches Apple WLOC responses and reads coordinates from the
|
||||
`wloc_settings` persistent key or the module `argument` config.
|
||||
`wloc-settings.js` implements `wloc-settings/save` (query/clear/save) using
|
||||
`lon`/`lat`/`acc`/`randomRadius` parameters.
|
||||
|
||||
The App's third-party save sends `lon`/`lat`/`acc`, matching the upstream
|
||||
script. Motion-state simulation (fields 11/12) is **not** implemented by the
|
||||
upstream scripts and is unavailable in third-party mode; it remains available
|
||||
in APP mode (built-in proxy).
|
||||
The App's third-party save sends `lon`/`lat`/`acc`. Motion-state simulation
|
||||
(fields 11/12) is unavailable in third-party mode; it remains available in
|
||||
App Mode through the built-in proxy.
|
||||
|
||||
## Provenance and maintenance
|
||||
|
||||
The response-rewrite approach and original module structure were derived from
|
||||
`Yu9191/wloc`. The repository is no longer available, but its attribution is
|
||||
preserved in module metadata and project acknowledgements. Bundled dependency
|
||||
notices are recorded in `ThirdParty/WlocScripts/THIRD_PARTY_NOTICES.md`.
|
||||
|
||||
Build and test the scripts with:
|
||||
|
||||
```bash
|
||||
cd ThirdParty/WlocScripts
|
||||
npm ci
|
||||
npm test
|
||||
npm run build
|
||||
```
|
||||
|
||||
If an authoritative, maintained upstream returns, compare its license,
|
||||
protocol compatibility, tests, and release guarantees before considering a
|
||||
switch away from the project-owned copies.
|
||||
|
||||
Reference in New Issue
Block a user