Skip to content

Conversation

@Silvenga
Copy link
Contributor

@Silvenga Silvenga commented Dec 4, 2025

As mentioned here #446 (comment), and investigated further here #446 (comment), reddit seems to be blocking on the exact ciphers default in rusttls.

This PR sets the list to that of Firefox.

@mzhboy
Copy link

mzhboy commented Dec 4, 2025

still get 403 error

@gmemstr
Copy link

gmemstr commented Dec 4, 2025

Patch ends up with redlib complaining about

ERROR redlib::oauth > [⛔] Failed to create OAuth client: expected value at line 1 column 1. Retrying in 5 seconds...

@nomadlogic
Copy link

Patch ends up with redlib complaining about

ERROR redlib::oauth > [⛔] Failed to create OAuth client: expected value at line 1 column 1. Retrying in 5 seconds...

I'm getting this as well. I think it's because they've placed my IP address on a block list. Trying to access directly from the same public IP results in a page stating "You've been blocked, login if this is a mistake"

@Threetimers
Copy link

It works for me

@Silvenga
Copy link
Contributor Author

Silvenga commented Dec 4, 2025

I do suspect that there will be multiple reasons for getting blocked, so this pr will only fix it if redlib was working on your ip before the new fingerprinting started.

@Sparronator9999
Copy link

On my private Redlib instance, this PR fixed the "Failed to parse page JSON data" error I started getting last night (in my timezone). Others that say this patch didn't fix the issue are probably getting IP banned/rate limited, perhaps due to several attempts to reload pages by their users (spiking traffic, and therefore requests to Reddit, on public instances)

@dave0003
Copy link

dave0003 commented Dec 5, 2025

Redlib is working again with this PR on my private instance.

@thudeous
Copy link

thudeous commented Dec 5, 2025

This PR fixed the 403/json errors for me as well.

main branch:

~/projects/redlib$ cargo run
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.58s
     Running `target/debug/redlib`
 ERROR redlib::client > Got an invalid response from reddit expected value at line 1 column 1. Status code: 403 Forbidden
Rate limit check failed: Failed to parse page JSON data: expected value at line 1 column 1 | /r/reddit/hot.json?&raw_json=1
This may cause issues with the rate limit.
Please report this error with the above information.
https://github.com/redlib-org/redlib/issues/new?assignees=sigaloid&labels=bug&title=%F0%9F%90%9B+Bug+Report%3A+Rate+limit+mismatch
Starting Redlib...
Running Redlib v0.36.0 on [::]:8080!

This PR's branch:

~/projects/silvenga-redlib$ cargo run
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
     Running `target/debug/redlib`
Starting Redlib...
Running Redlib v0.36.0 on [::]:8080!

Thanks @Silvenga !

uhthomas added a commit to uhthomas/redlib that referenced this pull request Dec 5, 2025
cherry-picked from redlib-org#510
@mycodedoesnotcompile2
Copy link

It properly works and bypass the current reddit.com blocking.
Some prebuilt binaries here: https://github.com/mycodedoesnotcompile2/redlib_binary/releases

@jennydaman
Copy link

Patch ends up with redlib complaining about

ERROR redlib::oauth > [⛔] Failed to create OAuth client: expected value at line 1 column 1. Retrying in 5 seconds...

I'm getting this as well. I think it's because they've placed my IP address on a block list. Trying to access directly from the same public IP results in a page stating "You've been blocked, login if this is a mistake"

I am getting those errors too. It might be because we're blocked, but I'm not sure. I can visit reddit [dot] com in Firefox and it works fine. FWIW another human in my household uses the official Reddit app so there is a mix of genuine + redlib traffic coming from my IP address.

It's also worth mentioning that my distro is NixOS, and that cargo nextest run reports failing tests, notably oauth::test_generic_web_backend and oauth::test_mobile_spoof_backend

@jennydaman
Copy link

@gmemstr @nomadlogic the oauth-related error is no longer happening to me and this PR is working. This may be related to the "elevated errors" happening Dec 8–9 as reported on www [dot] redditstatus [dot] com

@magostinelli
Copy link

I created a pool request #517

With that, it's possibile to compile the docker image without installing cargo and dependencies in the host system, so everyone can build the docker image (docker build .)

I also included the changes from 510 (Silvenga)

The recompiled image it's working fine for me, you can find it here: https://github.com/magostinelli/redlib

@sigaloid sigaloid merged commit ba98178 into redlib-org:main Dec 16, 2025
3 checks passed
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.