Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProxyBuilder ¶
ProxyBuilder 구조체는 프록시를 가져올 Source와 Parser 함수로 이루어져 있습니다. Source는 여러 개일 수 있으나, 단일한 Parser 함수로 호환 가능한 형태여야 합니다. Parser는 func(source string) []*url.URL 형태를 충족시켜야 합니다.
type ProxyFactory ¶
type ProxyFactory struct {
ProxyBuilders []*ProxyBuilder
}
ProxyFactory 구조체는 복수의 ProxySource를 가집니다.
func NewProxyFactory ¶
func NewProxyFactory() *ProxyFactory
NewProxyFactory 함수는 빈 ProxyFactory 구조체를 반환합니다.
func (*ProxyFactory) AddCustomProxySource ¶
func (pf *ProxyFactory) AddCustomProxySource(proxyBuilder *ProxyBuilder)
AddCustomProxySource 함수는 사용자가 구현한 ProxyBuilder를 인자로 받아 ProxyFactory 객체에 추가합니다.
func (*ProxyFactory) AddDefaultOpenProxySources ¶
func (pf *ProxyFactory) AddDefaultOpenProxySources()
AddDefaultOpenProxySources 함수는 패키지에 포함되어 있는 기본 ProxySource들을 추가합니다.
func (*ProxyFactory) ProxySource ¶
func (pf *ProxyFactory) ProxySource() chan *url.URL
ProxySource 함수는 프록시를 전송하는 채널을 반환합니다. 이 채널은 파싱된 프록시 url을 무작위로 계속해서 전송하며 채널은 계속 열려있습니다.
Example ¶
pf := NewProxyFactory() pf.AddDefaultOpenProxySources() for _ = range pf.ProxySource() { // ... }
Output:
Click to show internal directories.
Click to hide internal directories.