Skip to content

Patches for Continuum to pretend to be RedReader#6487

Open
mike951921 wants to merge 1 commit intoReVanced:mainfrom
mike951921:main
Open

Patches for Continuum to pretend to be RedReader#6487
mike951921 wants to merge 1 commit intoReVanced:mainfrom
mike951921:main

Conversation

@mike951921
Copy link

Added patches for Continuum to change the client id, redirect uri, and user agent to pretend to be RedReader

@oSumAtrIX
Copy link
Member

The patch needs to be a abstracted for other reddit client as well. There's already such an abstract patch that can be changed for this purpose

@oSumAtrIX
Copy link
Member

Also, no hardcoding of any keys ideally. Instead, patch options, then they can be set by the user to whatever values. The patch can technically even extract the details out of a supplied apk

@WhitespaceQ
Copy link

Ideally, this should target Infinity rather than Continuum. The motivation for the fork is to add support for user-provided API keys. Since Reddit has restricted the ability to generate new keys, I doubt the maintainer of Continuum will continue to synchronize with the upstream codebase. They also explicitly said that they won't add the ability to spoof User-Agent, redirect url, etc (see: cygnusx-1-org/continuum#195). By targeting Infinity, we can still rely on the original codebase while applying this patch. Honestly over all the third-party client I still prefer Infinity.

@ViVi-Vibes
Copy link

Would it be possible to add other apps api keys support too, as for instance i have a api made for infinity, but to use it in continuum, i need to change the URI of the api.

@oSumAtrIX
Copy link
Member

check this #6487 (comment)

Would it be possible to add other apps api keys support too, as for instance i have a api made for infinity, but to use it in continuum, i need to change the URI of the api.

@oSumAtrIX
Copy link
Member

Ideally, this should target Infinity rather than Continuum. The motivation for the fork is to add support for user-provided API keys. Since Reddit has restricted the ability to generate new keys, I doubt the maintainer of Continuum will continue to synchronize with the upstream codebase. They also explicitly said that they won't add the ability to spoof User-Agent, redirect url, etc (see: cygnusx-1-org/continuum#195). By targeting Infinity, we can still rely on the original codebase while applying this patch. Honestly over all the third-party client I still prefer Infinity.

According to #6487 (comment) the abstraction of the patch would allow any app to be patched with a custom client id

@mike951921
Copy link
Author

Ideally, this should target Infinity rather than Continuum. The motivation for the fork is to add support for user-provided API keys. Since Reddit has restricted the ability to generate new keys, I doubt the maintainer of Continuum will continue to synchronize with the upstream codebase. They also explicitly said that they won't add the ability to spoof User-Agent, redirect url, etc (see: cygnusx-1-org/continuum#195). By targeting Infinity, we can still rely on the original codebase while applying this patch. Honestly over all the third-party client I still prefer Infinity.

I am a Continuum user without a Continuum client ID, and I want to enable others to use Continuum. So I have no intent to make this work for Infinity for Reddit.

@oSumAtrIX
Copy link
Member

The patch should be abstracted regardless in a way where code is reusable in the codebase without the overhead of refactoring to prevent tech debt

@mike951921
Copy link
Author

The patch needs to be a abstracted for other reddit client as well. There's already such an abstract patch that can be changed for this purpose

Say more, because this sounds just like a lot more work for no good reason.

@mike951921
Copy link
Author

Also, no hardcoding of any keys ideally. Instead, patch options, then they can be set by the user to whatever values. The patch can technically even extract the details out of a supplied apk

This is doable, but you are missing that the goal isn't to pretend to be any client. The goal is to pretend to be RedReader, which makes it just work without any user input.

@oSumAtrIX
Copy link
Member

The same as the current client spoof patch by having a base patch parametrized for the respective apps. This isnt much work given you implement it for one app for now, and it has good reason as well which i showed in my previous comment

@oSumAtrIX
Copy link
Member

This is doable, but you are missing that the goal isn't to pretend to be any client. The goal is to pretend to be RedReader, which makes it just work without any user input.

This isnt flexible enough. With a patch option you can add a default value which hardcodes redreaders and other apps apis, that would satisfy the flexibility requirement, once again to prevent future tech debt

@mike951921
Copy link
Author

mike951921 commented Jan 15, 2026

The same as the current client spoof patch by having a base patch parametrized for the respective apps. This isnt much work given you implement it for one app for now, and it has good reason as well which i showed in my previous comment

Does the patch cover redirect uri and user agent? You are assuming I know what you are talking about. Explain what the other patch does in full.

@oSumAtrIX
Copy link
Member

What you actually want is to modify the existing base spoof client patch. Right now it just spoofs the client id by passing the respective patch code as a parameter for the respective app. You can simply change the patch a little to add the other relevant stuff to spoof such as the redirect uri and user agent. To a certain extent this patch did that in the past for some apps that needed it.

@oSumAtrIX
Copy link
Member

oSumAtrIX commented Jan 15, 2026

I just checked the code, there is a looot going on than it should. Checking.

dependsOn(
redditApiResourcePatch,
// Use regex-based replacement for user agent to work across all versions
transformInstructionsPatch(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Do we really need this? Instead, just fingerprint the method where the UA is built, isnt that enough?


val redditApiResourcePatch = resourcePatch(
name = "Reddit API override (resource)",
description = "Overrides Reddit client ID in strings.xml",
Copy link
Member

@oSumAtrIX oSumAtrIX Jan 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just patch the bytecode that obtains the default client id string

@Suppress("unused")
val removeClientIdCheckPatch = bytecodePatch(
name = "Remove client ID check",
description = "Removes the dialog that prevents login with default client ID",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entire PR can be simplified a little. Instead of this, simply patch the code that actually makes the api calls or the place where the client id etc is saved. This way whatever the user enters, it would be overwritten by the patch.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spoof client base patch can be adjusted to not just only spoof the client id, but also the redirect uri and user agent. Parametrize/adjust that patch accordingly. Then, implement it for continuum, done.

@WhitespaceQ
Copy link

I am a Continuum user without a Continuum client ID, and I want to enable others to use Continuum. So I have no intent to make this work for Infinity for Reddit.

Continuum IS Infinity, they haven't diverged enough to be considered separate. The only significant patch in Continuum is the ability to set custom API/client ID

@WhitespaceQ

This comment was marked as resolved.

@oSumAtrIX

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants