开发者指南 IP池客户端API文档

IP池客户端API文档

更新时间: 2022-04-06 18:01:07

1 获取当前线程(端口)下的IP信息

1.1 接口说明

URL
http://api.proxy.com/?actions=show
方法
GET
编码
utf-8
响应

code:状态码;
success: 成功标记;
local_address:本地绑定地址;
proxy_address:代理IP地址;
ttl:剩余有效时长;
create_at:代理IP上线时间(timestamp);
get_at:提取时间(timestamp);
connections:当前并发数;

状态码

200:获取成功;

1.2 接口示例

请求:
GET /?actions=show
Host: api.proxy.com
响应:
                    {
                        "code": 200,
                        "data": {
                            "t_index": 0,
                            "index": 0,
                            "local_address": ":26766",
                            "proxy_address": "117.42.254.48:33844",
                            "ttl": 103,
                            "create_at": 1649208241,
                            "get_at": 1649208258,
                            "connections": 0
                        }
                    }
                   

2 切换当前线程(端口)下的IP

建议每隔10秒一次调用,以及时获取更新的代理IP。

2.1 接口说明

URL
http://api.proxy.com/?actions=change
方法
GET
编码
utf-8
响应

code:状态码;
success: 成功标记;
address:本地绑定地址;
create_at:代理IP上线时间(timestamp);
during:代理IP有效时长(分钟);

状态码

200:获取成功;
1010:异常,切换频繁;

2.2 接口示例

请求:
GET /?actions=change
Host: api.proxy.com
响应:
                    {
                        "code": 200,
                        "data": {
                            "address": "116.139.201.253:34320",
                            "create_at": 1649208718,
                            "during": 2
                        }
                    }
                   

3 获取当前线程IP池下所有线程的相关信息

3.1 接口说明

URL
http://api.proxy.com/?actions=list
方法
GET
编码
utf-8
响应

code:状态码;
success: 成功标记;
local_address:本地绑定地址;
proxy_address:代理IP地址;
ttl:剩余有效时长;
create_at:代理IP上线时间(timestamp);
get_at:提取时间(timestamp);
connections:当前并发数;

状态码

200:获取成功;

3.2 接口示例

请求:
GET /?actions=list
Host: api.proxy.com
响应:
                    {
                        "code": 200,
                        "data": [{
                            "t_index": 0,
                            "index": 0,
                            "local_address": ":26766",
                            "proxy_address": "116.139.201.253:34320",
                            "ttl": 69,
                            "create_at": 1649208718,
                            "get_at": 1649208769,
                            "connections": 0
                        }, {
                            "t_index": 1,
                            "index": 0,
                            "local_address": ":26767",
                            "proxy_address": "110.82.143.88:34347",
                            "ttl": 114,
                            "create_at": 1649208744,
                            "get_at": 1649208750,
                            "connections": 0
                        }, {
                            "t_index": 2,
                            "index": 0,
                            "local_address": ":26768",
                            "proxy_address": "49.74.88.22:34340",
                            "ttl": 109,
                            "create_at": 1649208739,
                            "get_at": 1649208750,
                            "connections": 0
                        }, {
                            "t_index": 3,
                            "index": 0,
                            "local_address": ":26769",
                            "proxy_address": "121.230.47.248:34305",
                            "ttl": 73,
                            "create_at": 1649208703,
                            "get_at": 1649208750,
                            "connections": 0
                        }, {
                            "t_index": 4,
                            "index": 0,
                            "local_address": ":26770",
                            "proxy_address": "180.108.137.34:34327",
                            "ttl": 96,
                            "create_at": 1649208726,
                            "get_at": 1649208750,
                            "connections": 0
                        }]
                    }
                   
logo

欢迎注册小象代理

已阅读并同意《网络安全协议》
已经有账户了?

找回密码

已经有账户了?