访问
获取入口节点
GET
/access/entry-nodes
不同的入口节点有助于确定从您所在国家出发的更快路线。
請求範例:
curl -X GET https://resi-api.iproyal.com/v1/access/entry-nodes \
-H "Authorization: Bearer <your_api_token>"
响应示例:
[
{
"dns": "proxy.iproyal.com",
"ips": ["91.239.130.34"],
"ports": [
{
"name": "http|https",
"port": 12321,
"alternative_ports": [
11200,
...
]
},
{
"name": "socks5",
"port": 32325,
"alternative_ports": [
51200,
...
]
}
]
},
{
"dns": "us.proxy.iproyal.com",
"ips": ["23.146.144.102", "23.146.144.102"],
"ports": [
{
"name": "http|https",
"port": 12321,
"alternative_ports": [
11246,
...
]
},
{
"name": "socks5",
"port": 32325,
"alternative_ports": [
51200,
...
]
}
]
},
...
]
获取国家
GET
/access/countries
返回可用于针对特定代理的国家、城市、州和互联网服务提供商(ISP)的列表。它还返回用于每个代理的前缀。有关如何构建代理字符串的更多信息,请参阅我们的“代理”小节。
請求範例:
curl -X GET https://resi-api.iproyal.com/v1/access/countries \
-H "Authorization: Bearer <your_api_token>"
响应示例:
{
"prefix": "_country-",
"countries": [
{
"code": "am",
"name": "Armenia",
"cities": {
"prefix": "_city-",
"options": [
{
"code": "armavir",
"name": "Armavir",
"isps": {
"prefix": "_isp-",
"options": [
{
"code": "prostieresheniallc",
"name": "Prostie Reshenia LLC"
}
]
}
}
]
},
"states": {
"prefix": "_state-",
"options": [
{
"code": "armavir",
"name": "Armavir",
"cities": {
"prefix": "_city-",
"options": [
{
"code": "armavir",
"name": "Armavir",
"isps": {
"prefix": "_isp-",
"options": []
}
}
]
},
"isps": {
"prefix": "_isp-",
"options": [
{
"code": "prostieresheniallc",
"name": "Prostie Reshenia LLC"
}
]
}
}
]
}
}
]
}
获取区域
与 访问类似,它返回可用的地区,用于选择代理的地区。
GET
/access/regions
請求範例:
curl -X GET https://resi-api.iproyal.com/v1/access/regions \
-H "Authorization: Bearer <your_api_token>"
响应示例:
{
"prefix": "_region-",
"regions": [
{
"code": "africa",
"name": "Africa"
},
{
"code": "arabstates",
"name": "Arab States"
},
{
"code": "asiapacific",
"name": "Asia & Pacific"
},
{
"code": "europe",
"name": "Europe"
},
{
"code": "middleeast",
"name": "Middle east"
},
{
"code": "northamerica",
"name": "North America"
},
{
"code": "southlatinamerica",
"name": "South/Latin America"
}
]
}
获取国家集合
GET
/access/country-sets
与访问类似,它返回可用国家集合,用于选择代理的地区。
請求範例:
curl -X GET https://resi-api.iproyal.com/v1/access/country-sets \
-H "Authorization: Bearer <your_api_token>"
响应示例:
{
"prefix": "_set-",
"countrySets": [
{
"code": "courir",
"name": "COURIR"
},
{
"code": "mesh1",
"name": "MESH 1"
},
{
"code": "mesh2",
"name": "MESH 2"
},
{
"code": "nikeas",
"name": "NIKE ASIA"
},
{
"code": "nikeeu",
"name": "NIKE EU"
},
{
"code": "nikena",
"name": "NIKE US"
},
{
"code": "zalando",
"name": "ZALANDO"
}
]
}
生成代理列表
POST
/access/generate-proxy-list
請求範例:
名称
类型
描述
可用选项
format
字符串
将返回代理字符串的格式
{hostname}:{port}:{username}:{password}
{hostname}:{port}@{username}:{password}
{username}:{password}:{hostname}:{port}
port
字符串
端口作为协议字符串
http|https
socks5
rotation
字符串
将被使用的轮换类型
sticky
random
subuser_hash
字符串
将要使用的子服务器
proxy_count
整型
将返回的代理计数
username
字符串
将要使用的用户名
password
字符串
将要使用的密码
lifetime
字符串
对于粘性会话,这将告知该会话将持续多长时间
5s
10m
20h
正文参数:
curl -X POST https://resi-api.iproyal.com/v1/access/generate-proxy-list \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your_api_token>" \
-d '{
"format": "{hostname}:{port}:{username}:{password}",
"hostname": "example.hostname.com",
"port": "http|https",
"rotation": "sticky",
"location": "_country-sg",
"proxy_count": 10,
"subuser_hash": "example_subuser_hash",
"lifetime": "2h"
}'
响应示例:
[
"geo.iproyal.com:0:[email protected]:royal123_session-abc123_lifetime-24h",
"geo.iproyal.com:0:[email protected]:royal123_session-cba321_lifetime-24h",
]
Last updated