Documentation ¶
Index ¶
- Variables
- type Proxy
- func (obj *Proxy) CreateFileServer(localPath string, relativePath string, port string, OnlyListenLocalAddr bool)
- func (obj *Proxy) CreateFileServerByGin(localPath string, relativePath string, port string, OnlyListenLocalAddr bool)
- func (obj *Proxy) CreateHttpProxyClient(proxy string, timeout int) (*http.Client, error)
- func (obj *Proxy) TestMulHttpProxy(proxys []string, timeout int, maxG int, printLog bool) (success []string, fail []string)
- func (obj *Proxy) TestOneHttpProxy(proxy string, timeout int) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DProxy = &Proxy{}
Functions ¶
This section is empty.
Types ¶
type Proxy ¶
type Proxy struct{}
func (*Proxy) CreateFileServer ¶
func (obj *Proxy) CreateFileServer(localPath string, relativePath string, port string, OnlyListenLocalAddr bool)
CreateFileServer 创建一个HTTP文件服务器,注意relativePath路径后要加斜杠 example:DNepal.CreateFileServer("C:\\lee\\project\\go\\auto", "/static/", "8888", true)
func (*Proxy) CreateFileServerByGin ¶
func (obj *Proxy) CreateFileServerByGin(localPath string, relativePath string, port string, OnlyListenLocalAddr bool)
CreateFileServerByGin 创建一个HTTP文件服务器,通过gin框架
func (*Proxy) CreateHttpProxyClient ¶
CreateHttpProxyClient 创建一个http代理客户端,代理类型由uri确定,支持http/https/socks5,默认为http http://fans007:fans888@45.76.169.156:39000
Click to show internal directories.
Click to hide internal directories.