Show / Hide Table of Contents

Class ProxyPool

Class that manages a pool of proxies.

Inheritance
System.Object
ProxyPool
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: RuriLib.Models
Assembly: RuriLib.dll
Syntax
public class ProxyPool

Constructors

| Improve this Doc View Source

ProxyPool(IEnumerable<String>, ProxyType)

Initializes the proxy pool given a collection of string to be parsed as proxies and their type.

Declaration
public ProxyPool(IEnumerable<string> proxies, ProxyType type)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.String> proxies

The collection of strings to parse the proxies from

Extreme.Net.ProxyType type

The type of the proxies

| Improve this Doc View Source

ProxyPool(List<CProxy>)

Initializes the proxy pool given a collection of CProxy objects.

The proxies will be first cloned and then stored in the list.

They will also be unbanned to make sure there are no leftovers from previous checks.

Declaration
public ProxyPool(List<CProxy> proxies)
Parameters
Type Name Description
System.Collections.Generic.List<CProxy> proxies

The list of CProxy objects to be cloned and added to the list

Properties

| Improve this Doc View Source

Alive

The list of Alive proxies (AVAILABLE or BUSY).

Declaration
public List<CProxy> Alive { get; }
Property Value
Type Description
System.Collections.Generic.List<CProxy>
| Improve this Doc View Source

Available

The list of Available proxies.

Declaration
public List<CProxy> Available { get; }
Property Value
Type Description
System.Collections.Generic.List<CProxy>
| Improve this Doc View Source

Bad

The list of Bad proxies.

Declaration
public List<CProxy> Bad { get; }
Property Value
Type Description
System.Collections.Generic.List<CProxy>
| Improve this Doc View Source

Banned

The list of Banned proxies.

Declaration
public List<CProxy> Banned { get; }
Property Value
Type Description
System.Collections.Generic.List<CProxy>
| Improve this Doc View Source

Proxies

The full list of proxies in the pool.

Declaration
public List<CProxy> Proxies { get; }
Property Value
Type Description
System.Collections.Generic.List<CProxy>

Methods

| Improve this Doc View Source

ClearCF()

Clears the Clearance and Cfduid cookies set by Cloudflare.

Declaration
public void ClearCF()
| Improve this Doc View Source

GetProxy(Boolean, Int32, Boolean)

Tries to return the first available proxy from the list.

Declaration
public CProxy GetProxy(bool evenBusy, int maxUses, bool neverBan = false)
Parameters
Type Name Description
System.Boolean evenBusy

Whether to include proxies that are being used by other bots

System.Int32 maxUses

The maximum uses of a proxy, after which it will be banned (0 for infinite)

System.Boolean neverBan

Whether a proxy can ever be banned

Returns
Type Description
CProxy

The first available proxy respecting the conditions or null

| Improve this Doc View Source

UnbanAll()

Sets all the BANNED and BAD proxies status to AVAILABLE and resets their Uses. It also clears the Cloudflare cookies.

Declaration
public void UnbanAll()
  • Improve this Doc
  • View Source
Back to top Generated by DocFX