Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Proxies ¶
type Proxies struct {
// contains filtered or unexported fields
}
Proxies represents a pool of proxies
type Proxy ¶
type Proxy struct { ID uint `json:"id"` // A proxy ID List string `json:"list"` // The list name, ie: storm_80_main URL string `json:"url"` // The proxy URL, ie: http://167.36.78.9:6897 Location string `json:"location"` // The proxy location, ie: de Type string `json:"type"` // A proxy type, ie: http, socks or backconnect Active bool `json:"active"` // If it's active or not }
Proxy represents a proxy server
func FetchProxies ¶
FetchProxies loads proxies from the DB and returns a channel of proxies
type ProxyPoolManager ¶
type ProxyPoolManager struct {
// contains filtered or unexported fields
}
ProxyPoolManager manage a collection of pool of proxies
func NewPoolManager ¶
func NewPoolManager() *ProxyPoolManager
func (*ProxyPoolManager) CreateProxies ¶
func (m *ProxyPoolManager) CreateProxies( ctx context.Context, col *mongo.Collection, target string, filter bson.M) error
CreateProxies creates a new pool if it does not exist
func (*ProxyPoolManager) GetProxies ¶
func (m *ProxyPoolManager) GetProxies(target string) *Proxies
GetProxies get a pool given a target name
Click to show internal directories.
Click to hide internal directories.