HTTP简化版 API使用

1、使用浏览器

1.1、获取当前IP(限制 1200次 /小时)

用浏览器访问 http://ip.hahado.cn/simple/current-ip?username=username&password=password URL上面加上用户名和密码

[
 {
   "ip": "180.102.181.64",
   "ttl": 262.87515091896057
 }
]
  • "ip": 字段是当前的外网IP ("ip":"null" 正在切换中,暂时没有IP)
  • "ttl": 字段是ip可以使用的剩余时间(秒)

1.2、手动切换IP(限制 180次 /小时,间隔>20秒)

用浏览器访问 http://ip.hahado.cn/simple/switch-ip?username=username&password=password URL上面加上用户名和密码

[
  {
    "last_ip": "180.102.181.64",
    "result": true
  }
]
  • "last_ip": 切换前的IP
  • "result": 结果 true (成功) false (失败)

1.3、重启服务(限制 10次 /小时,间隔>360秒)

用浏览器访问 http://ip.hahado.cn/simple/update?username=username&password=password URL上面加上用户名和密码

[
  [
    [
      "user1-duoip12312-39507",
      "",
      "created"
    ],
    [
      "ss-user1-duoip12312-39507",
      "",
      "created"
    ]
  ]
]
  • "created": 重启成功

2、使用curl

2.1、 获取当前IP(限制 1200次 /小时)

curl  http://ip.hahado.cn/simple/current-ip?username=username&password=password

[
 {
   "ip": "180.102.181.64",
   "ttl": 262.87515091896057
 }
]
  • username : 用户名
  • password : 密码
  • "ip": 字段是当前的外网IP ("ip":"null" 正在切换中,暂时没有IP)
  • "ttl": 字段是ip可以使用的剩余时间(秒), -1 表示永远不过期(需要手动切换)

2.2、手动切换IP(限制 180次 /小时,间隔>20秒)

curl  http://ip.hahado.cn/simple/switch-ip?username=username&password=password

[
  {
    "last_ip": "180.102.181.64",
    "result": true
  }
]
  • username : 用户名
  • password : 密码
  • "last_ip": 切换前的IP
  • "result": 结果 true (成功) false (失败)

2.3、重启服务(限制 10次 /小时,间隔>360秒)

curl http://ip.hahado.cn/simple/update?username=username&password=password
[
  [
    [
      "user1-duoip12312-39507",
      "",
      "created"
    ],
    [
      "ss-user1-duoip12312-39507",
      "",
      "created"
    ]
  ]
]
  • "created": 重启成功

猜你喜欢

转载自blog.csdn.net/weixin_73725158/article/details/129955240
今日推荐