# WLOC Control Center
# Worker: https://wloc.app
# Version: 0.1.0
# Mode: diagnostic · Accuracy: 25m · Log: info
# Coordinates are local-first. Device Bridge saved values take priority over defaults.

name: WLOC Control Center
desc: WLOC profile, status bridge, diagnostics, and response patching.
http:
  mitm:
    - gs-loc.apple.com
    - gs-loc-cn.apple.com
script-providers:
  wloc-response:
    url: https://wloc.app/scripts/wloc.js
    interval: 86400
  wloc-settings:
    url: https://wloc.app/scripts/wloc-settings.js
    interval: 86400
  wloc-route:
    url: https://wloc.app/scripts/wloc-route.js
    interval: 86400
scripts:
  - name: WLOC Status Bridge
    type: http-request
    match: ^https?://gs-loc(-cn)?\.apple\.com/wloc-settings/(ping|status|save|clear|export|diag)
    script-path: wloc-settings
  - name: WLOC Route Control
    type: http-request
    match: ^https?://gs-loc(-cn)?\.apple\.com/wloc-route/(ping|save|start|pause|resume|stop|clear|status)
    script-path: wloc-route
  - name: WLOC Response Patch
    type: http-response
    match: ^https?://gs-loc(-cn)?\.apple\.com/clls/wloc
    require-body: true
    binary-body-mode: true
    script-path: wloc-response
