Apparently, CloudFlare now has some kind of a whitelist for the possible TLS handshake parameters for every known browser. Thus, when I'm sending HTTPS requests using HttpClient, CloudFlare considers it a bot and at the very minimum presents a captcha. The captcha itself is not a problem, I'm using a browser to ask the user to pass it. However, some websites apparently block some requests even after passing the captcha just because the TLS handshake was not whitelisted by CloudFlare.
So I've digged into the .NET Core source to see if I can modify the way TLS handshake packet is built. Unfortunately, it seems that .NET Core itself doesn't build it itself but rather delegates it to the underlying library (OpenSSL on Linux / standard Windows)... Is the only solution to write my own SSL library?... Sounds like a task for many months.
HttpClient
use some different behavior for TLS handshake than regular browser. Do you mean explicit TLS version change? ConsiderHttpClientHandler
class to change some connection properties. Using custom TLS implementation is a kind of insecure way to interact with web. – Laevo