Open openbullet opened 4 years ago
In case you are wondering why I need to do this, instead of just solving the challenge once and then using the cookies for my multiple requests, it's because I want to use a different proxy for each of the 5 http clients, so I need to solve 5 different challenges since one challenge is valid only for a certain IP, as I'm sure you're already aware.
Hi, I fixed this issue by removing the SemaphoreLocker in CloudflareDetector.cs and removing the static keyword from the one in CloudflareSolver.cs Do you want me to make a pull request or would you prefer to keep the lock? It does break multithread use so it's up to you.
Hello, first of all I'd like to thank you for your amazing library!
I want to solve multiple challenges at the same time in a multithreaded way.
In this snippet I will execute a get request in parallel for the same website 5 times, using the standard HttpClient without the solver:
The output will look like this:
So the jobs are completed correctly in no specific order and in around the same time, which is exactly what I want.
Now if I introduce the CloudflareSolver inside those tasks, I will write something like this
which for any website (both protected by cloudflare and not) gives this result (in the cloudflare case since it takes more time the timestamps are like 3s, 6s, 9s etc)
This is clearly a synchronous execution where only one solver is able to run at the same time even if I have multiple separate instances of the solvers.
Why do you think this happens?
Thank you for your help, Ruri
P.S. the same happens even if I give it the ClearanceHandler directly.