From a666f177e69c6bad4a844f31690967afc4f09efe Mon Sep 17 00:00:00 2001 From: xweiba Date: Tue, 1 Sep 2026 17:08:34 +0800 Subject: [PATCH] fix: intercept gsp-ssl.ls.apple.com and bluedot wloc endpoints Devices in China can send clls/wloc requests to gsp-ssl.ls.apple.com or bluedot.is.autonavi.com instead of gs-loc.apple.com, so the third-party modules only MITM'd gs-loc hosts and silently failed to spoof location. - Add gsp-ssl.ls.apple.com, bluedot.is.autonavi.com and bluedot.is.autonavi.com.gds.alibabadns.com to all 10 module files (pattern + MITM hostname) and to the built-in proxy isWlocHost - Update app interceptionHostnames and the copy-hostnames guidance - Bump module subscription version to 1.0.1 to bust proxy client cache --- App/FirstSetupView.swift | 10 +++++----- App/SettingsView.swift | 6 +++--- Core/proxy.go | 8 +++++++- Resources/ThirdPartyProxyModules/wloc.conf | 4 ++-- Resources/ThirdPartyProxyModules/wloc.lpx | 4 ++-- Resources/ThirdPartyProxyModules/wloc.module | 4 ++-- Resources/ThirdPartyProxyModules/wloc.sgmodule | 4 ++-- .../ThirdPartyProxyModules/wloc.stoverride | 5 ++++- Shared/ThirdPartyProxyManager.swift | 7 +++++-- Tests/third_party_mode_contract_test.sh | 10 +++++----- .../WlocScripts/modules/direct/wloc.conf | 4 ++-- ThirdParty/WlocScripts/modules/direct/wloc.lpx | 4 ++-- .../WlocScripts/modules/direct/wloc.module | 4 ++-- .../WlocScripts/modules/direct/wloc.sgmodule | 4 ++-- .../WlocScripts/modules/direct/wloc.stoverride | 5 ++++- docs/THIRD_PARTY_MODULES.md | 18 ++++++++++++------ 16 files changed, 61 insertions(+), 40 deletions(-) diff --git a/App/FirstSetupView.swift b/App/FirstSetupView.swift index bc8dec6..627c64e 100644 --- a/App/FirstSetupView.swift +++ b/App/FirstSetupView.swift @@ -464,7 +464,7 @@ struct FirstSetupView: View { Text("适配要求") .font(.subheadline.bold()) - Text("客户端需要支持请求脚本、持久化存储、HTTP 200 JSON 响应、Apple WLOC 响应脚本,以及 gs-loc.apple.com / gs-loc-cn.apple.com 的 HTTPS 解密。保存接口和 WLOC 响应脚本必须读取同一份持久化数据。") + Text("客户端需要支持请求脚本、持久化存储、HTTP 200 JSON 响应、Apple WLOC 响应脚本,以及 Apple 定位域名(gs-loc.apple.com、gsp-ssl.ls.apple.com、bluedot.is.autonavi.com 等)的 HTTPS 解密。保存接口和 WLOC 响应脚本必须读取同一份持久化数据。") .font(.footnote) .foregroundStyle(.secondary) } @@ -539,7 +539,7 @@ struct FirstSetupView: View { .font(.caption) .foregroundStyle(.secondary) .frame(maxWidth: .infinity, alignment: .leading) - Text("配置时请使用 gs-loc.apple.com 和 gs-loc-cn.apple.com 两个域名。") + Text("配置时请复制下方全部解密域名(含 gsp-ssl.ls.apple.com、bluedot.is.autonavi.com)。") .font(.caption) .foregroundStyle(.secondary) .frame(maxWidth: .infinity, alignment: .leading) @@ -564,11 +564,11 @@ struct FirstSetupView: View { VStack(alignment: .leading, spacing: 12) { instructionRow(1, "进入“配置 → 本地文件”,找到带黄点的配置,点击右侧 i 图标。") instructionRow(2, "进入“HTTPS 解密”,开启解密开关。") - instructionRow(3, "在域名列表中添加 gs-loc.apple.com 和 gs-loc-cn.apple.com。") + instructionRow(3, "在域名列表中添加下方复制的全部解密域名。") setupScreenshot( assetName: "ShadowrocketHTTPSDecryption", title: "配置 HTTPS 解密", - caption: "1 开启 HTTPS 解密,2 添加 gs-loc.apple.com 和 gs-loc-cn.apple.com,3 打开证书设置。" + caption: "1 开启 HTTPS 解密,2 添加复制的全部解密域名,3 打开证书设置。" ) mitmHostnameCopyButton @@ -602,7 +602,7 @@ struct FirstSetupView: View { copiedMITMHostname = true } label: { Label( - copiedMITMHostname ? "已复制两个解密域名" : "复制两个解密域名", + copiedMITMHostname ? "已复制解密域名" : "复制解密域名", systemImage: "doc.on.doc" ) .frame(maxWidth: .infinity) diff --git a/App/SettingsView.swift b/App/SettingsView.swift index a2b20de..0b64175 100644 --- a/App/SettingsView.swift +++ b/App/SettingsView.swift @@ -469,7 +469,7 @@ struct SettingsView: View { UIPasteboard.general.string = ThirdPartyProxyManager.interceptionHostnamesText copiedMITMHostnames = true } label: { - Label(copiedMITMHostnames ? "已复制两个解密域名" : "复制两个解密域名", systemImage: "doc.on.doc") + Label(copiedMITMHostnames ? "已复制解密域名" : "复制解密域名", systemImage: "doc.on.doc") } Button { @@ -493,7 +493,7 @@ struct SettingsView: View { .font(.footnote).foregroundStyle(.secondary) } - Text("复制模块订阅地址后,在对应代理客户端中添加模块/重写订阅,并为 gs-loc.apple.com 和 gs-loc-cn.apple.com 启用 MITM。第三方客户端保存坐标后,即使关闭本 App,坐标仍由代理客户端持久化并继续生效。") + Text("复制模块订阅地址后,在对应代理客户端中添加模块/重写订阅,并为复制的全部域名(含 gsp-ssl.ls.apple.com、bluedot.is.autonavi.com)启用 MITM。第三方客户端保存坐标后,即使关闭本 App,坐标仍由代理客户端持久化并继续生效。") .font(.footnote).foregroundStyle(.secondary) } } @@ -531,7 +531,7 @@ struct SettingsView: View { return """ App 在设备本地运行一个代理服务器(127.0.0.1:8888)。 - 通过 WiFi 手动代理配置,让系统发往 gs-loc.apple.com 和 gs-loc-cn.apple.com 的定位请求经过这个本地代理。代理使用已安装的 CA 证书对 HTTPS 流量做中间人解密,把 Apple 返回的定位坐标改写为你设置的虚拟坐标,再加密返回给系统,从而实现虚拟定位。 + 通过 WiFi 手动代理配置,让系统发往 Apple 定位域名(gs-loc.apple.com、gsp-ssl.ls.apple.com、bluedot.is.autonavi.com 等)的定位请求经过这个本地代理。代理使用已安装的 CA 证书对 HTTPS 流量做中间人解密,把 Apple 返回的定位坐标改写为你设置的虚拟坐标,再加密返回给系统,从而实现虚拟定位。 """ } diff --git a/Core/proxy.go b/Core/proxy.go index 9c20d29..8448bd5 100644 --- a/Core/proxy.go +++ b/Core/proxy.go @@ -64,7 +64,13 @@ func isWlocHost(host string) bool { host = h } } - return host == "gs-loc.apple.com" || host == "gs-loc-cn.apple.com" + switch host { + case "gs-loc.apple.com", "gs-loc-cn.apple.com", + "gsp-ssl.ls.apple.com", "bluedot.is.autonavi.com", + "bluedot.is.autonavi.com.gds.alibabadns.com": + return true + } + return false } func newProxy(cert *tls.Certificate) *goproxy.ProxyHttpServer { diff --git a/Resources/ThirdPartyProxyModules/wloc.conf b/Resources/ThirdPartyProxyModules/wloc.conf index c7dff58..d111a86 100644 --- a/Resources/ThirdPartyProxyModules/wloc.conf +++ b/Resources/ThirdPartyProxyModules/wloc.conf @@ -4,8 +4,8 @@ #!homepage=https://github.com/xweiba/location-spoofer [rewrite_local] -^https?:\/\/gs-loc(-cn)?\.apple\.com\/clls\/wloc url script-response-body https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js +^https?:\/\/(?:gs-loc(?:-cn)?\.apple\.com|gsp-ssl\.ls\.apple\.com|bluedot\.is\.autonavi\.com(?:\.gds\.alibabadns\.com)?)\/clls\/wloc url script-response-body https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js ^https?:\/\/gs-loc(-cn)?\.apple\.com\/wloc-settings\/(save|version) url script-echo-response https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc-settings.js [mitm] -hostname = gs-loc.apple.com, gs-loc-cn.apple.com +hostname = gs-loc.apple.com, gs-loc-cn.apple.com, gsp-ssl.ls.apple.com, bluedot.is.autonavi.com, bluedot.is.autonavi.com.gds.alibabadns.com diff --git a/Resources/ThirdPartyProxyModules/wloc.lpx b/Resources/ThirdPartyProxyModules/wloc.lpx index 66beb6c..d13614e 100644 --- a/Resources/ThirdPartyProxyModules/wloc.lpx +++ b/Resources/ThirdPartyProxyModules/wloc.lpx @@ -11,8 +11,8 @@ accuracy = input, "25", tag=精度(米) logLevel = select, "info", "off", "error", "warn", "debug", "all", tag=日志级别 [Script] -http-response ^https?:\/\/gs-loc(-cn)?\.apple\.com\/clls\/wloc script-path=https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js, requires-body=true, binary-body-mode=true, timeout=30, tag=Apple WLOC +http-response ^https?:\/\/(?:gs-loc(?:-cn)?\.apple\.com|gsp-ssl\.ls\.apple\.com|bluedot\.is\.autonavi\.com(?:\.gds\.alibabadns\.com)?)\/clls\/wloc script-path=https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js, requires-body=true, binary-body-mode=true, timeout=30, tag=Apple WLOC http-request ^https?:\/\/gs-loc(-cn)?\.apple\.com\/wloc-settings\/(save|version) script-path=https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc-settings.js, timeout=10, tag=WLOC Settings [MITM] -hostname = gs-loc.apple.com, gs-loc-cn.apple.com +hostname = gs-loc.apple.com, gs-loc-cn.apple.com, gsp-ssl.ls.apple.com, bluedot.is.autonavi.com, bluedot.is.autonavi.com.gds.alibabadns.com diff --git a/Resources/ThirdPartyProxyModules/wloc.module b/Resources/ThirdPartyProxyModules/wloc.module index 2d2163a..425118f 100644 --- a/Resources/ThirdPartyProxyModules/wloc.module +++ b/Resources/ThirdPartyProxyModules/wloc.module @@ -5,8 +5,8 @@ #!category=Tools [Script] -Apple WLOC = type=http-response,pattern=^https?:\/\/gs-loc(-cn)?\.apple\.com\/clls\/wloc,requires-body=1,binary-body-mode=1,max-size=0,timeout=30,script-path=https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js +Apple WLOC = type=http-response,pattern=^https?:\/\/(?:gs-loc(?:-cn)?\.apple\.com|gsp-ssl\.ls\.apple\.com|bluedot\.is\.autonavi\.com(?:\.gds\.alibabadns\.com)?)\/clls\/wloc,requires-body=1,binary-body-mode=1,max-size=0,timeout=30,script-path=https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js WLOC Settings = type=http-request,pattern=^https?:\/\/gs-loc(-cn)?\.apple\.com\/wloc-settings\/(save|version),requires-body=0,max-size=0,timeout=10,script-path=https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc-settings.js [MITM] -hostname = %APPEND% gs-loc.apple.com, gs-loc-cn.apple.com +hostname = %APPEND% gs-loc.apple.com, gs-loc-cn.apple.com, gsp-ssl.ls.apple.com, bluedot.is.autonavi.com, bluedot.is.autonavi.com.gds.alibabadns.com diff --git a/Resources/ThirdPartyProxyModules/wloc.sgmodule b/Resources/ThirdPartyProxyModules/wloc.sgmodule index c531258..45c3577 100644 --- a/Resources/ThirdPartyProxyModules/wloc.sgmodule +++ b/Resources/ThirdPartyProxyModules/wloc.sgmodule @@ -7,8 +7,8 @@ #!arguments-desc=经度/纬度: 默认坐标(在线选点储存后优先)\n精度: GPS精度(米)\n日志级别: off/error/warn/info/debug/all\n\n使用方法: 打开选点页面 -> 选位置 -> 储存到设备 [Script] -Apple WLOC = type=http-response, pattern="^https?:\/\/gs-loc(-cn)?\.apple\.com\/clls\/wloc", requires-body=1, binary-body-mode=1, max-size=0, timeout=30, script-path=https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js +Apple WLOC = type=http-response, pattern="^https?:\/\/(?:gs-loc(?:-cn)?\.apple\.com|gsp-ssl\.ls\.apple\.com|bluedot\.is\.autonavi\.com(?:\.gds\.alibabadns\.com)?)\/clls\/wloc", requires-body=1, binary-body-mode=1, max-size=0, timeout=30, script-path=https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js WLOC Settings = type=http-request, pattern="^https?:\/\/gs-loc(-cn)?\.apple\.com\/wloc-settings\/(save|version)", requires-body=0, max-size=0, timeout=10, script-path=https://gh-proxy.org/https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc-settings.js [MITM] -hostname = %APPEND% gs-loc.apple.com, gs-loc-cn.apple.com +hostname = %APPEND% gs-loc.apple.com, gs-loc-cn.apple.com, gsp-ssl.ls.apple.com, bluedot.is.autonavi.com, bluedot.is.autonavi.com.gds.alibabadns.com diff --git a/Resources/ThirdPartyProxyModules/wloc.stoverride b/Resources/ThirdPartyProxyModules/wloc.stoverride index ea52815..9cb59aa 100644 --- a/Resources/ThirdPartyProxyModules/wloc.stoverride +++ b/Resources/ThirdPartyProxyModules/wloc.stoverride @@ -8,8 +8,11 @@ http: mitm: - "gs-loc.apple.com" - "gs-loc-cn.apple.com" + - "gsp-ssl.ls.apple.com" + - "bluedot.is.autonavi.com" + - "bluedot.is.autonavi.com.gds.alibabadns.com" script: - - match: ^https?:\/\/gs-loc(-cn)?\.apple\.com\/clls\/wloc + - match: ^https?:\/\/(?:gs-loc(?:-cn)?\.apple\.com|gsp-ssl\.ls\.apple\.com|bluedot\.is\.autonavi\.com(?:\.gds\.alibabadns\.com)?)\/clls\/wloc name: WLOC.Location type: response require-body: true diff --git a/Shared/ThirdPartyProxyManager.swift b/Shared/ThirdPartyProxyManager.swift index 20e1a9b..301af0a 100644 --- a/Shared/ThirdPartyProxyManager.swift +++ b/Shared/ThirdPartyProxyManager.swift @@ -81,7 +81,10 @@ final class ThirdPartyProxyManager: ObservableObject { static let shared = ThirdPartyProxyManager() static let interceptionHostnames = [ "gs-loc.apple.com", - "gs-loc-cn.apple.com" + "gs-loc-cn.apple.com", + "gsp-ssl.ls.apple.com", + "bluedot.is.autonavi.com", + "bluedot.is.autonavi.com.gds.alibabadns.com" ] static let interceptionHostnamesText = interceptionHostnames.joined(separator: ", ") static let configurationEndpoint = URL(string: "https://gs-loc.apple.com/wloc-settings/save")! @@ -306,7 +309,7 @@ final class ThirdPartyProxyManager: ObservableObject { } enum ThirdPartyProxyClient: String, CaseIterable, Identifiable { - static let moduleSubscriptionVersion = "1.0.0" + static let moduleSubscriptionVersion = "1.0.1" case shadowrocket case surge diff --git a/Tests/third_party_mode_contract_test.sh b/Tests/third_party_mode_contract_test.sh index 96bb04f..b6a1f12 100755 --- a/Tests/third_party_mode_contract_test.sh +++ b/Tests/third_party_mode_contract_test.sh @@ -52,13 +52,13 @@ grep -q 'shadowrocket://' "$MANAGER" || fail "Shadowrocket launch URL is missing for scheme in surge quantumult-x loon stash egern; do grep -q "${scheme}://" "$MANAGER" || fail "$scheme launch URL is missing" done -grep -q '复制两个解密域名' "$SETUP" || fail "all clients must expose both MITM hostnames" -grep -q 'gs-loc.apple.com 和 gs-loc-cn.apple.com' "$SETUP" \ - || fail "setup guidance must name both Apple location hostnames" +grep -q '复制解密域名' "$SETUP" || fail "all clients must expose the MITM hostname copy action" +grep -q '配置时请复制下方全部解密域名' "$SETUP" \ + || fail "setup guidance must direct users to copy all Apple location hostnames" grep -q 'ThirdPartyProxyManager.interceptionHostnamesText' "$SETUP" \ - || fail "setup hostname copy actions must use the shared two-host value" + || fail "setup hostname copy actions must use the shared interception hostname value" grep -q 'ThirdPartyProxyManager.interceptionHostnamesText' "$SETTINGS" \ - || fail "Settings must expose the shared two-host copy action" + || fail "Settings must expose the shared interception hostname copy action" grep -q '配置 → 模块' "$SETUP" || fail "Shadowrocket module import guidance is missing" grep -q 'HTTPS 解密' "$SETUP" || fail "Shadowrocket HTTPS decryption guidance is missing" ! grep -q '当前可测试' "$SETUP" || fail "Shadowrocket must not show the obsolete current-test label" diff --git a/ThirdParty/WlocScripts/modules/direct/wloc.conf b/ThirdParty/WlocScripts/modules/direct/wloc.conf index db8fdfd..27906fd 100644 --- a/ThirdParty/WlocScripts/modules/direct/wloc.conf +++ b/ThirdParty/WlocScripts/modules/direct/wloc.conf @@ -4,8 +4,8 @@ #!homepage=https://github.com/xweiba/location-spoofer [rewrite_local] -^https?:\/\/gs-loc(-cn)?\.apple\.com\/clls\/wloc url script-response-body https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js +^https?:\/\/(?:gs-loc(?:-cn)?\.apple\.com|gsp-ssl\.ls\.apple\.com|bluedot\.is\.autonavi\.com(?:\.gds\.alibabadns\.com)?)\/clls\/wloc url script-response-body https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js ^https?:\/\/gs-loc(-cn)?\.apple\.com\/wloc-settings\/(save|version) url script-echo-response https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc-settings.js [mitm] -hostname = gs-loc.apple.com, gs-loc-cn.apple.com +hostname = gs-loc.apple.com, gs-loc-cn.apple.com, gsp-ssl.ls.apple.com, bluedot.is.autonavi.com, bluedot.is.autonavi.com.gds.alibabadns.com diff --git a/ThirdParty/WlocScripts/modules/direct/wloc.lpx b/ThirdParty/WlocScripts/modules/direct/wloc.lpx index d5c9cd7..2c591d3 100644 --- a/ThirdParty/WlocScripts/modules/direct/wloc.lpx +++ b/ThirdParty/WlocScripts/modules/direct/wloc.lpx @@ -4,8 +4,8 @@ #!homepage=https://github.com/xweiba/location-spoofer [Script] -http-response ^https?:\/\/gs-loc(-cn)?\.apple\.com\/clls\/wloc script-path=https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js, requires-body=true, binary-body-mode=true, timeout=30, tag=Apple WLOC +http-response ^https?:\/\/(?:gs-loc(?:-cn)?\.apple\.com|gsp-ssl\.ls\.apple\.com|bluedot\.is\.autonavi\.com(?:\.gds\.alibabadns\.com)?)\/clls\/wloc script-path=https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js, requires-body=true, binary-body-mode=true, timeout=30, tag=Apple WLOC http-request ^https?:\/\/gs-loc(-cn)?\.apple\.com\/wloc-settings\/(save|version) script-path=https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc-settings.js, timeout=10, tag=WLOC Settings [MITM] -hostname = gs-loc.apple.com, gs-loc-cn.apple.com +hostname = gs-loc.apple.com, gs-loc-cn.apple.com, gsp-ssl.ls.apple.com, bluedot.is.autonavi.com, bluedot.is.autonavi.com.gds.alibabadns.com diff --git a/ThirdParty/WlocScripts/modules/direct/wloc.module b/ThirdParty/WlocScripts/modules/direct/wloc.module index 69f82bf..b018d57 100644 --- a/ThirdParty/WlocScripts/modules/direct/wloc.module +++ b/ThirdParty/WlocScripts/modules/direct/wloc.module @@ -5,8 +5,8 @@ #!category=Tools [Script] -Apple WLOC = type=http-response,pattern=^https?:\/\/gs-loc(-cn)?\.apple\.com\/clls\/wloc,requires-body=1,binary-body-mode=1,max-size=0,timeout=30,script-path=https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js +Apple WLOC = type=http-response,pattern=^https?:\/\/(?:gs-loc(?:-cn)?\.apple\.com|gsp-ssl\.ls\.apple\.com|bluedot\.is\.autonavi\.com(?:\.gds\.alibabadns\.com)?)\/clls\/wloc,requires-body=1,binary-body-mode=1,max-size=0,timeout=30,script-path=https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js WLOC Settings = type=http-request,pattern=^https?:\/\/gs-loc(-cn)?\.apple\.com\/wloc-settings\/(save|version),requires-body=0,max-size=0,timeout=10,script-path=https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc-settings.js [MITM] -hostname = %APPEND% gs-loc.apple.com, gs-loc-cn.apple.com +hostname = %APPEND% gs-loc.apple.com, gs-loc-cn.apple.com, gsp-ssl.ls.apple.com, bluedot.is.autonavi.com, bluedot.is.autonavi.com.gds.alibabadns.com diff --git a/ThirdParty/WlocScripts/modules/direct/wloc.sgmodule b/ThirdParty/WlocScripts/modules/direct/wloc.sgmodule index 4c041fe..1e6801b 100644 --- a/ThirdParty/WlocScripts/modules/direct/wloc.sgmodule +++ b/ThirdParty/WlocScripts/modules/direct/wloc.sgmodule @@ -5,8 +5,8 @@ #!category=Tools [Script] -Apple WLOC = type=http-response, pattern="^https?:\/\/gs-loc(-cn)?\.apple\.com\/clls\/wloc", requires-body=1, binary-body-mode=1, max-size=0, timeout=30, script-path=https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js +Apple WLOC = type=http-response, pattern="^https?:\/\/(?:gs-loc(?:-cn)?\.apple\.com|gsp-ssl\.ls\.apple\.com|bluedot\.is\.autonavi\.com(?:\.gds\.alibabadns\.com)?)\/clls\/wloc", requires-body=1, binary-body-mode=1, max-size=0, timeout=30, script-path=https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc.js WLOC Settings = type=http-request, pattern="^https?:\/\/gs-loc(-cn)?\.apple\.com\/wloc-settings\/(save|version)", requires-body=0, max-size=0, timeout=10, script-path=https://raw.githubusercontent.com/xweiba/location-spoofer/main/ThirdParty/WlocScripts/dist/v1/wloc-settings.js [MITM] -hostname = %APPEND% gs-loc.apple.com, gs-loc-cn.apple.com +hostname = %APPEND% gs-loc.apple.com, gs-loc-cn.apple.com, gsp-ssl.ls.apple.com, bluedot.is.autonavi.com, bluedot.is.autonavi.com.gds.alibabadns.com diff --git a/ThirdParty/WlocScripts/modules/direct/wloc.stoverride b/ThirdParty/WlocScripts/modules/direct/wloc.stoverride index 01b536e..30fd991 100644 --- a/ThirdParty/WlocScripts/modules/direct/wloc.stoverride +++ b/ThirdParty/WlocScripts/modules/direct/wloc.stoverride @@ -8,8 +8,11 @@ http: mitm: - "gs-loc.apple.com" - "gs-loc-cn.apple.com" + - "gsp-ssl.ls.apple.com" + - "bluedot.is.autonavi.com" + - "bluedot.is.autonavi.com.gds.alibabadns.com" script: - - match: ^https?:\/\/gs-loc(-cn)?\.apple\.com\/clls\/wloc + - match: ^https?:\/\/(?:gs-loc(?:-cn)?\.apple\.com|gsp-ssl\.ls\.apple\.com|bluedot\.is\.autonavi\.com(?:\.gds\.alibabadns\.com)?)\/clls\/wloc name: WLOC.Location type: response require-body: true diff --git a/docs/THIRD_PARTY_MODULES.md b/docs/THIRD_PARTY_MODULES.md index df68ccf..ebb5bba 100644 --- a/docs/THIRD_PARTY_MODULES.md +++ b/docs/THIRD_PARTY_MODULES.md @@ -12,10 +12,16 @@ module URL the App copies: - enabled by default: `gh-proxy.org` in front of GitHub Raw; - disabled: GitHub Raw directly. -The App appends the module version as a query parameter, such as `?v=1.0.0`. +The App appends the module version as a query parameter, such as `?v=1.0.1`. Increment this value whenever an existing module path changes so proxy clients do not reuse a previously cached subscription body. +The Apple WLOC response rule and MITM hostname list cover all known network +location endpoints: `gs-loc.apple.com`, `gs-loc-cn.apple.com`, +`gsp-ssl.ls.apple.com`, `bluedot.is.autonavi.com`, and +`bluedot.is.autonavi.com.gds.alibabadns.com`. The settings endpoint +(`/wloc-settings/*`) stays scoped to the `gs-loc` hostnames. + | Module file | Client | |---|---| | `wloc.module` | Shadowrocket | @@ -46,11 +52,11 @@ versioned protocol and motion setting. Current bundled module SHA-256 values: ```text -263f3eae0ec4ef19d03eefa58f28e6545cccbc6a2d32c5e1d3493ba207ca7605 wloc.conf -c0755a9edb2a1686190d12d156e9aa53693e15721efc4a29f9a06c2bf3115a5f wloc.lpx -06a426e4f37828d18b80abea04a8ade4fa7f93817cb1e37928c52da3e46f693a wloc.module -f6b9fc51c4d3c4fca837ff896dbe544f99604d9646f05841bad82bfdfdf5c4fa wloc.sgmodule -100e569e6ca3183f7da15fbb38ddb5cd91178488c0d9774acabc2721fa85a58c wloc.stoverride +1987adf691738544ee44ee67749872ac3ef36efbe54cd8751cf874eaa029d7f4 wloc.conf +5562020a8de1a25e3162584fa77c50d8c7e1052cdc08c068180fc2e46d69e7da wloc.lpx +cad43570ffb0a16cf3ba7d06d9c0d99ea1b7994ff665eea192011961f1385e87 wloc.module +96be7cc7e710436ffa320ccc2e2d45d55d9db7fe26dc6a5bab1fa54333102a99 wloc.sgmodule +0cefbabf294acff3382c575578ed7e4c84fa16242cf0808df581aec004ca8058 wloc.stoverride ``` The project acknowledges [Yu9191/wloc](https://github.com/Yu9191/wloc) as a