mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Moved BanProxyAfterGoodStatus from global to config-specific.
This commit is contained in:
@@ -17,15 +17,16 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<DockPanel Grid.Column="0" Margin="5">
|
<StackPanel Grid.Column="0" Margin="5">
|
||||||
<CheckBox DockPanel.Dock="Top" Content="Needs Proxies" IsChecked="{Binding NeedsProxies}" VerticalContentAlignment="Center"/>
|
<CheckBox Content="Needs Proxies" IsChecked="{Binding NeedsProxies}" VerticalContentAlignment="Center"/>
|
||||||
<CheckBox DockPanel.Dock="Top" Content="Use Only Socks Proxies" IsChecked="{Binding OnlySocks}" VerticalContentAlignment="Center"/>
|
<CheckBox Content="Use Only Socks Proxies" IsChecked="{Binding OnlySocks}" VerticalContentAlignment="Center"/>
|
||||||
<CheckBox DockPanel.Dock="Top" Content="Use Only SSL Proxies" IsChecked="{Binding OnlySsl}" VerticalContentAlignment="Center"/>
|
<CheckBox Content="Use Only SSL Proxies" IsChecked="{Binding OnlySsl}" VerticalContentAlignment="Center"/>
|
||||||
<DockPanel DockPanel.Dock="Top">
|
<DockPanel>
|
||||||
<Label Content="Max Uses Per Proxy (0 = infinite)" />
|
<Label Content="Max Uses Per Proxy (0 = infinite)" />
|
||||||
<xctk:IntegerUpDown Background="Transparent" Width="50" Margin="10 0 0 0" Value="{Binding MaxProxyUses}" Foreground="{DynamicResource ForegroundMain}" HorizontalAlignment="Right"/>
|
<xctk:IntegerUpDown Background="Transparent" Width="50" Margin="10 0 0 0" Value="{Binding MaxProxyUses}" Foreground="{DynamicResource ForegroundMain}" HorizontalAlignment="Right"/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</DockPanel>
|
<CheckBox Content="Ban Proxy after Good Status" IsChecked="{Binding BanProxyAfterGoodStatus}" VerticalContentAlignment="Center" ToolTip="Bans a Proxy after a SUCCESS, CUSTOM or TOCHECK result."/>
|
||||||
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Page>
|
</Page>
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
<Label Content="General"/>
|
<Label Content="General"/>
|
||||||
<CheckBox Content="Allow Concurrent Use" IsChecked="{Binding ConcurrentUse}" VerticalContentAlignment="Center"/>
|
<CheckBox Content="Allow Concurrent Use" IsChecked="{Binding ConcurrentUse}" VerticalContentAlignment="Center"/>
|
||||||
<CheckBox Content="Never Ban Proxies" IsChecked="{Binding NeverBan}" VerticalContentAlignment="Center"/>
|
<CheckBox Content="Never Ban Proxies" IsChecked="{Binding NeverBan}" VerticalContentAlignment="Center"/>
|
||||||
<CheckBox Content="Ban Proxy after Good Status" IsChecked="{Binding BanAfterGoodStatus}" VerticalContentAlignment="Center" ToolTip="Bans a Proxy after a SUCCESS, CUSTOM or TOCHECK result."/>
|
|
||||||
<CheckBox Content="Shuffle Proxies on Start" IsChecked="{Binding ShuffleOnStart}" VerticalContentAlignment="Center" />
|
<CheckBox Content="Shuffle Proxies on Start" IsChecked="{Binding ShuffleOnStart}" VerticalContentAlignment="Center" />
|
||||||
<Label Content="CloudFlare"/>
|
<Label Content="CloudFlare"/>
|
||||||
<CheckBox Content="Don't Reuse Clearance Cookie (CF)" IsChecked="{Binding AlwaysGetClearance}" VerticalContentAlignment="Center"/>
|
<CheckBox Content="Don't Reuse Clearance Cookie (CF)" IsChecked="{Binding AlwaysGetClearance}" VerticalContentAlignment="Center"/>
|
||||||
|
|||||||
@@ -68,6 +68,10 @@ namespace RuriLib
|
|||||||
private int maxProxyUses = 0;
|
private int maxProxyUses = 0;
|
||||||
/// <summary>The maximum amount of times a proxy can be used before being banned by the Runner (0 for infinite).</summary>
|
/// <summary>The maximum amount of times a proxy can be used before being banned by the Runner (0 for infinite).</summary>
|
||||||
public int MaxProxyUses { get { return maxProxyUses; } set { maxProxyUses = value; OnPropertyChanged(); } }
|
public int MaxProxyUses { get { return maxProxyUses; } set { maxProxyUses = value; OnPropertyChanged(); } }
|
||||||
|
|
||||||
|
private bool banProxyAfterGoodStatus = false;
|
||||||
|
/// <summary>Whether to ban the proxy after a SUCCESS, CUSTOM or NONE status (not FAIL or RETRY).</summary>
|
||||||
|
public bool BanProxyAfterGoodStatus { get { return banProxyAfterGoodStatus; } set { banProxyAfterGoodStatus = value; OnPropertyChanged(); } }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Data
|
#region Data
|
||||||
|
|||||||
@@ -793,7 +793,7 @@ namespace RuriLib.Runner
|
|||||||
case BotStatus.SUCCESS:
|
case BotStatus.SUCCESS:
|
||||||
validData = new ValidData(botData.Data.Data, botData.Proxy == null ? "" : botData.Proxy.Proxy, botData.Proxy == null ? ProxyType.Http : botData.Proxy.Type, botData.Status, "HIT", capturedData.ToCaptureString(), Settings.General.SaveLastSource ? botData.ResponseSource : "", BotLog);
|
validData = new ValidData(botData.Data.Data, botData.Proxy == null ? "" : botData.Proxy.Proxy, botData.Proxy == null ? ProxyType.Http : botData.Proxy.Type, botData.Status, "HIT", capturedData.ToCaptureString(), Settings.General.SaveLastSource ? botData.ResponseSource : "", BotLog);
|
||||||
RaiseDispatchAction(new Action(() => HitsList.Add(validData)));
|
RaiseDispatchAction(new Action(() => HitsList.Add(validData)));
|
||||||
if (UseProxies && !Settings.Proxies.NeverBan && Settings.Proxies.BanAfterGoodStatus)
|
if (UseProxies && !Settings.Proxies.NeverBan && Config.Settings.BanProxyAfterGoodStatus)
|
||||||
{
|
{
|
||||||
currentProxy.Status = Status.BANNED;
|
currentProxy.Status = Status.BANNED;
|
||||||
currentProxy.LastUsed = DateTime.Now;
|
currentProxy.LastUsed = DateTime.Now;
|
||||||
@@ -811,7 +811,7 @@ namespace RuriLib.Runner
|
|||||||
validData = new ValidData(botData.Data.Data, botData.Proxy == null ? "" : botData.Proxy.Proxy, botData.Proxy == null ? ProxyType.Http : botData.Proxy.Type, botData.Status, hitType, capturedData.ToCaptureString(), Settings.General.SaveLastSource ? botData.ResponseSource : "", BotLog);
|
validData = new ValidData(botData.Data.Data, botData.Proxy == null ? "" : botData.Proxy.Proxy, botData.Proxy == null ? ProxyType.Http : botData.Proxy.Type, botData.Status, hitType, capturedData.ToCaptureString(), Settings.General.SaveLastSource ? botData.ResponseSource : "", BotLog);
|
||||||
RaiseDispatchAction(new Action(() => CustomList.Add(validData)));
|
RaiseDispatchAction(new Action(() => CustomList.Add(validData)));
|
||||||
|
|
||||||
if (UseProxies && !Settings.Proxies.NeverBan && Settings.Proxies.BanAfterGoodStatus)
|
if (UseProxies && !Settings.Proxies.NeverBan && Config.Settings.BanProxyAfterGoodStatus)
|
||||||
{
|
{
|
||||||
currentProxy.Status = Status.BANNED;
|
currentProxy.Status = Status.BANNED;
|
||||||
currentProxy.LastUsed = DateTime.Now;
|
currentProxy.LastUsed = DateTime.Now;
|
||||||
@@ -843,7 +843,7 @@ namespace RuriLib.Runner
|
|||||||
validData = new ValidData(botData.Data.Data, botData.Proxy == null ? "" : botData.Proxy.Proxy, botData.Proxy == null ? ProxyType.Http : botData.Proxy.Type, botData.Status, "TOCHK", capturedData.ToCaptureString(), Settings.General.SaveLastSource ? botData.ResponseSource : "", BotLog);
|
validData = new ValidData(botData.Data.Data, botData.Proxy == null ? "" : botData.Proxy.Proxy, botData.Proxy == null ? ProxyType.Http : botData.Proxy.Type, botData.Status, "TOCHK", capturedData.ToCaptureString(), Settings.General.SaveLastSource ? botData.ResponseSource : "", BotLog);
|
||||||
RaiseDispatchAction(new Action(() => ToCheckList.Add(validData)));
|
RaiseDispatchAction(new Action(() => ToCheckList.Add(validData)));
|
||||||
|
|
||||||
if (UseProxies && !Settings.Proxies.NeverBan && Settings.Proxies.BanAfterGoodStatus)
|
if (UseProxies && !Settings.Proxies.NeverBan && Config.Settings.BanProxyAfterGoodStatus)
|
||||||
{
|
{
|
||||||
currentProxy.Status = Status.BANNED;
|
currentProxy.Status = Status.BANNED;
|
||||||
currentProxy.LastUsed = DateTime.Now;
|
currentProxy.LastUsed = DateTime.Now;
|
||||||
|
|||||||
@@ -34,10 +34,6 @@ namespace RuriLib.ViewModels
|
|||||||
/// <summary>Whether to never ban the proxies.</summary>
|
/// <summary>Whether to never ban the proxies.</summary>
|
||||||
public bool NeverBan { get { return neverBan; } set { neverBan = value; OnPropertyChanged(); } }
|
public bool NeverBan { get { return neverBan; } set { neverBan = value; OnPropertyChanged(); } }
|
||||||
|
|
||||||
private bool banAfterGoodStatus = false;
|
|
||||||
/// <summary>Whether to never ban the proxy after a SUCCESS, CUSTOM or NONE status (not FAIL or RETRY).</summary>
|
|
||||||
public bool BanAfterGoodStatus { get { return banAfterGoodStatus; } set { banAfterGoodStatus = value; OnPropertyChanged(); } }
|
|
||||||
|
|
||||||
private bool shuffleOnStart = false;
|
private bool shuffleOnStart = false;
|
||||||
/// <summary>Whether proxy lists should be shuffled before being assigned to the Runner.</summary>
|
/// <summary>Whether proxy lists should be shuffled before being assigned to the Runner.</summary>
|
||||||
public bool ShuffleOnStart { get { return shuffleOnStart; } set { shuffleOnStart = value; OnPropertyChanged(); } }
|
public bool ShuffleOnStart { get { return shuffleOnStart; } set { shuffleOnStart = value; OnPropertyChanged(); } }
|
||||||
|
|||||||
Reference in New Issue
Block a user