mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-28 04:20:20 +02:00
fix: disable metrics
This commit is contained in:
parent
bea8e796dc
commit
90faaecd83
@ -1,6 +1,8 @@
|
||||
package me.rhunk.snapenhance.core.features.impl.global
|
||||
|
||||
import me.rhunk.snapenhance.common.util.protobuf.ProtoReader
|
||||
import me.rhunk.snapenhance.core.event.events.impl.NetworkApiRequestEvent
|
||||
import me.rhunk.snapenhance.core.event.events.impl.UnaryCallEvent
|
||||
import me.rhunk.snapenhance.core.features.Feature
|
||||
import me.rhunk.snapenhance.core.features.FeatureLoadParams
|
||||
|
||||
@ -14,5 +16,15 @@ class DisableMetrics : Feature("DisableMetrics", loadParams = FeatureLoadParams.
|
||||
param.canceled = true
|
||||
}
|
||||
}
|
||||
|
||||
context.event.subscribe(UnaryCallEvent::class) { event ->
|
||||
if (event.uri.startsWith("/snap.security.IntegritySyncService/")) {
|
||||
event.canceled = true
|
||||
}
|
||||
if (event.uri.startsWith("/snapchat.cdp.cof.CircumstancesService/")) {
|
||||
if (ProtoReader(event.buffer).getVarInt(21) == 1L) return@subscribe
|
||||
event.canceled = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user