feat(ProtonVPN): Add Remove delay patch (#6326)

Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
Sylvain Finot
2025-12-08 12:30:47 +01:00
committed by GitHub
parent 300b12f948
commit bbd8932b2e
3 changed files with 37 additions and 0 deletions

View File

@@ -621,6 +621,10 @@ public final class app/revanced/patches/protonmail/signature/RemoveSentFromSigna
public static final fun getRemoveSentFromSignaturePatch ()Lapp/revanced/patcher/patch/ResourcePatch;
}
public final class app/revanced/patches/protonvpn/delay/RemoveDelayPatchKt {
public static final fun getRemoveDelayPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}
public final class app/revanced/patches/rar/misc/annoyances/purchasereminder/HidePurchaseReminderPatchKt {
public static final fun getHidePurchaseReminderPatch ()Lapp/revanced/patcher/patch/BytecodePatch;
}

View File

@@ -0,0 +1,16 @@
package app.revanced.patches.protonvpn.delay
import app.revanced.patcher.fingerprint
internal val longDelayFingerprint = fingerprint {
custom { method, _ ->
method.name == "getChangeServerLongDelayInSeconds"
}
}
internal val shortDelayFingerprint = fingerprint {
custom { method, _ ->
method.name == "getChangeServerShortDelayInSeconds"
}
}

View File

@@ -0,0 +1,17 @@
package app.revanced.patches.protonvpn.delay
import app.revanced.patcher.patch.bytecodePatch
import app.revanced.util.returnEarly
@Suppress("unused")
val removeDelayPatch = bytecodePatch(
name = "Remove delay",
description = "Removes the delay when changing servers.",
) {
compatibleWith("ch.protonvpn.android")
execute {
longDelayFingerprint.method.returnEarly(0)
shortDelayFingerprint.method.returnEarly(0)
}
}