12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- package utils
- import "gitee.com/nanqis/bigtires/big"
- /**
- 获取一个呼风云代理IP
- 返回:
- proxyip:代理IP:端口
- user:代理账号,非IP白名单的情况下需要使用
- password:代理密码,非IP白名单的情况下需要使用
- realip:真实IP
- */
- func GetProxyIpHuFengYun() (proxyip string, user string, password string, realip string) {
- temp := ""
- for proxyip == "" || proxyip == ":" {
- temp, _, _, _ = big.HttpSend(&big.HttpParms{Url: "http://pool.hufengyun.com/tunnel?id=1035423500007204235&secret=ZUEhEEzhbW4ujJNe&format=json&city=0&num=1"})
- proxyip = big.StrGetSub(temp, "proxy_ip\":\"", "\"") + ":" + big.StrGetSub(temp, "proxy_port\":", ",\"")
- }
- user = "2021052001605121442"
- password = "ZUEhEEzhbW4ujJNe"
- realip = big.StrGetSub(temp, "real_ip\":\"", "\"")
- return
- }
- /**
- 获取一个芝麻代理
- 返回:
- proxyip:代理ip:端口
- */
- func GetProxyIpZhiMa() (proxyip string) {
- temp := ""
- for proxyip == "" || proxyip == ":" {
- temp, _, _, _ = big.HttpSend(&big.HttpParms{Url: "http://webapi.http.zhimacangku.com/getip?num=1&type=2&pro=0&city=0&yys=0&port=1&time=1&ts=1&ys=1&cs=1&lb=1&sb=0&pb=45&mr=2®ions="})
- proxyip = big.StrGetSub(temp, "\"ip\":\"", "\",") + ":" + big.StrGetSub(temp, "port\":", ",\"")
- }
- return
- }
- /**
- 获取一个亿牛云代理
- 返回:
- proxyip:代理ip:端口
- */
- func GetProxyIpNiuYun() string {
- res, _, _, _ := big.HttpSend(&big.HttpParms{
- Url: "http://120.79.71.17:9090/agent/getip",
- Mode: "POST",
- })
- res = big.StrGetSub(res, "http://", "\"")
- return res
- }
|