Download OpenAPI specification:
来源于 ikuai-doc/openapi_specs/route/。
为避免 Redoc 单页一次性加载全部 API 导致浏览器 heap 过高,部署版按分类拆分。
获取当前配置的所有静态路由策略列表。 支持分页、过滤和排序功能。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
| order | string Default: "asc" Enum: "asc" "desc" Example: order=asc 排序方向,asc为升序(默认),desc为降序 |
| order_by | string Default: "id" Example: order_by=id 排序字段,支持id、tagname、interface、prio等字段 |
| filter | string Example: filter=enabled==yes 过滤条件,支持精确匹配和多条件组合。 支持的操作符:
多条件连接语法:
使用示例:
|
{- "message": "Success",
- "results": {
- "total": 25,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "route_to_lan",
- "comment": "",
- "interface": "wan1",
- "dst_addr": "192.168.2.0",
- "netmask": "255.255.255.0",
- "gateway": "192.168.1.1",
- "gateway_int": 3232235777,
- "prio": 1,
- "ip_type": "4",
- "dst_addr_int": 3232235520
}
]
}
}创建新的静态路由策略。需要指定目标地址、网关、接口等路由信息。 支持IPv4和IPv6地址类型。
静态路由配置数据
| enabled required | string Default: "yes" Enum: "yes" "no" 策略状态,yes为启用(默认),no为停用 |
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| comment | string <= 64 characters Default: "" 备注信息,最多64个字符,不支持特殊字符 |
| interface required | string Default: "auto" 路由接口,auto为自动选择 |
| dst_addr required | string 目的地址 |
| netmask required | string 网络掩码 |
| gateway | string 网关地址 |
| prio required | integer [ 1 .. 99 ] Default: 1 优先级(1-99,数值越小优先级越高) |
| ip_type required | string Default: "4" Enum: "4" "6" IP类型,4为IPv4(默认),6为IPv6 |
{- "enabled": "yes",
- "tagname": "route_to_lan",
- "comment": "路由到内网段",
- "interface": "lan1",
- "dst_addr": "192.168.2.0",
- "netmask": "255.255.255.0",
- "gateway": "192.168.1.1",
- "prio": 1,
- "ip_type": "4"
}{- "code": 0,
- "message": "Success",
- "rowid": 1
}获取指定ID的静态路由策略详细信息
| id required | integer <int64> >= 1 Example: 1 静态路由策略ID |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "route_to_lan",
- "comment": "",
- "interface": "wan1",
- "dst_addr": "192.168.2.0",
- "netmask": "255.255.255.0",
- "gateway": "192.168.1.1",
- "gateway_int": 3232235777,
- "prio": 1,
- "ip_type": "4",
- "dst_addr_int": 3232235520
}
]
}
}完全更新指定ID的静态路由策略
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 静态路由策略ID |
静态路由配置数据
| enabled required | string Default: "yes" Enum: "yes" "no" 策略状态,yes为启用(默认),no为停用 |
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| comment required | string <= 64 characters Default: "" 备注信息,最多64个字符,不支持特殊字符 |
| interface required | string Default: "auto" 路由接口,auto为自动选择 |
| dst_addr required | string 目的地址 |
| netmask required | string 网络掩码 |
| gateway required | string 网关地址 |
| prio required | integer [ 1 .. 99 ] Default: 1 优先级(1-99,数值越小优先级越高) |
| ip_type required | string Default: "4" Enum: "4" "6" IP类型,4为IPv4(默认),6为IPv6 |
{- "enabled": "yes",
- "tagname": "route_to_lan",
- "comment": "",
- "interface": "wan1",
- "dst_addr": "192.168.2.0",
- "netmask": "255.255.255.0",
- "gateway": "192.168.1.1",
- "prio": 1,
- "ip_type": "4"
}{- "code": 0,
- "message": "Success"
}启用或停用指定ID的静态路由策略
| id required | integer <int64> >= 1 Example: 1 静态路由策略ID |
策略状态更新数据
| enabled required | string Enum: "yes" "no" 策略启用状态,yes为启用,no为停用 |
{- "enabled": "no"
}{- "code": 0,
- "message": "Success"
}获取当前配置的所有域名分流策略列表。 支持分页、过滤和排序功能。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
| order | string Default: "asc" Enum: "asc" "desc" Example: order=asc 排序方向,asc为升序(默认),desc为降序 |
| order_by | string Default: "id" Example: order_by=id 排序字段,支持id、tagname、interface、prio等字段 |
| filter | string Example: filter=enabled==yes 过滤条件,支持精确匹配和多条件组合。 支持的操作符:
多条件连接语法:
使用示例:
|
{- "code": 0,
- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "1123",
- "comment": "",
- "interface": "wan1",
- "prio": 31,
- "domain": {
- "object": { },
- "custom": [
- "www.baidu.com"
]
}, - "time": {
- "object": { },
- "custom": [
- {
- "comment": "",
- "end_time": "23:59",
- "start_time": "00:00",
- "type": "weekly",
- "weekdays": "1234567"
}
]
}, - "src_addr": {
- "object": { },
- "custom": { }
}
}
]
}
}创建新的域名分流策略。支持基于域名的流量分流到指定接口。 可配置源地址、域名列表、生效时间等复杂条件。
域名分流策略配置数据
| enabled required | string Default: "yes" Enum: "yes" "no" 规则状态,yes为启用(默认),no为停用 |
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| comment | string <= 64 characters Default: "" 备注信息,最多64个字符 |
required | object (route_network_stream_domain_DomainObjectInput) 域名对象输入 |
| interface required | string 线路接口 |
| prio required | integer [ 0 .. 63 ] Default: 31 优先级(0-63,0最高) |
object (route_network_stream_domain_SrcAddrObjectInput) 源地址对象输入 | |
object (route_network_stream_domain_TimeObjectInput) 生效时间对象输入 |
{- "enabled": "yes",
- "tagname": "domain_rule_1",
- "comment": "",
- "domain": {
- "custom": [
- "www.baidu.com"
], - "object": [
- {
- "type": 6,
- "gp_name": "search",
- "gid": "DOMAIN1"
}
]
}, - "interface": "wan2",
- "prio": 31,
- "src_addr": {
- "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:1e"
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}, - {
- "type": 2,
- "gp_name": "22",
- "gid": "MACIP1"
}
]
}, - "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 4,
- "gp_name": "11",
- "gid": "TIMEGP1"
}
]
}
}{- "code": 0,
- "message": "success",
- "rowid": 1
}获取指定ID的域名分流策略详细信息
| id required | integer <int64> >= 1 域名分流策略ID |
{- "code": 0,
- "message": "Success",
- "results": {
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "test33",
- "domain": {
- "custom": [
- "www.baidu.com"
]
}, - "interface": "wan2",
- "prio": 31,
- "src_addr": {
- "object": [
- {
- "gp_name": "11",
- "gid": "GPIP1",
- "type": 0
}
], - "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:1e"
]
}, - "comment": "",
- "time": {
- "object": [
- {
- "gp_name": "11",
- "gid": "GPIP1",
- "type": 4
}
], - "custom": [
- {
- "start_time": "00:00",
- "weekdays": "1234567",
- "end_time": "20:00",
- "comment": "test11",
- "type": "weekly"
}
]
}
}
], - "total": 1
}
}完全更新指定ID的域名分流策略
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 域名分流策略ID |
域名分流策略配置数据
| enabled required | string Default: "yes" Enum: "yes" "no" 规则状态,yes为启用(默认),no为停用 |
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| comment | string <= 64 characters Default: "" 备注信息,最多64个字符 |
required | object (route_network_stream_domain_DomainObjectInput) 域名对象输入 |
| interface required | string 线路接口 |
| prio required | integer [ 0 .. 63 ] Default: 31 优先级(0-63,0最高) |
object (route_network_stream_domain_SrcAddrObjectInput) 源地址对象输入 | |
object (route_network_stream_domain_TimeObjectInput) 生效时间对象输入 |
{- "enabled": "yes",
- "tagname": "domain_rule_1",
- "comment": "",
- "domain": {
- "custom": [
- "www.baidu.com"
]
}, - "interface": "wan2",
- "prio": 31,
- "src_addr": {
- "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:1e"
], - "object": [
- {
- "type": 0,
- "gp_name": "iKuai-Group",
- "gid": "GPIP1"
}, - {
- "type": 2,
- "gp_name": "iKuai-Mac",
- "gid": "MACIP1"
}
]
}, - "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 4,
- "gp_name": "iKuai-TimeGroup",
- "gid": "TIMEGP1"
}
]
}
}{- "code": 0,
- "message": "success"
}启用或停用指定ID的域名分流策略
| id required | integer <int64> >= 1 域名分流策略ID |
策略状态更新数据
| enabled required | string Enum: "yes" "no" 策略启用状态,yes为启用,no为停用 |
{- "enabled": "no"
}{- "code": 0,
- "message": "success"
}获取当前配置的所有端口分流策略列表。 支持分页、过滤和排序功能。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
| order | string Default: "asc" Enum: "asc" "desc" Example: order=asc 排序方向,asc为升序(默认),desc为降序 |
| order_by | string Default: "id" Example: order_by=id 排序字段,支持id、tagname、interface、prio等字段 |
| filter | string Example: filter=enabled==yes 过滤条件,支持精确匹配和多条件组合。 支持的操作符:
多条件连接语法:
使用示例:
|
{- "message": "success",
- "results": {
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "10",
- "comment": "",
- "type": 0,
- "nexthop": "",
- "interface": "wan2",
- "mode": 0,
- "prio": 31,
- "src_addr": {
- "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:6e"
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "dst_addr": { },
- "protocol": "tcp",
- "src_port": { },
- "dst_port": { },
- "dst_type": 0,
- "area_code": "",
- "iface_band": 0,
- "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}
}
], - "total": 1
}
}创建新的端口分流策略。支持基于五元组(源地址、目的地址、协议、源端口、目的端口)的流量分流。 可配置wan转发或lan转发,支持负载均衡和地区分流。
端口分流策略配置数据
| enabled required | string Default: "yes" Enum: "yes" "no" 规则状态,yes为启用(默认),no为停用 |
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| comment | string <= 64 characters Default: "" 备注信息,最多64个字符 |
| type required | integer Default: 0 Enum: 0 1 转发方式,0:wan转发(默认), 1:lan转发 |
| nexthop | string Default: "" 下一跳路由网关(lan转发生效) |
| interface required | string 路由接口(wan转发生效) |
| mode required | integer Default: 0 Enum: 0 1 2 3 4 6 负载均衡方式 0: 新建连接 1:sip 2:sip+sport 3:sip+dip 4:sip+dip+dport 5:sip+sport+dip+dport 6:主备模式 |
| prio required | integer [ 0 .. 63 ] Default: 31 优先级(0-63,0最高) |
required | object (route_network_stream_ipport_SrcAddrObjectInput) 源地址对象输入 |
| dst_addr required | object (route_network_stream_ipport_DstAddrObjectInput) 目的地址对象输入 |
| protocol required | string Enum: "any" "tcp" "udp" "tcp+udp" "icmp" 协议类型 |
| src_port required | object (route_network_stream_ipport_PortObjectInput) 端口对象输入 |
| dst_port required | object (route_network_stream_ipport_PortObjectInput) 端口对象输入 |
| dst_type | integer Default: 0 Enum: 0 1 目的类型,0:目的地址(默认), 1:目的地区 |
| area_code | string Default: "" 地区代码 |
| iface_band required | integer Default: 0 Enum: 0 1 是否绑定接口,0:不绑定(默认), 1:绑定 |
required | object (route_network_stream_ipport_TimeObjectInput) 生效时间对象输入 |
| src_addr_inv required | integer Default: 0 Enum: 0 1 源地址取反,0:不取反(默认),1:取反 |
| dst_addr_inv required | integer Default: 0 Enum: 0 1 目的地址取反,0:不取反(默认),1:取反 |
{- "enabled": "yes",
- "tagname": "port_rule_1",
- "type": 0,
- "interface": "wan2",
- "protocol": "tcp",
- "prio": 31,
- "mode": 0,
- "src_addr": {
- "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:6e"
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 4,
- "gp_name": "11",
- "gid": "TIMEGP1"
}
]
}
}{- "code": 0,
- "message": "Success",
- "rowid": 1
}获取指定ID的端口分流策略详细信息
| id required | integer <int64> >= 1 端口分流策略ID |
{- "message": "success",
- "data": {
- "id": 1,
- "enabled": "yes",
- "tagname": "10",
- "comment": "",
- "type": 0,
- "nexthop": "",
- "interface": "wan2",
- "mode": 0,
- "prio": 31,
- "src_addr": {
- "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:6e"
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "dst_addr": { },
- "protocol": "tcp",
- "src_port": { },
- "dst_port": { },
- "dst_type": 0,
- "area_code": "",
- "iface_band": 0,
- "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}
}
}完全更新指定ID的端口分流策略
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 端口分流策略ID |
端口分流策略配置数据
| enabled required | string Default: "yes" Enum: "yes" "no" 规则状态,yes为启用(默认),no为停用 |
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| comment | string <= 64 characters Default: "" 备注信息,最多64个字符 |
| type required | integer Default: 0 Enum: 0 1 转发方式,0:wan转发(默认), 1:lan转发 |
| nexthop | string Default: "" 下一跳路由网关(lan转发生效) |
| interface required | string 路由接口(wan转发生效) |
| mode required | integer Default: 0 Enum: 0 1 2 3 4 6 负载均衡方式 0: 新建连接 1:sip 2:sip+sport 3:sip+dip 4:sip+dip+dport 5:sip+sport+dip+dport 6:主备模式 |
| prio required | integer [ 0 .. 63 ] Default: 31 优先级(0-63,0最高) |
required | object (route_network_stream_ipport_SrcAddrObjectInput) 源地址对象输入 |
| dst_addr required | object (route_network_stream_ipport_DstAddrObjectInput) 目的地址对象输入 |
| protocol required | string Enum: "any" "tcp" "udp" "tcp+udp" "icmp" 协议类型 |
| src_port required | object (route_network_stream_ipport_PortObjectInput) 端口对象输入 |
| dst_port required | object (route_network_stream_ipport_PortObjectInput) 端口对象输入 |
| dst_type | integer Default: 0 Enum: 0 1 目的类型,0:目的地址(默认), 1:目的地区 |
| area_code | string Default: "" 地区代码 |
| iface_band required | integer Default: 0 Enum: 0 1 是否绑定接口,0:不绑定(默认), 1:绑定 |
required | object (route_network_stream_ipport_TimeObjectInput) 生效时间对象输入 |
| src_addr_inv required | integer Default: 0 Enum: 0 1 源地址取反,0:不取反(默认),1:取反 |
| dst_addr_inv required | integer Default: 0 Enum: 0 1 目的地址取反,0:不取反(默认),1:取反 |
{- "enabled": "yes",
- "tagname": "port_rule_1",
- "comment": "",
- "type": 0,
- "nexthop": "",
- "interface": "wan2",
- "protocol": "tcp",
- "prio": 31,
- "mode": 0,
- "iface_band": 0,
- "src_addr_inv": 0,
- "dst_addr_inv": 0,
- "src_addr": {
- "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:6e"
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "dst_addr": { },
- "src_port": { },
- "dst_port": { },
- "dst_type": 0,
- "area_code": "",
- "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 4,
- "gp_name": "11",
- "gid": "TIMEGP1"
}
]
}
}{- "code": 0,
- "message": "success"
}启用或停用指定ID的端口分流策略
| id required | integer <int64> >= 1 端口分流策略ID |
策略状态更新数据
| enabled required | string Enum: "yes" "no" 策略启用状态,yes为启用,no为停用 |
{- "enabled": "no"
}{- "code": 0,
- "message": "success"
}获取当前配置的所有协议分流策略列表。 支持分页、过滤和排序功能。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
| order | string Default: "asc" Enum: "asc" "desc" Example: order=asc 排序方向,asc为升序(默认),desc为降序 |
| order_by | string Default: "id" Example: order_by=id 排序字段,支持id、tagname、interface、prio等字段 |
| filter | string Example: filter=enabled==yes 过滤条件,支持精确匹配和多条件组合。 支持的操作符:
多条件连接语法:
使用示例:
|
{- "message": "Success",
- "results": {
- "total": 25,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "test3",
- "comment": "",
- "interface": "wan2",
- "mode": 0,
- "prio": 1,
- "src_addr": {
- "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:1e"
], - "object": [
- {
- "type": 4,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "app_proto": {
- "custom": [
- "其它HTTP",
- "文件传输",
- "DNS",
- "Baidu"
]
}, - "iface_band": 0,
- "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 4,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}
}
]
}
}创建新的协议分流策略。支持基于应用协议的流量分流到指定接口。 可配置源地址、应用协议列表、生效时间等复杂条件。
协议分流策略配置数据
| enabled required | string Default: "yes" Enum: "yes" "no" 规则状态,yes为启用(默认),no为停用 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| comment | string <= 64 characters Default: "" 备注信息,最多64个字符 |
| interface required | string 线路接口 |
| mode required | integer Default: 0 Enum: 0 1 3 负载方式 0: 新建连接 1:sip 3:sip+dip |
| prio required | integer [ 0 .. 63 ] 优先级(0-63,0最高) |
object (route_network_stream_l7_SrcAddrObjectInput) 源地址对象输入 | |
required | object (route_network_stream_l7_AppProtoObjectInput) 应用协议对象输入 |
| iface_band required | integer Default: 0 Enum: 0 1 是否绑定接口,0:不绑定(默认), 1:绑定 |
object (route_network_stream_l7_TimeObjectInput) 生效时间对象输入 |
{- "enabled": "yes",
- "tagname": "test3",
- "comment": "",
- "interface": "wan2",
- "mode": 0,
- "prio": 1,
- "iface_band": 0,
- "src_addr": {
- "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:1e"
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "app_proto": {
- "custom": [
- "其它HTTP",
- "文件传输",
- "DNS",
- "Baidu"
]
}, - "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 4,
- "gp_name": "11",
- "gid": "TIMEGP1"
}
]
}
}{- "code": 0,
- "message": "success",
- "rowid": 1
}获取指定ID的协议分流策略详细信息
| id required | integer <int64> >= 1 Example: 1 协议分流策略ID |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "test3",
- "comment": "",
- "interface": "wan2",
- "mode": 0,
- "prio": 1,
- "src_addr": {
- "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:1e"
], - "object": [
- {
- "type": 4,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "app_proto": {
- "custom": [
- "其它HTTP",
- "文件传输",
- "DNS",
- "Baidu"
]
}, - "iface_band": 0,
- "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 4,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}
}
]
}
}完全更新指定ID的协议分流策略
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 协议分流策略ID |
协议分流策略配置数据
| enabled required | string Default: "yes" Enum: "yes" "no" 规则状态,yes为启用(默认),no为停用 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| comment | string <= 64 characters Default: "" 备注信息,最多64个字符 |
| interface required | string 线路接口 |
| mode required | integer Default: 0 Enum: 0 1 3 负载方式 0: 新建连接 1:sip 3:sip+dip |
| prio required | integer [ 0 .. 63 ] 优先级(0-63,0最高) |
object (route_network_stream_l7_SrcAddrObjectInput) 源地址对象输入 | |
required | object (route_network_stream_l7_AppProtoObjectInput) 应用协议对象输入 |
| iface_band required | integer Default: 0 Enum: 0 1 是否绑定接口,0:不绑定(默认), 1:绑定 |
object (route_network_stream_l7_TimeObjectInput) 生效时间对象输入 |
{- "enabled": "yes",
- "tagname": "test3",
- "comment": "",
- "interface": "wan2",
- "mode": 0,
- "prio": 1,
- "iface_band": 0,
- "src_addr": {
- "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:1e"
], - "object": [
- {
- "type": 0,
- "gp_name": "iKuai-Group",
- "gid": "GPIP1"
}
]
}, - "app_proto": {
- "custom": [
- "其它HTTP",
- "文件传输",
- "DNS",
- "Baidu"
]
}, - "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 4,
- "gp_name": "iKuai-TimeGroup",
- "gid": "TIMEGP1"
}
]
}
}{- "code": 0,
- "message": "success"
}启用或停用指定ID的协议分流策略
| id required | integer <int64> >= 1 Example: 1 协议分流策略ID |
策略状态更新数据
| enabled required | string Enum: "yes" "no" 策略启用状态,yes为启用,no为停用 |
{- "enabled": "no"
}{- "code": 0,
- "message": "success"
}获取当前配置的所有多线负载分流策略列表。 支持分页、过滤和排序功能。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
| order | string Default: "asc" Enum: "asc" "desc" Example: order=asc 排序方向,asc为升序(默认),desc为降序 |
| order_by | string Default: "id" Example: order_by=id 排序字段,支持id、tagname、interface、mode等字段 |
| filter | string Example: filter=enabled==yes 过滤条件,支持精确匹配和多条件组合。 支持的操作符:
多条件连接语法:
使用示例:
|
{- "message": "Success",
- "results": {
- "total": 25,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "11",
- "comment": "111",
- "interface": "wan2",
- "weight": "1",
- "mode": 0,
- "isp_name": "all"
}
]
}
}创建新的多线负载分流策略。支持多种负载均衡模式和线路权重配置。 可配置不同的运营商线路和负载权重。
多线负载分流策略配置数据
| enabled required | string Default: "yes" Enum: "yes" "no" 规则状态,yes为启用(默认),no为停用 |
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| comment | string <= 64 characters Default: "" 备注信息,最多64个字符 |
| interface required | string 线路名称 |
| weight required | string^([1-9]|10)$ Default: "1" 负载比重(1-10) |
| mode required | integer Enum: 0 1 2 3 4 6 7 负载模式(0:源IP+目的IP+目的端口,1:源IP+目的IP,2:新建连接数,3:实时流量,4:实时连接数,6:源IP,7:源IP+源端口) |
| isp_name required | string Default: "" 运营商名称,内置值:all(全部)、chinatelecom(电信)、chinaunicom(联通)、chinamobile(移动)、chinacernet(教育网),或自定义运营商名称 |
{- "mode": 0,
- "comment": "111",
- "isp_name": "all",
- "interface": "wan2",
- "weight": "1",
- "enabled": "yes",
- "tagname": "11"
}{- "code": 0,
- "message": "success",
- "rowid": 1
}获取指定ID的多线负载分流策略详细信息
| id required | integer <int64> >= 1 Example: 1 多线负载分流策略ID |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "11",
- "comment": "111",
- "interface": "wan2",
- "weight": "1",
- "mode": 0,
- "isp_name": "all"
}
]
}
}完全更新指定ID的多线负载分流策略
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 多线负载分流策略ID |
多线负载分流策略配置数据
| enabled required | string Default: "yes" Enum: "yes" "no" 规则状态,yes为启用(默认),no为停用 |
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| comment | string <= 64 characters Default: "" 备注信息,最多64个字符 |
| interface required | string 线路名称 |
| weight required | string^([1-9]|10)$ Default: "1" 负载比重(1-10) |
| mode required | integer Enum: 0 1 2 3 4 6 7 负载模式(0:源IP+目的IP+目的端口,1:源IP+目的IP,2:新建连接数,3:实时流量,4:实时连接数,6:源IP,7:源IP+源端口) |
| isp_name required | string Default: "" 运营商名称,内置值:all(全部)、chinatelecom(电信)、chinaunicom(联通)、chinamobile(移动)、chinacernet(教育网),或自定义运营商名称 |
{- "enabled": "yes",
- "tagname": "11",
- "comment": "111",
- "interface": "wan2",
- "weight": "1",
- "mode": 0,
- "isp_name": "all"
}{- "code": 0,
- "message": "success"
}启用或停用指定ID的多线负载分流策略
| id required | integer <int64> >= 1 Example: 1 多线负载分流策略ID |
策略状态更新数据
| enabled required | string Enum: "yes" "no" 策略启用状态,yes为启用,no为停用 |
{- "enabled": "no"
}{- "code": 0,
- "message": "success"
}获取当前配置的所有上下行分离策略列表。 支持分页、过滤和排序功能。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
| order | string Default: "asc" Enum: "asc" "desc" Example: order=asc 排序方向,asc为升序(默认),desc为降序 |
| order_by | string Default: "id" Example: order_by=id 排序字段,支持id、tagname、upiface、downiface等字段 |
| filter | string Example: filter=enabled==yes 过滤条件,支持精确匹配和多条件组合。 支持的操作符:
多条件连接语法:
使用示例:
|
{- "message": "success",
- "results": {
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "iKuai-UpDown",
- "comment": "iKuai备注",
- "upiface": "wan1",
- "downiface": "wan2",
- "src_addr": {
- "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:6e"
], - "object": [
- {
- "type": 0,
- "gp_name": "iKuai-Group",
- "gid": "GPIP1"
}
]
}, - "dst_addr": {
- "custom": [
- "10.0.0.1"
], - "object": [
- {
- "type": 0,
- "gp_name": "iKuai-Group",
- "gid": "GPIP1"
}
]
}, - "protocol": "tcp",
- "src_port": {
- "custom": [
- "80",
- "443",
- "8080"
], - "object": [
- {
- "type": 0,
- "gp_name": "iKuai-Group",
- "gid": "GPIP1"
}
]
}, - "dst_port": {
- "custom": [
- "80",
- "443",
- "8080"
], - "object": [
- {
- "type": 0,
- "gp_name": "iKuai-Group",
- "gid": "GPIP1"
}
]
}
}
], - "total": 1
}
}创建新的上下行分离策略。支持基于五元组(源地址、目的地址、协议、源端口、目的端口)的流量分离。 可配置上行接口和下行接口,实现流量的上下行分离。
上下行分离策略配置数据
| enabled required | string Enum: "yes" "no" 规则状态,yes为启用,no为停用 |
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| comment | string <= 64 characters Default: "" 备注信息,最多64个字符,不支持特殊字符 |
| upiface required | string 上行接口(WAN口) |
| downiface required | string 下行接口(WAN口) |
object (route_network_stream_updown_SrcAddrObjectInput) 源地址对象输入 | |
object (route_network_stream_updown_DstAddrObjectInput) 目的地址对象输入 | |
| protocol | string Default: "any" Enum: "any" "tcp" "udp" "tcp+udp" "icmp" 协议类型 |
object (route_network_stream_updown_PortObjectInput) 端口对象输入 | |
object (route_network_stream_updown_PortObjectInput) 端口对象输入 |
{- "enabled": "yes",
- "tagname": "iKuai-UpDown",
- "upiface": "wan1",
- "downiface": "wan2",
- "protocol": "tcp",
- "src_addr": {
- "custom": [
- "192.168.9.169"
], - "object": [
- {
- "type": 0,
- "gp_name": "iKuai-Group",
- "gid": "GPIP1"
}
]
}
}{- "code": 0,
- "message": "success",
- "rowid": 1
}获取指定ID的上下行分离策略详细信息
| id required | integer <int64> >= 1 上下行分离策略ID |
{- "message": "success",
- "data": {
- "id": 1,
- "enabled": "yes",
- "tagname": "iKuai-UpDown",
- "comment": "iKuai备注",
- "upiface": "wan1",
- "downiface": "wan2",
- "src_addr": {
- "custom": [
- "192.168.9.169",
- "08:9b:4b:00:10:6e"
], - "object": [
- {
- "type": 0,
- "gp_name": "iKuai-Group",
- "gid": "GPIP1"
}
]
}, - "dst_addr": {
- "custom": [
- "10.0.0.1"
], - "object": [
- {
- "type": 0,
- "gp_name": "iKuai-Group",
- "gid": "GPIP1"
}
]
}, - "protocol": "tcp",
- "src_port": {
- "custom": [
- "80",
- "443",
- "8080"
], - "object": [
- {
- "type": 0,
- "gp_name": "iKuai-Group",
- "gid": "GPIP1"
}
]
}, - "dst_port": {
- "custom": [
- "80",
- "443",
- "8080"
], - "object": [
- {
- "type": 0,
- "gp_name": "iKuai-Group",
- "gid": "GPIP1"
}
]
}
}
}完全更新指定ID的上下行分离策略
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 上下行分离策略ID |
上下行分离策略配置数据
| enabled required | string Enum: "yes" "no" 规则状态,yes为启用,no为停用 |
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| comment | string <= 64 characters Default: "" 备注信息,最多64个字符,不支持特殊字符 |
| upiface required | string 上行接口(WAN口) |
| downiface required | string 下行接口(WAN口) |
object (route_network_stream_updown_SrcAddrObjectInput) 源地址对象输入 | |
object (route_network_stream_updown_DstAddrObjectInput) 目的地址对象输入 | |
| protocol | string Default: "any" Enum: "any" "tcp" "udp" "tcp+udp" "icmp" 协议类型 |
object (route_network_stream_updown_PortObjectInput) 端口对象输入 | |
object (route_network_stream_updown_PortObjectInput) 端口对象输入 |
{- "enabled": "yes",
- "tagname": "iKuai-UpDown",
- "comment": "",
- "upiface": "wan1",
- "downiface": "wan2",
- "protocol": "tcp",
- "src_addr": {
- "custom": [
- "192.168.9.169"
], - "object": [
- {
- "type": 0,
- "gp_name": "iKuai-Group",
- "gid": "GPIP1"
}
]
}, - "src_port": {
- "custom": [
- "80",
- "443"
], - "object": [
- {
- "type": 3,
- "gp_name": "iKuai-PortGroup",
- "gid": "PORTGP1"
}
]
}, - "dst_port": {
- "custom": [
- "8080"
], - "object": [
- {
- "type": 3,
- "gp_name": "iKuai-DstPort",
- "gid": "PORTGP2"
}
]
}
}{- "code": 0,
- "message": "success"
}启用或停用指定ID的上下行分离策略
| id required | integer <int64> >= 1 上下行分离策略ID |
策略状态更新数据
| enabled required | string Enum: "yes" "no" 策略启用状态,yes为启用,no为停用 |
{- "enabled": "no"
}{- "code": 0,
- "message": "success"
}