1 Star 1 Fork 1

坐公交也用券 / gns

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
api.go 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
package gns
import "net/http"
// Api 定义GNS结构体
type Api struct {
debug bool // 是否开启调试信息打印(默认: false)
https bool // 是否使用https(默认: false)
agreement string // 设置使用的协议(TCP/UDP),默认: TCP
port int // 使用的端口(默认: 80)
code int // HTTP请求代码(默认: 200)
request string // 使用的请求方式(默认: GET)
timeout int // 超时设置(默认: 5秒)
pingCount int // 设置Ping包数量(默认: 5)
UseTxt, NotUsed string // 使用/没使用的ip清单
Req *http.Request // 请求实例
Resp *http.Response // 响应实例
Err error // 错误
}
type IpApi struct {
dns1 string //设置用于判断的DNS1(默认: 8.8.8.8)
dns2 string //设置用于判断的DNS2(默认: 114.114.114.114)
port int // 设置用于访问的端口(默认: 80)
debug bool // 是否显示调试参数
}
type PingCmdAPI struct {
timeout int // 超时设置(默认: 5秒)
pingCount int // 设置Ping包数量(默认: 5)
host string // 主机地址
Realtime bool // 是否开启实时刷新
ExitStatus bool // 是否打印每次退出代码
}
Go
1
https://gitee.com/liumou_site/gns.git
git@gitee.com:liumou_site/gns.git
liumou_site
gns
gns
v1.3.3

搜索帮助