1. 基本信息
所有接口的基础路径都是:
/soloip/api/v1请求头:
Authorization: Bearer <API_TOKEN>
Content-Type: application/json说明:
API_TOKEN在飞鱼分流管理页面的 API 设置中查看或重置。- 业务接口只接受 JSON 请求体,除非接口说明另有注明。
- 返回
200只代表请求已成功送达,实际业务结果仍以响应体中的msg、data或error为准。 - 如果访问了未开放给外部 API 的接口,后端会返回
403 API_ENDPOINT_NOT_ALLOWED。
常见错误:
| HTTP 状态 | error | 说明 |
|---|---|---|
401 | API Token 无效 | Token 缺失、格式错误或与设备保存不一致 |
403 | API_ACCESS_REQUIRED | 当前授权未开通 API 接口权限 |
403 | API_TRIAL_QUOTA_EXHAUSTED | API 体验额度已用完 |
403 | API_ENDPOINT_NOT_ALLOWED | 当前 Token 不允许访问该接口 |
400 | 具体错误文本 | 请求参数格式错误 |
500 | 具体错误文本 | 服务执行失败 |
2. 通用对象与约定
2.1 Node 代理节点
{
"id": 1,
"name": "HK-01",
"protocol": "socks5",
"config_json": "{\"server\":\"1.2.3.4\",\"port\":1080,\"username\":\"u\",\"password\":\"p\"}",
"group": "香港",
"created_at": "2026-05-18T10:00:00Z"
}字段说明:
| 字段 | 类型 | 说明 |
|---|---|---|
id | number | 节点 ID |
name | string | 节点名称 |
protocol | string | 协议类型,例如 socks5、ss、vmess、vless、trojan 等 |
config_json | string | 节点配置 JSON 字符串,内容按协议不同而不同 |
group | string | 节点分组名 |
created_at | string | 创建时间 |
config_json 仅表示协议配置,不建议外部程序依赖其中的内部字段名;如需批量修改节点出口,请优先使用节点批量接口。
2.2 VPNLine L2TP/PPTP 线路
{
"id": 1,
"type": "l2tp",
"name": "l2tp_1",
"server": "vpn.example.com",
"port": 1701,
"username": "user",
"password": "pass",
"secret": "ipsec-secret",
"interface": "auto",
"comment": "线路A",
"dns_profile": "auto",
"dns_servers": [],
"is_enabled": true,
"is_online": true
}字段说明:
| 字段 | 类型 | 说明 |
|---|---|---|
id | number | 线路 ID |
type | string | 线路类型,只能是 l2tp 或 pptp |
name | string | 系统接口名,例如 l2tp_1、pptp_1 |
server | string | VPN 服务器地址 |
port | number | 服务器端口 |
username | string | 用户名 |
password | string | 密码 |
secret | string | L2TP 的 IPsec 密钥,PPTP 固定为空 |
interface | string | 承载出口,默认 auto |
comment | string | 备注 |
dns_profile | string | 线路专用 DNS 模式:auto、domestic、outbound、return、custom |
dns_servers | array | custom 模式下使用的 DNS 服务器列表 |
is_enabled | boolean | 是否启用 |
is_online | boolean | 是否已获取到 IPv4 地址,可作为“是否连接成功”的判断依据 |
说明:
is_enabled表示启用/停用开关。is_online表示系统接口当前是否拿到 IPv4 地址,通常可作为线路是否已连通的判断。- 新增和导入线路后,后端默认会保持线路启用;如需停用,请调用启停接口。
interface建议传auto,也可以指定本地 WAN 名称。dns_profile仅在线路专用 DNS 功能可用时生效;若传custom,必须同时提供dns_servers。
2.3 Rule 分流规则
{
"id": 1,
"ip": "192.168.50.100",
"mac": "AA:BB:CC:DD:EE:FF",
"comment": "客厅电视",
"is_enabled": true,
"target_node": "HK-01",
"upload_limit_kbps": 5120,
"download_limit_kbps": 20480,
"created_at": "2026-05-18T10:00:00Z",
"updated_at": "2026-05-18T10:00:00Z"
}字段说明:
| 字段 | 类型 | 说明 |
|---|---|---|
id | number | 规则 ID |
ip | string | 设备 IP 或 CIDR;单个 IP 在存储层规范为 /32,列表响应会去掉该后缀 |
mac | string | 设备 MAC,仅用于备注和展示 |
comment | string | 备注 |
is_enabled | boolean | 是否启用分流 |
target_node | string | 目标节点、分组或出口线路 |
upload_limit_kbps | number | 上传限速,单位 Kbps;0 表示不限速 |
download_limit_kbps | number | 下载限速,单位 Kbps;0 表示不限速 |
created_at | string | 创建时间 |
updated_at | string | 更新时间 |
target_node 支持的稳定写法:
| 写法 | 说明 |
|---|---|
| 节点名 | 指向单个节点,例如 HK-01 |
Group_<name> | 指向分组,例如 Group_香港 |
Interface:<ifname> | 指向指定接口或线路,例如 Interface:wan1、Interface:l2tp_1、Interface:pptp_1 |
注意:
- 如果要指定分组,请显式写成
Group_<分组名>。 - 如果要指定线路或接口,请显式写成
Interface:<接口名>。 Interface:仅用于分流规则,不用于代理服务。
2.4 ProxyService 代理服务
{
"id": 1,
"name": "wan1-http",
"outbound_interface": "wan1",
"port": 20001,
"username": "user",
"password": "pass",
"is_enabled": true,
"created_at": "2026-05-18T10:00:00Z"
}字段说明:
| 字段 | 类型 | 说明 |
|---|---|---|
id | number | 代理服务 ID |
name | string | 服务名称,必须唯一 |
outbound_interface | string | 出口接口名,例如 wan1、pppoe_0、l2tp_1、pptp_1 |
port | number | 入口监听端口 |
username | string | 认证用户名 |
password | string | 认证密码 |
is_enabled | boolean | 是否启用 |
created_at | string | 创建时间 |
注意:
outbound_interface使用裸接口名,不加Interface:前缀。- 入口端口不能与系统保留端口冲突。
3. 系统查询
GET /system/status
查询运行状态、连接数、内存和授权状态。
curl -H "Authorization: Bearer soloip_xxx" \
http://192.168.50.1/soloip/api/v1/system/status响应示例:
{
"status": "running",
"uptime": "已运行: 2小时30分15秒",
"version": "6.0.0",
"hasAPIAccess": true,
"connections": 42,
"memory": 15728640,
"adMessage": "飞鱼工作室"
}说明:
status可能是running、stopped或restoring。connections和memory主要用于运行状态监控。- 响应还会包含若干授权兼容字段;外部程序通常只需关注
hasAPIAccess、connections、memory和status。
GET /system/traffic
查询当前连接数和内存占用。
{
"up": 0,
"down": 0,
"connections": 42,
"memory": 15728640
}说明:
up和down为保留字段,当前通常返回0。- 外部程序主要关注
connections和memory。
GET /system/interfaces
查询可用于节点出口线路选择的网络接口列表。
{
"interfaces": ["wan1", "wan2", "pppoe_0", "l2tp_1", "pptp_1"]
}说明:
- 这里会返回系统接口,以及已经启用的 L2TP/PPTP 线路名。
- 即使某条 VPN 线路还没有真正连通,只要已启用,也可以在这里看到它的名字。
GET /system/interfaces-with-ip
查询网络接口及当前 IPv4 地址,适合代理服务创建时选出口。
{
"interfaces": [
{ "name": "wan1", "ip": "100.64.1.2" },
{ "name": "l2tp_1", "ip": "10.0.0.2" },
{ "name": "pptp_1", "ip": "" }
]
}说明:
- 返回内容与
/system/interfaces对齐,只是附加了当前 IPv4 地址。 - 如果接口暂时没有 IPv4,
ip可能为空字符串。
4. 节点管理
接口总览
| 方法 | 路径 | 说明 |
|---|---|---|
GET | /nodes | 获取节点列表 |
POST | /nodes | 添加节点 |
PUT | /nodes/{id} | 编辑节点 |
DELETE | /nodes/{id} | 删除节点 |
DELETE | /nodes/batch | 批量删除节点 |
PATCH | /nodes/batch | 批量修改节点分组、出口和专用 DNS |
POST | /nodes/import | 批量导入节点 |
GET | /nodes/delay | 检测单个节点延迟 |
GET | /nodes/delay/all | 检测全部节点延迟 |
GET /nodes
{
"data": [
{
"id": 1,
"name": "HK-01",
"protocol": "socks5",
"config_json": "{\"server\":\"1.2.3.4\",\"port\":1080}",
"group": "香港",
"created_at": "2026-05-18T10:00:00Z"
}
]
}POST /nodes
{
"name": "HK-01",
"protocol": "socks5",
"config_json": "{\"server\":\"1.2.3.4\",\"port\":1080,\"username\":\"u\",\"password\":\"p\"}",
"group": "香港"
}响应:
{ "msg": "node added", "id": 1 }PUT /nodes/{id}
编辑节点。config_json 为协议对应的 JSON 字符串。
{
"name": "HK-01",
"protocol": "socks5",
"config_json": "{\"server\":\"1.2.3.4\",\"port\":1080}",
"group": "香港"
}响应:
{ "msg": "node updated", "id": 1 }DELETE /nodes/{id}
{ "msg": "node deleted", "id": 1 }DELETE /nodes/batch
{
"ids": [1, 2, 3]
}响应:
{ "msg": "deleted 3 nodes", "deleted": 3 }PATCH /nodes/batch
批量修改节点分组、出口和专用 DNS。
{
"ids": [1, 2],
"group": "香港",
"interface_name": "wan1",
"dialer_proxy": "",
"node_dns_profile": "custom",
"node_dns_servers": "1.1.1.1,8.8.8.8"
}字段说明:
| 字段 | 类型 | 说明 |
|---|---|---|
ids | number[] | 节点 ID 列表 |
group | string/null | 新分组 |
interface_name | string/null | 指定节点出口网卡 |
dialer_proxy | string/null | 指定前置拨号出口 |
node_dns_profile | string/null | 专用 DNS 模式 |
node_dns_servers | string/null | 自定义专用 DNS 服务器,支持逗号或换行分隔 |
说明:
interface_name与dialer_proxy二选一;都为空时会清空出口设置。node_dns_profile支持auto、domestic、outbound、return、custom。- 当
node_dns_profile=custom时,node_dns_servers不能为空。
响应:
{ "msg": "updated 2 nodes", "updated": 2 }POST /nodes/import
批量导入节点。
{
"type": "socks5",
"text": "1.2.3.4,1080,user,pass,HK-01\n5.6.7.8,1080,user,pass,HK-02",
"replace": false,
"group": "香港",
"autoNodeName": false,
"autoNodeNameStartIndex": 1
}导入格式:
| type | 每行格式 |
|---|---|
socks5 | IP,Port,User,Pass[,Name] |
ss | IP,Port,Cipher,Password[,Name] |
vlessvmess | vless|uuid|server|port|... 或 vmess|uuid|server|port|... |
others | name: xx, type: vless, server: xx, port: 443, ... |
说明:
replace=true会先清空现有节点,再导入新节点。autoNodeName=true时,导入行中的节点名会被自动编号覆盖。
响应:
{ "msg": "imported 2 nodes, skipped 0", "imported": 2, "skipped": 0 }GET /nodes/delay
查询单个节点延迟。
查询参数:
| 参数 | 必填 | 说明 |
|---|---|---|
name | 是 | 节点名称 |
url | 否 | 测试 URL,不填则使用默认测速地址 |
timeout | 否 | 超时时间,单位毫秒,默认 5000 |
响应:
{ "delay": 125 }失败时:
{ "delay": -1, "error": "An error occurred in the delay test (all endpoints failed)" }GET /nodes/delay/all
批量检测所有节点延迟。
查询参数:
| 参数 | 必填 | 说明 |
|---|---|---|
url | 否 | 测试 URL,不填则使用默认测速地址 |
timeout | 否 | 超时时间,单位毫秒,默认 8000 |
响应:
{
"data": {
"HK-01": 125,
"HK-02": -1
}
}-1 表示检测失败或超时。
5. L2TP / PPTP 线路管理
接口总览
| 方法 | 路径 | 说明 |
|---|---|---|
GET | /vpn-lines | 获取 L2TP/PPTP 线路列表 |
POST | /vpn-lines | 新增线路 |
PUT | /vpn-lines/{type}/{name} | 编辑线路 |
PATCH | /vpn-lines/status | 批量启用或停用线路 |
DELETE | /vpn-lines | 批量删除线路 |
POST | /vpn-lines/import | 批量导入线路 |
GET /vpn-lines
{
"data": [
{
"id": 1,
"type": "l2tp",
"name": "l2tp_1",
"server": "vpn.example.com",
"port": 1701,
"username": "user",
"password": "pass",
"secret": "ipsec-secret",
"interface": "auto",
"comment": "线路A",
"dns_profile": "auto",
"dns_servers": [],
"is_enabled": true,
"is_online": true
}
]
}说明:
is_enabled是启用开关。is_online可以作为“是否连接成功”的判断依据。- 如果需要真正停用或启用线路,请使用
/vpn-lines/status。
POST /vpn-lines
新增 L2TP 或 PPTP 线路。
{
"type": "l2tp",
"name": "l2tp_1",
"server": "vpn.example.com",
"port": 1701,
"username": "user",
"password": "pass",
"secret": "ipsec-secret",
"interface": "auto",
"comment": "线路A",
"dns_profile": "auto",
"dns_servers": []
}说明:
type只能是l2tp或pptp。name必须以l2tp_或pptp_开头,且长度不能超过 15 个字符。port不传时,L2TP 默认1701,PPTP 默认1723。interface不传时默认为auto。secret仅 L2TP 使用;PPTP 会被忽略。- 新增时后端会默认启用线路;如果想先建后停,请新增后再调用启停接口。
响应:
{ "msg": "L2TP/PPTP line added", "id": 1 }PUT /vpn-lines/{type}/{name}
编辑已有线路。路径中的 {type} 和 {name} 用于定位原线路;请求体可以包含新的 name 以实现改名。
{
"type": "l2tp",
"name": "l2tp_2",
"server": "vpn.example.com",
"port": 1701,
"username": "user",
"password": "pass",
"secret": "ipsec-secret",
"interface": "auto",
"comment": "改名后的线路",
"dns_profile": "custom",
"dns_servers": ["1.1.1.1", "8.8.8.8"],
"is_enabled": true
}说明:
- 类型不可在编辑时变更。
- 修改名称时,建议请求体中的
type与路径一致,name写成新名称。 - 若将
dns_profile设为custom,则dns_servers不能为空。
响应:
{ "msg": "L2TP/PPTP line updated" }PATCH /vpn-lines/status
批量启用或停用线路。
{
"items": [
{ "type": "l2tp", "name": "l2tp_1" },
{ "type": "pptp", "name": "pptp_1" }
],
"is_enabled": false
}响应:
{ "msg": "updated 2 L2TP/PPTP lines", "updated": 2 }DELETE /vpn-lines
批量删除线路。
{
"items": [
{ "type": "l2tp", "name": "l2tp_1" },
{ "type": "pptp", "name": "pptp_1" }
]
}响应:
{ "msg": "deleted 2 L2TP/PPTP lines", "deleted": 2 }POST /vpn-lines/import
批量导入线路。导入后会自动启用新行,并更新已存在的同类型同名线路。
{
"type": "l2tp",
"text": "vpn1.example.com,1701,user1,pass1,secret1,l2tp_1,线路A\nvpn2.example.com,user2,pass2,secret2,l2tp_2,线路B",
"autoLineName": false,
"autoLineNameStartIndex": 1
}L2TP 每行格式:
server,port,user,pass,secret,name,comment
server,user,pass,secret,name,commentPPTP 每行格式:
server,port,user,pass,name,comment
server,user,pass,name,comment说明:
type只能是l2tp或pptp。autoLineName=true时,导入行中的名称会按顺序自动改成l2tp_1、l2tp_2或pptp_1、pptp_2。autoLineNameStartIndex是自动命名起始编号。- 线路导入支持常见分隔符,但建议统一使用逗号,避免备注中包含分隔字符时产生歧义。
响应:
{
"msg": "imported 2, skipped 0",
"imported": 2,
"skipped": 0,
"errors": []
}如果部分行失败,errors 会返回前几条失败原因。
6. 分流规则管理
接口总览
| 方法 | 路径 | 说明 |
|---|---|---|
GET | /rules | 获取分流规则列表 |
POST | /rules | 添加分流规则 |
PUT | /rules/{id} | 编辑分流规则 |
PATCH | /rules/{id}/status | 启用或停用单条规则 |
DELETE | /rules/{id} | 删除单条规则 |
DELETE | /rules/batch | 批量删除规则 |
PATCH | /rules/batch | 批量修改分流目标或上传/下载限速 |
PATCH | /rules/batch/status | 批量启用或停用规则 |
PATCH | /rules/batch/limits | 批量修改规则限速 |
POST | /rules/import | 批量导入规则 |
GET /rules
{
"data": [
{
"id": 1,
"ip": "192.168.50.100",
"mac": "",
"comment": "客厅电视",
"is_enabled": true,
"target_node": "HK-01",
"upload_limit_kbps": 5120,
"download_limit_kbps": 20480,
"created_at": "2026-05-18T10:00:00Z",
"updated_at": "2026-05-18T10:00:00Z"
}
]
}POST /rules
{
"ip": "192.168.50.100",
"mac": "AA:BB:CC:DD:EE:FF",
"comment": "客厅电视",
"is_enabled": true,
"target_node": "Group_香港",
"upload_limit_kbps": 5120,
"download_limit_kbps": 20480
}响应:
{ "msg": "rule added and firewall updated" }PUT /rules/{id}
{
"ip": "192.168.50.101",
"mac": "AA:BB:CC:DD:EE:FF",
"comment": "客厅电视",
"is_enabled": true,
"target_node": "Interface:l2tp_1",
"upload_limit_kbps": 0,
"download_limit_kbps": 10240
}响应:
{ "msg": "rule updated", "id": 1 }PATCH /rules/{id}/status
{
"is_enabled": false
}响应:
{
"msg": "rule status updated",
"id": 1,
"ip": "192.168.50.100",
"is_enabled": false
}DELETE /rules/{id}
{
"msg": "rule deleted and firewall cleaned",
"id": 1,
"ip": "192.168.50.100"
}DELETE /rules/batch
{
"ips": ["192.168.50.100", "192.168.50.101"]
}响应:
{ "msg": "deleted 2 rules", "deleted": 2 }PATCH /rules/batch/status
{
"ips": ["192.168.50.100", "192.168.50.101"],
"is_enabled": true
}响应:
{
"msg": "updated 2 rules",
"updated": 2,
"is_enabled": true
}PATCH /rules/batch
批量修改选中规则的分流目标、上传限速或下载限速。至少将一个 update_* 字段设为 true;当 update_target=true 时必须提供非空 target_node。
{
"ips": ["192.168.50.100", "192.168.50.101"],
"update_target": true,
"target_node": "Group_香港",
"update_upload": true,
"upload_limit_kbps": 5120,
"update_download": true,
"download_limit_kbps": 20480
}字段说明:
| 字段 | 类型 | 说明 |
|---|---|---|
ips | string[] | 规则 IP 列表 |
update_target | boolean | 是否更新分流目标 |
target_node | string | 节点名、Group_<name>、DIRECT、REJECT 或 Interface:<ifname> |
update_upload | boolean | 是否更新上传限速 |
upload_limit_kbps | number | 上传限速,0 表示不限速 |
update_download | boolean | 是否更新下载限速 |
download_limit_kbps | number | 下载限速,0 表示不限速 |
响应:
{
"msg": "updated 2 rules",
"updated": 2,
"target_node": "Group_香港",
"update_target": true,
"update_upload": true,
"update_download": true,
"upload_limit_kbps": 5120,
"download_limit_kbps": 20480
}PATCH /rules/batch/limits
批量修改规则限速。
{
"ips": ["192.168.50.100", "192.168.50.101"],
"update_upload": true,
"upload_limit_kbps": 5120,
"update_download": true,
"download_limit_kbps": 20480
}字段说明:
| 字段 | 类型 | 说明 |
|---|---|---|
ips | string[] | 规则 IP 列表 |
update_upload | boolean | 是否更新上传限速 |
upload_limit_kbps | number | 上传限速,0 表示不限速 |
update_download | boolean | 是否更新下载限速 |
download_limit_kbps | number | 下载限速,0 表示不限速 |
约束:
- 至少一个
update_upload或update_download为true。 - 限速值必须大于或等于
0。
响应:
{
"msg": "updated 2 rule limits",
"updated": 2,
"upload_limit_kbps": 5120,
"download_limit_kbps": 20480,
"update_upload": true,
"update_download": true
}POST /rules/import
{
"text": "192.168.50.100,Group_香港,客厅电视\n192.168.50.101,DIRECT,办公电脑\n192.168.50.102,Interface:l2tp_1,指定线路",
"replace": false
}格式建议:
IP,目标节点,备注目标值建议写法:
- 节点名,例如
HK-01 - 分组,必须写成
Group_香港 - 直连,写
DIRECT - 拒绝,写
REJECT - 指定线路,写
Interface:l2tp_1
响应:
{ "msg": "imported 3 rules, skipped 0", "imported": 3, "skipped": 0 }replace=true 时会先清空原有规则,再导入新规则。
7. 白名单管理
接口总览
| 方法 | 路径 | 说明 |
|---|---|---|
GET | /whitelist | 获取白名单配置 |
PUT | /whitelist | 保存白名单配置 |
GET /whitelist
{
"domains": "baidu.com,taobao.com",
"ips": "1.1.1.1,2.2.2.2",
"node": "DIRECT"
}PUT /whitelist
{
"domains": "baidu.com,taobao.com",
"ips": "1.1.1.1,2.2.2.2",
"node": "DIRECT"
}响应:
{ "msg": "whitelist updated" }字段说明:
| 字段 | 类型 | 说明 |
|---|---|---|
domains | string | 域名白名单,支持逗号或换行分隔 |
ips | string | IP 白名单,支持逗号或换行分隔 |
node | string | 白名单流向,建议使用 DIRECT、节点名或 Group_<name> |
说明:
- 保存后会自动热重载配置并清理现有连接。
- 如果选择分组,请写成
Group_<name>。 - 白名单不需要写
Interface:。
8. 代理服务管理
接口总览
| 方法 | 路径 | 说明 |
|---|---|---|
GET | /proxy-services/quota | 查询代理服务配额 |
GET | /proxy-services | 获取代理服务列表 |
POST | /proxy-services | 创建代理服务 |
PUT | /proxy-services/{id} | 编辑代理服务 |
PATCH | /proxy-services/{id}/status | 启用或停用代理服务 |
DELETE | /proxy-services/{id} | 删除代理服务 |
DELETE | /proxy-services/batch | 批量删除代理服务 |
PATCH | /proxy-services/batch/status | 批量启用或停用代理服务 |
POST | /proxy-services/import | 批量导入代理服务 |
GET /proxy-services/quota
{
"quota": 10,
"used": 1
}说明:
quota是当前可用代理服务总数。used是已创建的代理服务数量。
GET /proxy-services
{
"data": [
{
"id": 1,
"name": "wan1-http",
"outbound_interface": "wan1",
"port": 20001,
"username": "user",
"password": "pass",
"is_enabled": true,
"created_at": "2026-05-18T10:00:00Z"
}
]
}POST /proxy-services
{
"name": "wan1-http",
"outbound_interface": "wan1",
"port": 20001,
"username": "user",
"password": "pass",
"is_enabled": true
}响应:
{ "msg": "proxy service added", "id": 1 }PUT /proxy-services/{id}
{
"name": "wan1-http",
"outbound_interface": "wan1",
"port": 20001,
"username": "user",
"password": "new-pass",
"is_enabled": true
}响应:
{ "msg": "proxy service updated", "id": 1 }PATCH /proxy-services/{id}/status
{
"is_enabled": false
}响应:
{
"msg": "proxy service status updated",
"id": 1,
"is_enabled": false
}DELETE /proxy-services/{id}
{ "msg": "proxy service deleted", "id": 1 }DELETE /proxy-services/batch
{
"ids": [1, 2, 3]
}响应:
{ "msg": "deleted 3 proxy services", "deleted": 3 }PATCH /proxy-services/batch/status
{
"ids": [1, 2, 3],
"is_enabled": true
}响应:
{ "msg": "updated 3 proxy services", "updated": 3 }POST /proxy-services/import
{
"text": "wan1-http,wan1,20001,user,pass\nwan2-http,wan2,20002,user,pass",
"replace": false
}支持的行格式:
| 字段数 | 格式 |
|---|---|
| 5 | name,outbound_interface,port,username,password |
| 4 | outbound_interface,port,username,password |
| 3 | outbound_interface,port,username |
| 2 | outbound_interface,port |
说明:
outbound_interface使用裸接口名,不加Interface:。replace=true时会先清空现有代理服务。
响应:
{ "msg": "imported 2, skipped 0", "imported": 2, "skipped": 0 }9. 推荐调用流程
9.1 查询状态和可用接口
GET /system/statusGET /system/interfaces- 如需带 IP 信息,再调用
GET /system/interfaces-with-ip
9.2 添加节点并建立分流
POST /nodesGET /nodes/delay?name=<节点名>POST /rules,target_node填节点名、Group_<name>、DIRECT、REJECT或Interface:<ifname>
9.3 创建或管理 L2TP / PPTP 线路
POST /vpn-linesGET /vpn-lines查看is_enabled和is_onlinePATCH /vpn-lines/status启停线路- 需要改名或改参数时,调用
PUT /vpn-lines/{type}/{name}
9.4 绑定代理服务出口
GET /proxy-services/quotaGET /system/interfaces-with-ipPOST /proxy-services
9.5 批量导入
POST /nodes/importPOST /vpn-lines/importPOST /rules/importPOST /proxy-services/import
10. 兼容性说明
- 本文档中展示的路径省略了统一前缀
/soloip/api/v1。 - 规则里的
Group_和Interface:是稳定写法;请按本文档写完整前缀。 - 代理服务里的
outbound_interface不要加Interface:。 - L2TP/PPTP 线路的
is_online可以用于判断连接成功,但不等同于详细拨号日志。 - 所有新增、编辑、批量修改接口都以 JSON 请求体为准。
- 文档示例中的时间字段均为 ISO 8601 格式。
