mirror of
https://github.com/xweiba/location-spoofer.git
synced 2026-09-26 16:41:54 +08:00
feat: drop script version detection; split motion vs perturbation by mode
Third-party mode no longer probes /wloc-settings/version or capability metadata since the upstream scripts are unmaintained. Settings now show: - APP mode: motion-state simulation toggle only - third-party mode: random-perturbation (randomRadius) toggle only save() sends randomRadius so upstream wloc.js applies the offset.
This commit is contained in:
@@ -52,7 +52,6 @@ struct FirstSetupView: View {
|
||||
@ObservedObject private var runtimeMode = ProxyRuntimeModeStore.shared
|
||||
@ObservedObject private var thirdPartyProxy = ThirdPartyProxyManager.shared
|
||||
@ObservedObject private var thirdPartyClient = ThirdPartyProxyClientStore.shared
|
||||
@ObservedObject private var motionSimulation = MotionSimulationStore.shared
|
||||
@State private var copiedSubscriptionURL = false
|
||||
@State private var copiedMITMHostname = false
|
||||
@State private var screenshotPreview: SetupScreenshotPreview?
|
||||
@@ -848,17 +847,12 @@ struct FirstSetupView: View {
|
||||
Task { @MainActor in
|
||||
defer { isVerifying = false }
|
||||
do {
|
||||
let response = try await thirdPartyProxy.validateConnection()
|
||||
let advancedFeaturesAvailable = await thirdPartyProxy.refreshAdvancedFeatureAvailability()
|
||||
if !advancedFeaturesAvailable {
|
||||
motionSimulation.setEnabled(false)
|
||||
}
|
||||
let response = try await thirdPartyProxy.query()
|
||||
let elapsedMilliseconds = Int(Date().timeIntervalSince(startedAt) * 1_000)
|
||||
RuntimeLogger.info("APP", "ThirdPartyProxy", "第三方代理连接检测通过", details: [
|
||||
"当前客户端": client.name,
|
||||
"请求动作": "WLOC query",
|
||||
"连接状态": response.latitude == nil || response.longitude == nil ? "已连接,无保存坐标" : "已连接,有保存坐标",
|
||||
"运动状态模拟": advancedFeaturesAvailable ? "支持" : "不支持,已关闭",
|
||||
"耗时毫秒": String(elapsedMilliseconds)
|
||||
])
|
||||
onComplete()
|
||||
|
||||
Reference in New Issue
Block a user