Skip to content

生成代理

创建不同类型的代理IP,支持静态IP、动态IP、静态流量和动态流量四种代理类型。

代理类型说明

代理类型说明特点
静态IP代理按时间计费,IP固定不变稳定性高,适合长期使用
动态IP代理按时间计费,IP可定期刷新IP可更换,灵活性高
静态流量代理按流量计费,IP固定不变按实际使用流量付费
动态流量代理按流量计费,IP可定期刷新按流量计费且IP可更换

接口列表

接口方法描述
创建静态IP代理POST创建按时间计费的固定IP代理
创建动态IP代理POST创建按时间计费的可更换IP代理
创建静态流量代理POST创建按流量计费的固定IP代理
创建动态流量代理POST创建按流量计费的可更换IP代理

创建静态IP代理

创建按时间计费的固定IP代理,IP地址在购买期间保持不变。

接口信息

项目说明
接口地址https://api.ipflex.ink/token/static/ip
请求方法POST
认证方式Bearer Token(从后台获取)
Content-Typeapplication/json

请求参数

参数名类型必填说明示例
numberinteger创建数量,1-105
network_typestring网络类型:HTTPSOCKS5,默认 HTTPHTTP
country_idinteger国家 ID(从地区查询接口获取)1
state_idinteger州/省 ID1
city_idinteger城市 ID1
payway_idinteger支付方式 ID(默认账户余额)1

请求示例

bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "number": 5,
    "network_type": "HTTP",
    "country_id": 1
  }' \
  https://api.ipflex.ink/token/static/ip
python
import requests

headers = {
    'Authorization': 'Bearer YOUR_TOKEN'
}

response = requests.post(
    'https://api.ipflex.ink/token/static/ip',
    headers=headers,
    json={
        'number': 5,
        'network_type': 'HTTP',
        'country_id': 1
    }
)

print(response.json())

响应示例

json
{
  "code": 0,
  "msg": "success",
  "data": [
    {
      "id": 293241,
      "ip": "",
      "host": "proxy.ipflex.ink",
      "port": 12345,
      "username": "AKgStGv6ulth",
      "password": "ATkpsMk1",
      "expired_on": 1768116314,
      "country": "United States",
      "state": "",
      "city": ""
    }
  ]
}

响应字段说明

字段类型说明
codeinteger状态码,0表示成功
msgstring响应消息
dataarray创建的代理列表
data[].idinteger代理ID
data[].ipstring代理IP地址(创建时可能为空,稍后分配)
data[].hoststring代理主机地址
data[].portinteger代理端口
data[].usernamestring认证用户名
data[].passwordstring认证密码
data[].expired_oninteger过期时间戳
data[].countrystring国家名称
data[].statestring州/省名称
data[].citystring城市名称

创建动态IP代理

创建按时间计费的可更换IP代理,支持手动或自动刷新IP地址。

接口信息

项目说明
接口地址https://api.ipflex.ink/token/variable/ip
请求方法POST
认证方式Bearer Token(从后台获取)
Content-Typeapplication/json

请求参数

参数名类型必填说明示例
numberinteger创建数量,1-105
network_typestring网络类型:HTTPSOCKS5,默认 HTTPHTTP
country_idinteger国家 ID1
state_idinteger州/省 ID1
city_idinteger城市 ID1
payway_idinteger支付方式 ID1

请求示例

bash
curl -u username:password \
  -H "Content-Type: application/json" \
  -d '{
    "number": 5,
    "network_type": "HTTP",
    "country_id": 1
  }' \
  https://api.ipflex.ink/token/variable/ip
python
import requests

response = requests.post(
    'https://api.ipflex.ink/token/variable/ip',
    auth=('username', 'password'),
    json={
        'number': 5,
        'network_type': 'HTTP',
        'country_id': 1
    }
)

print(response.json())

响应示例

json
{
  "tokens": [
    {
      "id": 12346,
      "token": "user123_token2",
      "ip": "203.0.113.43",
      "port": 8080,
      "username": "user123",
      "password": "pass123",
      "country": "United States",
      "city": "New York",
      "network_type": "HTTP",
      "expire_time": "2024-02-08T12:00:00Z",
      "refresh_url": "https://api.ipflex.ink/token/dynamic/ip/refresh/12346"
    }
  ],
  "total_count": 5,
  "success_count": 5
}

响应字段说明

与静态IP代理相同,额外包含:

字段类型说明
tokens[].refresh_urlstring刷新IP的URL(手动或自动刷新时使用)

创建静态流量代理

创建按流量计费的固定IP代理,仅根据实际使用的代理流量付费。

接口信息

项目说明
接口地址https://api.ipflex.ink/token/static/traffic
请求方法POST
认证方式Bearer Token(从后台获取)
Content-Typeapplication/json

请求参数

参数名类型必填说明示例
numberinteger创建数量,1-105
network_typestring网络类型:HTTPSOCKS5HTTP
country_idinteger国家 ID(从地区查询接口获取)233
state_idinteger州/省 ID1456
city_idinteger城市 ID110968

注意

流量代理按实际使用流量计费,不需要payway_id参数。创建时不会扣费,仅在使用流量时计费。

请求示例

bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "number": 1,
    "network_type": "HTTP",
    "country_id": 233
  }' \
  https://api.ipflex.ink/token/static/traffic
python
import requests

headers = {
    'Authorization': 'Bearer YOUR_TOKEN'
}

response = requests.post(
    'https://api.ipflex.ink/token/static/traffic',
    headers=headers,
    json={
        'number': 1,
        'network_type': 'HTTP',
        'country_id': 233
    }
)

print(response.json())

响应示例

json
{
  "code": 0,
  "msg": "success",
  "data": [
    {
      "id": 293250,
      "ip": "185.112.242.29",
      "host": "proxy.ipflex.ink",
      "port": 12345,
      "username": "OZ6ba1X2nUei",
      "password": "W1Fe5BIe",
      "expired_on": 0,
      "country": "United States",
      "state": "",
      "city": ""
    }
  ]
}

响应字段说明

字段类型说明
codeinteger状态码,0表示成功
msgstring响应消息
dataarray创建的代理列表
data[].idinteger代理ID(Token ID)
data[].ipstring代理IP地址
data[].hoststring代理主机地址
data[].portinteger代理端口
data[].usernamestring认证用户名
data[].passwordstring认证密码
data[].expired_oninteger过期时间戳(0表示按流量计费无固定过期时间)
data[].countrystring国家名称
data[].statestring州/省名称
data[].citystring城市名称

创建动态流量代理

创建按流量计费的可更换IP代理,结合了流量计费和IP可更换的优点。

接口信息

项目说明
接口地址https://api.ipflex.ink/token/variable/traffic
请求方法POST
认证方式Bearer Token(从后台获取)
Content-Typeapplication/json

请求参数

参数名类型必填说明示例
numberinteger创建数量,1-105
network_typestring网络类型:HTTPSOCKS5HTTP
country_idinteger国家 ID(从地区查询接口获取)233
state_idinteger州/省 ID1456
city_idinteger城市 ID110968

注意

动态流量代理按实际使用流量计费,不需要payway_id参数。创建时不会扣费,仅在使用流量时计费。IP地址可以定期刷新。

请求示例

bash
curl -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "number": 1,
    "network_type": "HTTP",
    "country_id": 233
  }' \
  https://api.ipflex.ink/token/variable/traffic
python
import requests

headers = {
    'Authorization': 'Bearer YOUR_TOKEN'
}

response = requests.post(
    'https://api.ipflex.ink/token/variable/traffic',
    headers=headers,
    json={
        'number': 1,
        'network_type': 'HTTP',
        'country_id': 233
    }
)

print(response.json())

响应示例

json
{
  "tokens": [
    {
      "id": 12348,
      "token": "user123_token4",
      "ip": "203.0.113.45",
      "port": 1080,
      "username": "user123",
      "password": "pass123",
      "country": "United States",
      "city": "Seattle",
      "network_type": "SOCKS5",
      "traffic_quota": 10737418240,
      "traffic_used": 0,
      "refresh_url": "https://api.ipflex.ink/token/dynamic/ip/refresh/12348"
    }
  ],
  "total_count": 3,
  "success_count": 3
}


相关文档

基于 MIT 许可发布