Skip to content

Emulate Common TLS Fingerprints + HTTP/SOCK5 Proxy Support#544

Open
Silvenga wants to merge 12 commits intoredlib-org:mainfrom
Silvenga:switch-to-wreq
Open

Emulate Common TLS Fingerprints + HTTP/SOCK5 Proxy Support#544
Silvenga wants to merge 12 commits intoredlib-org:mainfrom
Silvenga:switch-to-wreq

Conversation

@Silvenga
Copy link
Copy Markdown
Contributor

@Silvenga Silvenga commented Apr 4, 2026

As noted here #446 (comment) - I suspect we are being blocked automatically by Fastly bot detection.

So as a fix for the current TLS block, this pr switches outgoing HTTP requests to use wreq - designed to emulate popular browsers fingerprints (TLS, JA3/JA4, and HTTP/2). I opted to using a small pool of popular browsers/os, one randomly used.

Existing hyper responses handing was preserved with a compatibility layer. This introduces using the BoringSSL TLS stack (built from source by rust, so it introduced some build complexities).

I also added proxy support since it was a wreq option (#458) and moved the tests to be consistently in a test mod.

@ButteredCats
Copy link
Copy Markdown
Contributor

Successfully lets me fetch pages from Reddit where I'm usually blocked. However, all images meant to be proxied from Reddit except emojis are giving a 307 redirect to their Reddit counterpart which results in them not loading.

@jnobbe
Copy link
Copy Markdown

jnobbe commented Apr 4, 2026

Pardon my ignorance, but does this need to be built or can it be referenced in a compose file? @Silvenga @ButteredCats

@Silvenga
Copy link
Copy Markdown
Contributor Author

Silvenga commented Apr 4, 2026

Give me a bit, I broke something in a recent commit. This would be building the Dockerfile.ubuntu.

@Silvenga
Copy link
Copy Markdown
Contributor Author

Silvenga commented Apr 4, 2026

Sorry about that, should be good now @ButteredCats @jnobbe

@ButteredCats
Copy link
Copy Markdown
Contributor

All good lol. I'll apply the patch on one of my servers and let you know how it goes!

@jnobbe
Copy link
Copy Markdown

jnobbe commented Apr 5, 2026

@Silvenga , this is my first time doing a build instead of pulling an image.

I was able to build using docker buildx build -f ./Dockerfile.ubuntu -t Silvenga/redlib .

I swapped the new image name into my compose and I'm now getting an error about an env not being found in the build directory. I don't know if this is due to a (likely) oversight on my part.

Also, in the readme I saw you added info about boringssl. Is that included as a part of what you've done, does it need to be done on the host, or something else?

@dave0003
Copy link
Copy Markdown

dave0003 commented Apr 5, 2026

This is working for me so far (pr509 is still working for me, also).

@dave0003
Copy link
Copy Markdown

dave0003 commented Apr 5, 2026

I was also able to use a socks proxy by adding something like this to my systemd service file under [service]:

Environment="https_proxy=socks5h://127.0.0.1:8430"

Very nice to have socks support, thank you.

@jnobbe
Copy link
Copy Markdown

jnobbe commented Apr 5, 2026

OK, I found the solution to the env error and successfully pulled and built the PR. I'll report back any issues @Silvenga .

@ButteredCats
Copy link
Copy Markdown
Contributor

Works for sure and I think this is the way to go! Still regularly getting ratelimited but I don't think there's a good fix for that.

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