mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Temporary fix for proxy issue in CF Bypass block (only supports HTTP proxies for now).
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user