Emulate Common TLS Fingerprints + HTTP/SOCK5 Proxy Support#544
Emulate Common TLS Fingerprints + HTTP/SOCK5 Proxy Support#544Silvenga wants to merge 12 commits intoredlib-org:mainfrom
Conversation
…, removed unused crates
|
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. |
|
Pardon my ignorance, but does this need to be built or can it be referenced in a compose file? @Silvenga @ButteredCats |
|
Give me a bit, I broke something in a recent commit. This would be building the |
|
Sorry about that, should be good now @ButteredCats @jnobbe |
|
All good lol. I'll apply the patch on one of my servers and let you know how it goes! |
|
@Silvenga , this is my first time doing a build instead of pulling an image. I was able to build using 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? |
|
This is working for me so far (pr509 is still working for me, also). |
|
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. |
|
OK, I found the solution to the env error and successfully pulled and built the PR. I'll report back any issues @Silvenga . |
|
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. |
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.