diff --git a/OpenBullet/Pages/StackerBlocks/PageBlockBypassCF.xaml b/OpenBullet/Pages/StackerBlocks/PageBlockBypassCF.xaml
index 0e34cad..73f4347 100644
--- a/OpenBullet/Pages/StackerBlocks/PageBlockBypassCF.xaml
+++ b/OpenBullet/Pages/StackerBlocks/PageBlockBypassCF.xaml
@@ -28,6 +28,8 @@
TextWrapping="Wrap"
Margin="0 10 0 0"
Foreground="{DynamicResource ForegroundMain}">
+ This block only works with HTTP proxies for now.
+
If the Cloudflare challenge needs a reCaptcha to be solved,
this block will check if you defined a 2captcha or anti-captcha API Key. If
it finds one, it will be used to solve the challenges.
diff --git a/RuriLib/Blocks/BlockBypassCF.cs b/RuriLib/Blocks/BlockBypassCF.cs
index d9f6eb5..0e0124c 100644
--- a/RuriLib/Blocks/BlockBypassCF.cs
+++ b/RuriLib/Blocks/BlockBypassCF.cs
@@ -112,10 +112,22 @@ namespace RuriLib
if (data.UseProxies)
{
+ if (data.Proxy.Type != Extreme.Net.ProxyType.Http)
+ {
+ throw new Exception($"The proxy type {data.Proxy.Type} is not supported by this block yet");
+ }
+
var client = data.Proxy.GetClient();
+ var proxy = new WebProxy(data.Proxy.Proxy, false);
+
+ if (data.Proxy.Username != "")
+ {
+ proxy.Credentials = new NetworkCredential(data.Proxy.Username, data.Proxy.Password);
+ }
+
handler = new HttpClientHandler()
{
- Proxy = (IWebProxy)client,
+ Proxy = proxy,
CookieContainer = cookies,
AllowAutoRedirect = true,
AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate