http

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DHttp = &Http{}

Functions

This section is empty.

Types

type Http

type Http struct {
}

func (*Http) CreateFileServer

func (obj *Http) CreateFileServer(localPath string, relativePath string, port string, OnlyListenLocalAddr bool)

CreateFileServer 创建一个HTTP文件服务器,注意relativePath路径后要加斜杠 example:DNepal.CreateFileServer("C:\\lee\\project\\go\\auto", "/static/", "8888", true)

func (*Http) CreateFileServerByGin

func (obj *Http) CreateFileServerByGin(localPath string, relativePath string, port string, OnlyListenLocalAddr bool)

CreateFileServerByGin 创建一个HTTP文件服务器,通过gin框架

func (*Http) CreateHttpProxyClient

func (obj *Http) CreateHttpProxyClient(proxy string, timeout int) *http.Client

CreateHttpProxyClient 创建一个http代理客户端,代理类型由uri确定,支持http/https/socks5,默认为http http://fans007:fans888@45.76.169.156:39000

func (*Http) TestMulHttpProxy added in v1.0.13

func (obj *Http) TestMulHttpProxy(proxys []string, timeout int, maxG int, printLog bool) (success []string, fail []string)

TestMulHttpProxy 批量测试多个HTTP代理

func (*Http) TestOneHttpProxy added in v1.0.13

func (obj *Http) TestOneHttpProxy(proxy string, timeout int) (string, error)

TestOneHttpProxy 测试单个http代理是否可用

Jump to

Keyboard shortcuts

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