getter

package
v0.0.0-...-853e8e0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2023 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorUrlNotFound         = errors.New("url should be specified")
	ErrorCreaterNotSupported = errors.New("type not supported")
)

Functions

func AssertTypeStringNotNull

func AssertTypeStringNotNull(i interface{}) (str string, err error)

func ClashProxy2ProxyArray

func ClashProxy2ProxyArray(origin []map[string]interface{}) proxy.ProxyList

func FuzzParseProxyFromString

func FuzzParseProxyFromString(text string) proxy.ProxyList

func GrepLinksFromString

func GrepLinksFromString(text string) []string

func Register

func Register(sourceType string, c creator)

func StringArray2ProxyArray

func StringArray2ProxyArray(origin []string) proxy.ProxyList

Types

type Clash

type Clash struct {
	Url string
}

func (*Clash) Get

func (c *Clash) Get() proxy.ProxyList

func (*Clash) Get2Chan

func (c *Clash) Get2Chan(pc chan proxy.Proxy)

func (*Clash) Get2ChanWG

func (c *Clash) Get2ChanWG(pc chan proxy.Proxy, wg *sync.WaitGroup)

type Getter

type Getter interface {
	Get() proxy.ProxyList
	Get2Chan(pc chan proxy.Proxy)
	Get2ChanWG(pc chan proxy.Proxy, wg *sync.WaitGroup)
}

functions for getters

func NewClashGetter

func NewClashGetter(options tool.Options) (getter Getter, err error)

func NewGetter

func NewGetter(sourceType string, options tool.Options) (getter Getter, err error)

func NewSubscribe

func NewSubscribe(options tool.Options) (getter Getter, err error)

func NewTGChannelGetter

func NewTGChannelGetter(options tool.Options) (getter Getter, err error)

func NewWebFanqiangdangGetter

func NewWebFanqiangdangGetter(options tool.Options) (getter Getter, err error)

func NewWebFreessrxyzGetter

func NewWebFreessrxyzGetter(options tool.Options) (getter Getter, err error)

func NewWebFuzzGetter

func NewWebFuzzGetter(options tool.Options) (getter Getter, err error)

func NewWebFuzzSubGetter

func NewWebFuzzSubGetter(options tool.Options) (getter Getter, err error)

type Subscribe

type Subscribe struct {
	Url string
}

Subscribe is A Getter with an additional property

func (*Subscribe) Get

func (s *Subscribe) Get() proxy.ProxyList

Get() of Subscribe is to implement Getter interface

func (*Subscribe) Get2Chan

func (s *Subscribe) Get2Chan(pc chan proxy.Proxy)

func (*Subscribe) Get2ChanWG

func (s *Subscribe) Get2ChanWG(pc chan proxy.Proxy, wg *sync.WaitGroup)

Get2Chan() of Subscribe is to implement Getter interface. It gets proxies and send proxy to channel one by one

type TGChannelGetter

type TGChannelGetter struct {
	NumNeeded int

	Url string
	// contains filtered or unexported fields
}

func (*TGChannelGetter) Get

func (g *TGChannelGetter) Get() proxy.ProxyList

func (*TGChannelGetter) Get2Chan

func (g *TGChannelGetter) Get2Chan(pc chan proxy.Proxy)

func (*TGChannelGetter) Get2ChanWG

func (g *TGChannelGetter) Get2ChanWG(pc chan proxy.Proxy, wg *sync.WaitGroup)

type WebFanqiangdang

type WebFanqiangdang struct {
	Url string
	// contains filtered or unexported fields
}

func (*WebFanqiangdang) Get

func (w *WebFanqiangdang) Get() proxy.ProxyList

func (*WebFanqiangdang) Get2Chan

func (w *WebFanqiangdang) Get2Chan(pc chan proxy.Proxy)

func (*WebFanqiangdang) Get2ChanWG

func (w *WebFanqiangdang) Get2ChanWG(pc chan proxy.Proxy, wg *sync.WaitGroup)

type WebFreessrXyz

type WebFreessrXyz struct {
}

func (*WebFreessrXyz) Get

func (w *WebFreessrXyz) Get() proxy.ProxyList

func (*WebFreessrXyz) Get2Chan

func (w *WebFreessrXyz) Get2Chan(pc chan proxy.Proxy)

func (*WebFreessrXyz) Get2ChanWG

func (w *WebFreessrXyz) Get2ChanWG(pc chan proxy.Proxy, wg *sync.WaitGroup)

type WebFuzz

type WebFuzz struct {
	Url string
}

A Getter with an additional property

func (*WebFuzz) Get

func (w *WebFuzz) Get() proxy.ProxyList

Implement Getter interface

func (*WebFuzz) Get2Chan

func (w *WebFuzz) Get2Chan(pc chan proxy.Proxy)

func (*WebFuzz) Get2ChanWG

func (w *WebFuzz) Get2ChanWG(pc chan proxy.Proxy, wg *sync.WaitGroup)

type WebFuzzSub

type WebFuzzSub struct {
	Url string
}

func (*WebFuzzSub) Get

func (w *WebFuzzSub) Get() proxy.ProxyList

func (*WebFuzzSub) Get2Chan

func (w *WebFuzzSub) Get2Chan(pc chan proxy.Proxy)

func (*WebFuzzSub) Get2ChanWG

func (w *WebFuzzSub) Get2ChanWG(pc chan proxy.Proxy, wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL