Skip to content

Moving toward our next release #836

Open
@sigaloid

Description

@sigaloid

It is done. https://github.com/redlib-org/redlib

Hello all,

Regretfully I haven’t had the free time to keep up with the recent changes a few days ago. reddit’s rate limiting is successfully implemented. I want to get a new release out ASAP (this weekend hopefully) that will do a few things. I would be grateful if someone would be able to help with any of these changes.

  • Modify my draft PR- use it as a base since it has some needed changes but tear out all of the oauth spoofing. Currently it auto generates an API token via spoofing the mobile app. We cannot distribute code that does this. Change it to instead have an optional config option to have a token. DO NOT return it in the info+config page! The change you should keep is the change of the base URL to oauth (if the config option is set) and the attaching of any relevant headers (not fake mobile ones). the whole oauth module should be thrown out.

  • See exactly how the rate limits work. I know they said 10/min for “anonymous” “Oauth” requests (I take this to mean oauth.reddit.com requests without ANY auth). Does this work correctly? Is it better or worse than anonymous? Basically, does oauth.r have any different limits than www.r for the same endpoints (.json ones - not full oauth specced ones)?

  • Also, they said 100/min for “authenticated free oauth requests” meaning to oauth.r but with a free token - can these be generated live? This is exactly what reveddit did in client side to check the “live” version of the app. Basically these tokens were free to generate with a single http request and had no validation. Is this still possible, or is there required to be an account attached now? To do this, take a look at my draft PR, look at the oauth.rs initialization routine and see what request it makes. Translate it to curl and make sure it still works (it should ;) ). (Alternatively in the reversing reddit api issue there was python code someone posted that did similar- see if it still works). Then strip out the mobile spoofed headers - does it still return a token? If so, we can plausibly use it to generate a token at launch. 100r/min might be more breathing room. If possible/safe to do, we could generate them dynamically based on demand and distribute requests across a few tokens.

  • We neeeeeeed to rename. I can’t emphasize this enough. Doubly so, since if we make these changes, we’re implicitly agreeing to the API’s terms, which describe exactly what words we can use and can’t use to define our project. We need to replace all of the instances of “reddit” in the codebase, templates, etc.

  • Also, what is going to happen when we agree to the API terms? This is going to have ramifications since before we were just web scraping but now the implicit API terms will change that.

  • Merge the recent PR about the de-anonymizing headers. Critical priority - only reason I haven’t merged is that we need to get these other changes out with the next release - there’s no point in pushing another release when the behavior is borked the way it is for any popular instance.

All of these are top priority for the project and I want to get a release out soon.

To be clear I have been asked by operators whether this would require them creating a token (possibly linked to an account) to run an instance and that they likely wouldn’t run one if they had to. My goal is to avoid this if at all possible.

If your traffic is below the rate limits right now you already can. It may be possible that even if it’s higher, you can either 1. have the application generate one of these “anonymous tokens” on the fly without account cookies, logging in, or anything, or 2. specifying one of your own (which can come from anywhere - it doesn’t have to be one you make). I know several apps are given Reddit’s blessing to escape rate limits and someone will surely extract their token. We can’t redistribute it but we also can’t stop you from using it.

Sorry for the megapost. I’m going to try to make some progress on these in the coming days (me posting this is also lighting a fire under me to do exactly that) but if anyone’s looking to contribute it would be a huge help.

Truth be told I’m losing some hope for this open source front end genre of software, with all of the changes happening. The twitter API change threw an ugly wrench into a lot of my work and research, and this throws a medium ugly wrench into Libreddit, but I trust that it’ll work out fine (and I know this kind of thing is needed even more because of these changes).

Anyway, peace, and if you’re interested in picking up any of these (I think 2, 3, or 4 would be the most concrete) and have questions, let me know. I’ll keep my progress updated here.

PS: If you want to help but don’t want to do any of these tasks, link this issue in the bug reports that talk about rate limiting. We’re working on it folks! Also instance operators will have to upgrade once we stamp out a new release so there’ll be more waiting.

  • PPS: Another easy task is that there’s a couple of outstanding requests to add instances in our instances repo. Turn them into PRs!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions