API使用
1、使用浏览器
1.1、获取当前IP(限制 1200次 /小时)
用浏览器访问 http://ip.hahado.cn/current-ip 输入用户名和密码
[
{
"ip": "180.102.181.64",
"ttl": 262.87515091896057
}
]
- "ip": 字段是当前的外网IP ("ip":"null" 正在切换中,暂时没有IP)
- "ttl": 字段是ip可以使用的剩余时间(秒)
1.2、手动切换IP(限制 180次 /小时,间隔>20秒)
用浏览器访问 http://ip.hahado.cn/switch-ip 输入用户名和密码
[
{
"last_ip": "180.102.181.64",
"result": true
}
]
- "last_ip": 切换前的IP
- "result": 结果 true (成功) false (失败)
1.3、获取统计(限制 100次 /小时)
http://ip.hahado.cn/ip-status 输入用户名和密码
[
{
"all_ip": [
[
"121.237.160.177",
"2017-03-23 14:03:39"
],
[
"49.65.179.204",
"2017-03-23 13:48:19"
],
[
"121.237.163.65",
"2017-03-23 12:56:20"
]
],
"all_ip_exprie_tm": 7200,
"changeip_time": 300,
"ip": "121.237.160.177",
"last_ip": "117.62.144.170"
}
]
- "all_ip": 曾经使用过的IP和时间
- "last_ip": 切换前的IP
- "ip": 当前的IP
- "changeip_time": 自动切换IP间隔(秒)如果为0 => 关闭
- "all_ip_exprie_tm": IP不允许在xxx(秒)以内重复
2、使用curl
2.1、 获取当前IP(限制 1200次 /小时)
curl -u username:password http://ip.hahado.cn/current-ip
[
{
"ip": "180.102.181.64",
"ttl": 262.87515091896057
}
]
- username : 用户名
- password : 密码
- "ip": 字段是当前的外网IP ("ip":"null" 正在切换中,暂时没有IP)
- "ttl": 字段是ip可以使用的剩余时间(秒), -1 表示永远不过期(需要手动切换)
2.2、手动切换IP(限制 180次 /小时,间隔>20秒)
curl -u username:password http://ip.hahado.cn/switch-ip
[
{
"last_ip": "180.102.181.64",
"result": true
}
]
- username : 用户名
- password : 密码
- "last_ip": 切换前的IP
- "result": 结果 true (成功) false (失败)
2.3、获取统计(限制 100次 /小时)
curl -u username:password http://ip.hahado.cn/ip-status
[
{
"all_ip": [
[
"121.237.160.177",
"2017-03-23 14:03:39"
],
[
"49.65.179.204",
"2017-03-23 13:48:19"
],
[
"121.237.163.65",
"2017-03-23 12:56:20"
]
],
"all_ip_exprie_tm": 7200,
"changeip_time": 300,
"ip": "121.237.160.177",
"last_ip": "117.62.144.170"
}
]
- username : 用户名
- password : 密码
- "all_ip": 曾经使用过的IP和时间
- "last_ip": 切换前的IP
- "ip": 当前的IP
- "changeip_time": 自动切换IP间隔(秒)如果为0 => 关闭
- "all_ip_exprie_tm": IP不允许在xxx(秒)以内重复