Download OpenAPI specification:
来源于 ikuai-doc/openapi_specs/network/。
为避免 Redoc 单页一次性加载全部 API 导致浏览器 heap 过高,部署版按分类拆分。
获取所有高级自定义协议列表。 支持分页功能。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "comment": "test",
- "rule": "UHJvdG9jb2w9SFRUUA==",
- "name": "test",
- "class": 2,
- "appid": 2910001
}
]
}
}创建新的高级自定义协议策略。 支持选择协议分类和自定义语法规则(Base64编码)。
高级自定义协议配置数据
| enabled required | string Enum: "yes" "no" 规则状态(启用/禁用) |
| comment | string 备注信息,最多64个字符,不支持特殊字符 |
| name required | string [ 1 .. 15 ] characters ^[\u4e00-\u9fa5a-zA-Z0-9]+$ 协议名称(仅支持中文、英文、数字,长度限制1-15字符) |
| class required | integer [ 0 .. 8 ] 协议分类(0-8):
|
| rule required | string 语法规则(Base64编码) |
{- "class": "0",
- "comment": "aa",
- "name": "aa",
- "rule": "UHJvdG9jb2w9SFRUUA==",
- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}根据ID获取单个高级自定义协议策略的详细信息。 需要提供有效的策略ID。
| id required | integer <int64> >= 1 Example: 1 高级自定义协议ID |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "comment": "test",
- "rule": "UHJvdG9jb2w9SFRUUA==",
- "name": "test",
- "class": 2,
- "appid": 2910001
}
]
}
}完全更新指定高级自定义协议策略的配置信息。 需要提供所有字段。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 高级自定义协议ID |
完整的高级自定义协议配置数据
| enabled required | string Enum: "yes" "no" 规则状态(启用/禁用) |
| comment required | string 备注信息,最多64个字符,不支持特殊字符 |
| name required | string [ 1 .. 15 ] characters ^[\u4e00-\u9fa5a-zA-Z0-9]+$ 协议名称(仅支持中文、英文、数字,长度限制1-15字符) |
| class required | integer [ 0 .. 8 ] 协议分类(0-8):
|
| appid required | integer 应用ID(由系统根据协议名和分类自动生成,需从查询接口获取后传入) |
| rule required | string 语法规则(Base64编码) |
{- "class": 0,
- "appid": 2910001,
- "comment": "updated",
- "name": "aa",
- "rule": "UHJvdG9jb2w9SFRUUA==",
- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}部分更新指定高级自定义协议策略。 主要用于启用/停用状态切换。
| id required | integer <int64> >= 1 Example: 1 高级自定义协议ID |
部分更新数据(如启用状态)
| enabled required | string Enum: "yes" "no" 启用状态 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}设置DHCP访问控制的工作模式。 可以在黑名单模式和白名单模式之间切换。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
访问控制模式配置
| mode required | integer Enum: 0 1 2 访问控制模式,0:黑名单模式 1:白名单模式 2:同步安全中心MAC访问控制 |
{- "mode": 0
}{- "code": 0,
- "message": "Success"
}获取当前配置的所有DHCP访问控制规则列表。 根据当前模式,这些规则可能是黑名单或白名单。 支持分页、过滤和排序功能。
| 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、mac、tagname等字段 |
| filter | string Example: filter=enabled==yes 过滤条件,支持精确匹配和多条件组合。 支持的操作符:
多条件连接语法:
使用示例:
|
{- "code": 0,
- "message": "Success",
- "results": {
- "total": 2,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "test001",
- "mac": "11:22:33:44:55:66",
- "ip_type": "4",
- "comment": "test001"
}, - {
- "id": 2,
- "enabled": "yes",
- "tagname": "test007",
- "mac": "11:22:33:44:55:67",
- "ip_type": "4",
- "comment": "test007-comment"
}
]
}
}添加新的DHCP访问控制规则。 根据当前模式,该规则将被添加到黑名单或白名单中。 enabled、mac、tagname 为必需字段,comment 可选。
访问控制规则配置数据
| enabled required | string Enum: "yes" "no" 规则启用状态,yes为启用,no为停用 |
| mac required | string^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ MAC地址 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| comment | string <= 64 characters 备注信息,最多64个字符,不支持特殊字符 |
{- "enabled": "yes",
- "mac": "11:22:33:44:55:68",
- "tagname": "test008"
}{- "code": 0,
- "message": "Success",
- "rowid": 3
}根据规则ID获取单个DHCP访问控制规则的详细信息。 需要提供有效的规则ID。
| id required | integer <int64> >= 1 Example: 1 访问控制规则ID |
{- "code": 0,
- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "mac": "11:22:33:44:55:66",
- "ip_type": "4",
- "tagname": "test001",
- "comment": "test001"
}
]
}
}完全更新现有的DHCP访问控制规则配置。 需要提供所有字段。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 访问控制规则ID |
完整的访问控制规则配置数据
| enabled required | string Enum: "yes" "no" 规则启用状态,yes为启用,no为停用 |
| mac required | string^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ MAC地址 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| comment required | string <= 64 characters 备注信息,最多64个字符,不支持特殊字符 |
{- "enabled": "yes",
- "mac": "11:22:33:44:55:68",
- "tagname": "test008",
- "comment": "test008-comment"
}{- "code": 0,
- "message": "Success"
}部分更新现有的DHCP访问控制规则配置。 主要用于启用/停用规则状态。
| id required | integer <int64> >= 1 Example: 1 访问控制规则ID |
部分更新数据(如启用状态)
| enabled required | string Enum: "yes" "no" 规则启用状态 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}获取当前通过DHCPv4服务器分配IP地址的所有客户端信息。 支持分页、过滤和排序功能。
| 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、interface、mac、ip_addr、start_time等字段 |
| filter | string Example: filter=interface==lan1 过滤条件,支持精确匹配和多条件组合。 支持的操作符:
多条件连接语法:
使用示例:
|
{- "code": 0,
- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "mac": "7a:38:7a:39:95:71",
- "start_time": 1767087726,
- "end_time": 1767094926,
- "timeout": 4630,
- "termname": "",
- "hostname": "",
- "status": 0,
- "id": 24,
- "interface": "lan1",
- "ip_addr_int": 3232260968,
- "ip_addr": "192.168.99.104"
}
]
}
}获取当前通过DHCPv6服务器分配IPv6地址的所有客户端信息。 支持分页、过滤和排序功能。
| 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、interface、mac、ip_addr、start_time等字段 |
| filter | string Example: filter=interface==lan1 过滤条件,支持精确匹配和多条件组合。 支持的操作符:
多条件连接语法:
使用示例:
|
{- "code": 0,
- "message": "Success",
- "results": {
- "client_total": 1,
- "client_data": [
- {
- "id": 2,
- "interface": "lan1",
- "link_addr": "fe80::ef:8645:497a:db87",
- "duid": "00030001a628e6a1235d",
- "hostname": "",
- "start_time": 1767089750,
- "expires": 1767096950,
- "timeout": 6656,
- "termname": "",
- "ipv6_addr": "fc00:78aa:2521:1::cd1",
- "mac": "a6:28:e6:a1:23:5d"
}
]
}
}获取当前配置的所有DHCP服务策略列表。 支持分页、过滤和排序功能。
| 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、interface、lease等字段 |
| filter | string Example: filter=enabled==yes 过滤条件,支持精确匹配和多条件组合。 支持的操作符:
多条件连接语法:
使用示例:
|
{- "message": "Success",
- "results": {
- "total": 25,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "iKuai-DHCP",
- "interface": "lan1",
- "phy_ifnames": "eth0,veth0",
- "addr_pool": "192.168.1.100-192.168.1.200",
- "exclude_pool": "192.168.1.101,192.168.1.102",
- "netmask": "255.255.255.0",
- "gateway": "192.168.1.1",
- "dns1": "8.8.8.8",
- "dns2": "8.8.4.4",
- "wins1": "192.168.1.10",
- "wins2": "192.168.1.11",
- "domain": "example.com",
- "next_server": "192.168.1.2",
- "lease": 3600,
- "delay": 600,
- "opt_type15": 0,
- "opt_type28": 0,
- "opt_type43": 0,
- "opt_type60": 0,
- "opt_type66": 0,
- "opt_type67": 0,
- "opt_type80": 0,
- "opt_type119": 0,
- "opt_type125": 0,
- "opt_type128": 0,
- "opt_type138": 0,
- "opt_type121": 2,
- "opt15": "",
- "opt28": "",
- "opt43": "",
- "opt60": "",
- "opt66": "",
- "opt67": "",
- "opt80": "",
- "opt119": "",
- "opt125": "",
- "opt128": "",
- "opt138": "",
- "opt121": "",
- "check_addr_valid": 1,
- "check_relay_only": 0
}
]
}
}添加新的DHCP服务策略,包括地址池、DNS、WINS等配置。 所有必需字段必须提供。
DHCP服务配置数据
| enabled required | string Enum: "yes" "no" 服务启用状态,yes为启用(默认),no为停用 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| interface required | string [ 1 .. 20 ] characters ^[a-zA-Z0-9]+$ 绑定的网络接口名称 |
| phy_ifnames required | string non-empty ^[a-zA-Z0-9,]+$ 绑定的物理网卡名称,多个用逗号分隔 |
| addr_pool required | string^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3... DHCP地址池范围,格式为起始IP-结束IP |
| exclude_pool | string^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3... 排除的地址范围,在地址池中不分配的IP,多个用逗号分隔 |
| netmask required | string <ipv4> 子网掩码 |
| gateway required | string <ipv4> 默认网关地址 |
| dns1 | string <ipv4> Default: "223.5.5.5" 主DNS服务器地址,默认为223.5.5.5 |
| dns2 | string <ipv4> Default: "223.6.6.6" 次DNS服务器地址,默认为223.6.6.6 |
| wins1 | string <ipv4> 主WINS服务器地址,用于Windows客户端 |
| wins2 | string <ipv4> 次WINS服务器地址,用于Windows客户端 |
| domain | string <hostname> DNS域名 |
| next_server | string <ipv4> 下一跳服务器IP地址,通常用于PXE启动 |
| lease required | integer [ 1 .. 525600 ] Default: 3600 IP地址租赁时间(秒),默认为3600(1小时) |
| delay required | integer [ 0 .. 2160 ] Default: 600 过期地址保留时间(秒),默认为600(10分钟) |
| opt_type15 | integer Default: 0 Enum: 0 1 2 Option type 15类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type28 | integer Default: 0 Enum: 0 1 2 Option type 28类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type43 | integer Default: 0 Enum: 0 1 2 Option type 43类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type60 | integer Default: 0 Enum: 0 1 2 Option type 60类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type66 | integer Default: 0 Enum: 0 1 2 Option type 66类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type67 | integer Default: 0 Enum: 0 1 2 Option type 67类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type80 | integer Default: 0 Enum: 0 1 2 Option type 80类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type119 | integer Default: 0 Enum: 0 1 2 Option type 119类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type125 | integer Default: 0 Enum: 0 1 2 Option type 125类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type128 | integer Default: 0 Enum: 0 1 2 Option type 128类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type138 | integer Default: 0 Enum: 0 1 2 Option type 138类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type121 | integer Default: 2 Enum: 0 2 Option type 121类型,0: 16进制 2: 路由列表(IP/掩码 网关) |
| opt15 | string Default: "" Option 15内容,用于指定用户的DNS域名 |
| opt28 | string Default: "" Option 28内容,广播地址配置 |
| opt43 | string Default: "" Option 43内容,供应商特定信息的配置内容 |
| opt60 | string Default: "" Option 60内容,供应商类别标识符,用于标识设备厂商类型 |
| opt66 | string Default: "" Option 66内容,TFTP服务器名称,用于PXE启动 |
| opt67 | string Default: "" Option 67内容,PXE启动文件名配置 |
| opt80 | string Default: "" Option 80内容,客户端标识符用于唯一识别客户端 |
| opt119 | string Default: "" Option 119内容,域名搜索列表,指定DNS搜索域 |
| opt125 | string Default: "" Option 125内容,供应商标识符,用于识别DHCP供应商设备 |
| opt128 | string Default: "" Option 128内容,微软PXE启动相关配置 |
| opt138 | string Default: "" Option 138内容,微软特定选项用于远程启动 |
| opt121 | string Default: "" Option 121内容,静态路由配置,指定客户端应添加到路由表的路由 |
| check_addr_valid required | integer Default: 1 Enum: 0 1 是否检查IP地址有效性,1为检查,0为不检查 |
| check_relay_only required | integer Default: 0 Enum: 0 1 是否只能使用与中继请求,1为是,0为否 |
{- "enabled": "yes",
- "interface": "eth0",
- "phy_ifnames": "eth0,veth0",
- "addr_pool": "192.168.1.100-192.168.1.200",
- "exclude_pool": "192.168.1.101,192.168.1.102",
- "netmask": "255.255.255.0",
- "gateway": "192.168.1.1",
- "dns1": "8.8.8.8",
- "dns2": "8.8.4.4",
- "wins1": "192.168.1.10",
- "wins2": "192.168.1.11",
- "domain": "example.com",
- "next_server": "192.168.1.2",
- "lease": 3600,
- "delay": 600,
- "opt_type15": 0,
- "opt15": "example.local",
- "opt_type28": 1,
- "opt28": "192.168.1.255",
- "opt_type43": 2,
- "opt43": "vendor-specific-data",
- "opt_type60": 0,
- "opt60": "PXEClient",
- "opt_type66": 2,
- "opt66": "tftp.example.com",
- "opt_type67": 2,
- "opt67": "pxelinux.0",
- "opt_type80": 1,
- "opt80": "client-identifier",
- "opt_type119": 2,
- "opt119": "example.com,corp.com",
- "opt_type125": 0,
- "opt125": "",
- "opt_type128": 1,
- "opt128": "192.168.1.100",
- "opt_type138": 1,
- "opt138": "192.168.1.100",
- "opt_type121": 1,
- "opt121": "192.168.1.0,255.255.255.0,192.168.1.1",
- "check_addr_valid": 1,
- "check_relay_only": 0
}{- "code": 0,
- "message": "Success"
}根据策略ID获取单个DHCP服务策略的详细信息。 需要提供有效的策略ID。
| id required | integer <int64> >= 1 Example: 1 DHCP策略ID |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "iKuai-DHCP",
- "interface": "lan1",
- "phy_ifnames": "eth0,veth0",
- "addr_pool": "192.168.1.100-192.168.1.200",
- "exclude_pool": "192.168.1.101,192.168.1.102",
- "netmask": "255.255.255.0",
- "gateway": "192.168.1.1",
- "dns1": "8.8.8.8",
- "dns2": "8.8.4.4",
- "wins1": "192.168.1.10",
- "wins2": "192.168.1.11",
- "domain": "example.com",
- "next_server": "192.168.1.2",
- "lease": 3600,
- "delay": 600,
- "opt_type15": 0,
- "opt_type28": 0,
- "opt_type43": 0,
- "opt_type60": 0,
- "opt_type66": 0,
- "opt_type67": 0,
- "opt_type80": 0,
- "opt_type119": 0,
- "opt_type125": 0,
- "opt_type128": 0,
- "opt_type138": 0,
- "opt_type121": 2,
- "opt15": "",
- "opt28": "",
- "opt43": "",
- "opt60": "",
- "opt66": "",
- "opt67": "",
- "opt80": "",
- "opt119": "",
- "opt125": "",
- "opt128": "",
- "opt138": "",
- "opt121": "",
- "check_addr_valid": 1,
- "check_relay_only": 0
}
]
}
}完全更新现有的DHCP服务策略配置。 需要提供所有字段。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 DHCP策略ID |
完整的DHCP服务配置数据
| enabled required | string Enum: "yes" "no" 服务启用状态,yes为启用(默认),no为停用 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| interface required | string [ 1 .. 20 ] characters ^[a-zA-Z0-9]+$ 绑定的网络接口名称 |
| phy_ifnames required | string non-empty ^[a-zA-Z0-9,]+$ 绑定的物理网卡名称,多个用逗号分隔 |
| addr_pool required | string^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3... DHCP地址池范围,格式为起始IP-结束IP |
| exclude_pool | string^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3... 排除的地址范围,在地址池中不分配的IP,多个用逗号分隔 |
| netmask required | string <ipv4> 子网掩码 |
| gateway required | string <ipv4> 默认网关地址 |
| dns1 | string <ipv4> Default: "223.5.5.5" 主DNS服务器地址,默认为223.5.5.5 |
| dns2 | string <ipv4> Default: "223.6.6.6" 次DNS服务器地址,默认为223.6.6.6 |
| wins1 | string <ipv4> 主WINS服务器地址,用于Windows客户端 |
| wins2 | string <ipv4> 次WINS服务器地址,用于Windows客户端 |
| domain | string <hostname> DNS域名 |
| next_server | string <ipv4> 下一跳服务器IP地址,通常用于PXE启动 |
| lease required | integer [ 1 .. 525600 ] Default: 3600 IP地址租赁时间(秒),默认为3600(1小时) |
| delay required | integer [ 0 .. 2160 ] Default: 600 过期地址保留时间(秒),默认为600(10分钟) |
| opt_type15 | integer Default: 0 Enum: 0 1 2 Option type 15类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type28 | integer Default: 0 Enum: 0 1 2 Option type 28类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type43 | integer Default: 0 Enum: 0 1 2 Option type 43类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type60 | integer Default: 0 Enum: 0 1 2 Option type 60类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type66 | integer Default: 0 Enum: 0 1 2 Option type 66类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type67 | integer Default: 0 Enum: 0 1 2 Option type 67类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type80 | integer Default: 0 Enum: 0 1 2 Option type 80类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type119 | integer Default: 0 Enum: 0 1 2 Option type 119类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type125 | integer Default: 0 Enum: 0 1 2 Option type 125类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type128 | integer Default: 0 Enum: 0 1 2 Option type 128类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type138 | integer Default: 0 Enum: 0 1 2 Option type 138类型,0: 16进制 1: IP地址 2: 字符串 |
| opt_type121 | integer Default: 2 Enum: 0 2 Option type 121类型,0: 16进制 2: 路由列表(IP/掩码 网关) |
| opt15 | string Default: "" Option 15内容,用于指定用户的DNS域名 |
| opt28 | string Default: "" Option 28内容,广播地址配置 |
| opt43 | string Default: "" Option 43内容,供应商特定信息的配置内容 |
| opt60 | string Default: "" Option 60内容,供应商类别标识符,用于标识设备厂商类型 |
| opt66 | string Default: "" Option 66内容,TFTP服务器名称,用于PXE启动 |
| opt67 | string Default: "" Option 67内容,PXE启动文件名配置 |
| opt80 | string Default: "" Option 80内容,客户端标识符用于唯一识别客户端 |
| opt119 | string Default: "" Option 119内容,域名搜索列表,指定DNS搜索域 |
| opt125 | string Default: "" Option 125内容,供应商标识符,用于识别DHCP供应商设备 |
| opt128 | string Default: "" Option 128内容,微软PXE启动相关配置 |
| opt138 | string Default: "" Option 138内容,微软特定选项用于远程启动 |
| opt121 | string Default: "" Option 121内容,静态路由配置,指定客户端应添加到路由表的路由 |
| check_addr_valid required | integer Default: 1 Enum: 0 1 是否检查IP地址有效性,1为检查,0为不检查 |
| check_relay_only required | integer Default: 0 Enum: 0 1 是否只能使用与中继请求,1为是,0为否 |
{- "enabled": "yes",
- "tagname": "iKuai-DHCP",
- "interface": "lan1",
- "phy_ifnames": "eth0,veth0",
- "addr_pool": "192.168.1.100-192.168.1.200",
- "exclude_pool": "192.168.1.101,192.168.1.102",
- "netmask": "255.255.255.0",
- "gateway": "192.168.1.1",
- "dns1": "8.8.8.8",
- "dns2": "8.8.4.4",
- "wins1": "192.168.1.10",
- "wins2": "192.168.1.11",
- "domain": "example.com",
- "next_server": "192.168.1.2",
- "lease": 3600,
- "delay": 600,
- "opt_type15": 0,
- "opt_type28": 0,
- "opt_type43": 0,
- "opt_type60": 0,
- "opt_type66": 0,
- "opt_type67": 0,
- "opt_type80": 0,
- "opt_type119": 0,
- "opt_type125": 0,
- "opt_type128": 0,
- "opt_type138": 0,
- "opt_type121": 2,
- "opt15": "",
- "opt28": "",
- "opt43": "",
- "opt60": "",
- "opt66": "",
- "opt67": "",
- "opt80": "",
- "opt119": "",
- "opt125": "",
- "opt128": "",
- "opt138": "",
- "opt121": "",
- "check_addr_valid": 1,
- "check_relay_only": 0
}{- "code": 0,
- "message": "Success"
}部分更新现有的DHCP服务策略配置。 主要用于启用/停用策略状态。
| id required | integer <int64> >= 1 Example: 1 DHCP策略ID |
部分更新数据(如启用状态)
| enabled required | string Enum: "yes" "no" 服务启用状态 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}获取当前配置的所有DHCP静态分配规则列表。 支持分页、过滤和排序功能。
| 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、interface、ip_addr、mac等字段 |
| filter | string Example: filter=enabled==yes 过滤条件,支持精确匹配和多条件组合。 支持的操作符:
多条件连接语法:
使用示例:
|
{- "message": "Success",
- "results": {
- "static_total": 2,
- "static_data": [
- {
- "mac": "11:22:33:44:55:66",
- "gateway": "192.168.9.1",
- "dns1": "223.5.5.5",
- "dns2": "223.6.6.6",
- "ip_addr": "192.168.9.120",
- "ip_addr_int": 3232237944,
- "comment": "test001",
- "id": 1,
- "enabled": "yes",
- "hostname": "",
- "tagname": "term001",
- "interface": "lan1"
}, - {
- "mac": "11:22:33:44:55:77",
- "gateway": "192.168.9.1",
- "dns1": "223.5.5.5",
- "dns2": "119.29.29.29",
- "ip_addr": "192.168.9.111",
- "ip_addr_int": 3232237935,
- "comment": "test003",
- "id": 2,
- "enabled": "yes",
- "hostname": "",
- "tagname": "test002",
- "interface": "lan1"
}
]
}
}添加新的DHCP静态分配规则,为特定MAC地址分配固定IP地址。 所有必需字段必须提供。
静态分配规则配置数据
| enabled required | string Enum: "yes" "no" 规则启用状态,yes为启用(默认),no为停用 |
| mac required | string^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$|^([0-9A-... MAC地址 |
| ip_addr required | string <ipv4> IP地址 |
| interface required | string <= 15 characters ^(auto|lan[a-zA-Z0-9]*|vlan[a-zA-Z0-9]*)$ 接口名称,支持 auto、lan* 或 vlan* 格式,最大15个字符 |
| gateway | string 网关地址,不填则为空 |
| dns1 | string DNS1服务器地址 |
| dns2 | string DNS2服务器地址 |
| comment | string <= 64 characters 备注信息,最多64个字符,不支持特殊字符 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| hostname | string 主机名 |
{- "enabled": "yes",
- "comment": "备注",
- "interface": "lan1",
- "ip_addr": "192.168.1.100",
- "mac": "xx:xx:xx:xx:xx:xx",
- "gateway": "192.168.1.1",
- "dns1": "8.8.8.8",
- "dns2": "8.8.4.4",
- "tagname": "test",
- "hostname": ""
}{- "code": 0,
- "message": "success",
- "rowid": 1
}根据规则ID获取单个DHCP静态分配规则的详细信息。 需要提供有效的规则ID。
| id required | integer <int64> >= 1 Example: 1 静态分配规则ID |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "mac": "11:22:33:44:55:66",
- "ip_addr": "192.168.9.120",
- "ip_addr_int": 3232237944,
- "interface": "lan1",
- "gateway": "192.168.9.1",
- "dns1": "223.5.5.5",
- "dns2": "223.6.6.6",
- "comment": "test001",
- "tagname": "term001",
- "hostname": ""
}
]
}
}完全更新现有的DHCP静态分配规则配置。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 静态分配规则ID |
完整的静态分配规则配置数据
| enabled required | string Enum: "yes" "no" 规则启用状态,yes为启用(默认),no为停用 |
| mac required | string^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$|^([0-9A-... MAC地址 |
| ip_addr required | string <ipv4> IP地址 |
| interface required | string <= 15 characters ^(auto|lan[a-zA-Z0-9]*|vlan[a-zA-Z0-9]*)$ 接口名称,支持 auto、lan* 或 vlan* 格式,最大15个字符 |
| gateway | string 网关地址,不填则为空 |
| dns1 | string DNS1服务器地址 |
| dns2 | string DNS2服务器地址 |
| comment | string <= 64 characters 备注信息,最多64个字符,不支持特殊字符 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| hostname | string 主机名 |
{- "enabled": "yes",
- "mac": "11:22:33:44:55:66",
- "ip_addr": "192.168.1.100",
- "interface": "lan1",
- "gateway": "192.168.1.1",
- "dns1": "8.8.8.8",
- "dns2": "8.8.4.4",
- "comment": "备注",
- "tagname": "test",
- "hostname": ""
}{- "code": 0,
- "message": "Success"
}部分更新现有的DHCP静态分配规则配置。 主要用于启用/停用规则状态。
| id required | integer <int64> >= 1 Example: 1 静态分配规则ID |
部分更新数据(如启用状态)
| enabled required | string Enum: "yes" "no" 规则启用状态 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}设置DHCPv6访问控制的工作模式。 可以在黑名单模式和白名单模式之间切换。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
访问控制模式配置
| mode required | integer Enum: 0 1 访问控制模式,0:黑名单模式 1:白名单模式 |
{- "mode": 0
}{- "message": "success"
}获取当前配置的所有DHCPv6访问控制规则列表。 根据当前模式,这些规则可能是黑名单或白名单。 支持分页、过滤和排序功能。
| 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、mac、tagname等字段 |
| filter | string Example: filter=enabled==yes 过滤条件,支持精确匹配和多条件组合。 支持的操作符:
多条件连接语法:
使用示例:
|
{- "code": 0,
- "message": "Success",
- "results": {
- "total": 2,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "test001",
- "mac": "11:22:33:44:55:66",
- "comment": "test001"
}, - {
- "id": 2,
- "enabled": "yes",
- "tagname": "test007",
- "mac": "11:22:33:44:55:67",
- "comment": "test007-comment"
}
]
}
}添加新的DHCPv6访问控制规则。 根据当前模式,该规则将被添加到黑名单或白名单中。 所有必需字段必须提供。
访问控制规则配置数据
| enabled required | string Enum: "yes" "no" 规则启用状态,yes为启用,no为停用 |
| mac required | string^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ MAC地址 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| comment | string <= 64 characters 备注信息,最多64个字符,不支持特殊字符 |
{- "enabled": "yes",
- "mac": "11:22:33:44:55:68",
- "tagname": "test008",
- "comment": "test008-comment"
}{- "code": 0,
- "message": "Success",
- "rowid": 3
}根据规则ID获取单个DHCPv6访问控制规则的详细信息。 需要提供有效的规则ID。
| id required | integer <int64> >= 1 Example: 1 DHCPv6访问控制规则ID |
{- "code": 0,
- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "mac": "11:22:33:44:55:66",
- "tagname": "test001",
- "comment": "test001"
}
]
}
}完全更新现有的DHCPv6访问控制规则配置。 需要提供所有字段。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 DHCPv6访问控制规则ID |
完整的访问控制规则配置数据
| enabled required | string Enum: "yes" "no" 规则启用状态,yes为启用,no为停用 |
| mac required | string^([0-9A-Fa-f]{2}:){5}[0-9A-Fa-f]{2}$ MAC地址 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| comment | string <= 64 characters 备注信息,最多64个字符,不支持特殊字符 |
{- "enabled": "yes",
- "mac": "11:22:33:44:55:68",
- "tagname": "test008",
- "comment": "test008-comment"
}{- "code": 0,
- "message": "Success"
}部分更新现有的DHCPv6访问控制规则配置。 主要用于启用/停用规则状态。
| id required | integer <int64> >= 1 Example: 1 DHCPv6访问控制规则ID |
部分更新数据(如启用状态)
| enabled required | string Enum: "yes" "no" 规则启用状态 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}获取当前配置的DMZ策略列表,支持分页功能。 包含策略名称、外网接口、内网地址、排除协议、排除端口等信息。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
{- "message": "Success",
- "results": {
- "total": 5,
- "data": [
- {
- "id": 1,
- "tagname": "test001",
- "enabled": "yes",
- "interface": "192.168.100.1",
- "lan_addr": "192.168.10.10",
- "lan_addr_int": 3232238090,
- "protocol": "tcp",
- "excl_port": "80",
- "comment": "test001"
}
]
}
}添加新的DMZ策略,将外网接口的所有流量映射到指定的内网地址。 可配置排除的协议和端口。
DMZ策略配置数据
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| enabled required | string Enum: "yes" "no" 开启状态,yes为启用,no为停用 |
| interface required | string 外网接口名称或外网IP地址 |
| lan_addr required | string <ipv4> 内网地址(DMZ主机地址) |
| protocol required | string Enum: "any" "tcp" "udp" "tcp+udp" 排除的协议类型:
|
| comment | string <= 64 characters 备注信息,最多64个字符,不支持特殊字符 |
| excl_port required | string 排除的端口,多个端口用逗号分隔,支持范围输入(如:80,443,1000-2000)。当 protocol 为 tcp 或 udp 时必填 |
{- "tagname": "test001",
- "enabled": "yes",
- "interface": "192.168.100.1",
- "lan_addr": "192.168.10.10",
- "protocol": "tcp",
- "comment": "test001"
}{- "code": 0,
- "message": "Success"
}根据策略ID获取单个DMZ策略的详细信息。
| id required | integer <int64> >= 1 Example: 1 DMZ策略ID |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "tagname": "test001",
- "enabled": "yes",
- "interface": "192.168.100.1",
- "lan_addr": "192.168.10.10",
- "lan_addr_int": 3232238090,
- "protocol": "tcp",
- "excl_port": "80",
- "comment": "test001"
}
]
}
}完全更新现有的DMZ策略配置。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 DMZ策略ID |
完整的DMZ策略配置数据
| id required | integer <int64> >= 1 策略ID |
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| enabled required | string Enum: "yes" "no" 开启状态 |
| interface required | string 外网接口名称或外网IP地址,或'all' |
| lan_addr required | string <ipv4> 内网地址(DMZ主机地址) |
| protocol required | string Enum: "any" "tcp" "udp" "tcp+udp" 排除的协议类型 |
| excl_port required | string 排除的端口,多个端口用逗号分隔,支持范围输入(如:80,443,1000-2000)。当 protocol 为 tcp 或 udp 时必填 |
| comment required | string <= 64 characters 备注信息,最多64个字符,不支持特殊字符 |
{- "id": 1,
- "tagname": "test001",
- "enabled": "yes",
- "interface": "192.168.100.1",
- "lan_addr": "192.168.10.10",
- "protocol": "tcp",
- "excl_port": "80",
- "comment": "test001"
}{- "code": 0,
- "message": "Success"
}部分更新现有的DMZ策略配置。 主要用于启用/停用策略状态。
| id required | integer <int64> >= 1 Example: 1 DMZ策略ID |
部分更新数据(如启用状态)
| enabled required | string Enum: "yes" "no" 策略启用状态 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}获取当前配置的端口映射规则列表,支持分页功能。 包含规则名称、内外网端口、协议、启用状态等信息。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
{- "message": "Success",
- "results": {
- "total": 2,
- "data": [
- {
- "id": 2,
- "tagname": "test001",
- "enabled": "yes",
- "lan_addr": "192.168.177.100",
- "lan_addr_int": 3232280932,
- "lan_port": "90,9090-9099",
- "protocol": "tcp",
- "interface": "wan1",
- "wan_port": "90,9090-9099",
- "src_addr": {
- "custom": [
- "192.168.1.2"
], - "object": [
- {
- "type": 0,
- "gid": "IPGP1",
- "gp_name": "test001"
}
]
}, - "comment": "test001"
}
]
}
}添加新的端口映射规则,将外网端口映射到内网地址的端口。 支持TCP、UDP或TCP+UDP协议,支持端口范围配置。
端口映射规则配置数据
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| enabled required | string Enum: "yes" "no" 开启状态,yes为启用,no为停用 |
| lan_addr required | string <ipv4> 内网地址 |
| lan_port required | string 内网端口,支持单个端口或端口范围,多个端口用逗号分隔 |
| protocol required | string Enum: "tcp" "udp" "tcp+udp" 传输协议类型 |
| interface required | string 外网接口名称或外网IP地址 |
| wan_port required | string 外网端口,支持单个端口或端口范围,多个端口用逗号分隔 |
object 允许访问的源地址 | |
| comment | string <= 64 characters 备注信息,最多64个字符 |
{- "tagname": "test001",
- "enabled": "yes",
- "lan_addr": "192.168.177.100",
- "lan_port": "90,9090-9099",
- "protocol": "tcp",
- "interface": "wan1",
- "wan_port": "90,9090-9099",
- "src_addr": {
- "custom": [
- "192.168.1.2"
], - "object": [
- {
- "type": 0,
- "gid": "IPGP1",
- "gp_name": "test001"
}
]
}, - "comment": "test001"
}{- "code": 0,
- "message": "Success"
}根据规则ID获取单个端口映射规则的详细信息。
| id required | integer <int64> >= 1 Example: 2 端口映射规则ID |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 2,
- "tagname": "test001",
- "enabled": "yes",
- "lan_addr": "192.168.177.100",
- "lan_addr_int": 3232280932,
- "lan_port": "90,9090-9099",
- "protocol": "tcp",
- "interface": "wan1",
- "wan_port": "90,9090-9099",
- "src_addr": {
- "custom": [
- "192.168.1.2"
], - "object": [
- {
- "type": 0,
- "gid": "IPGP1",
- "gp_name": "test001"
}
]
}, - "comment": "test001"
}
]
}
}完全更新现有的端口映射规则配置。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 2 端口映射规则ID |
完整的端口映射规则配置数据
| id required | integer <int64> >= 1 规则ID |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| enabled required | string Enum: "yes" "no" 开启状态 |
| lan_addr required | string <ipv4> 内网地址 |
| lan_port required | string 内网端口 |
| protocol required | string Enum: "tcp" "udp" "tcp+udp" 传输协议类型 |
| interface required | string 外网接口名称或外网IP地址 |
| wan_port required | string 外网端口 |
object 允许访问的源地址 | |
| comment required | string <= 64 characters 备注信息,最多64个字符 |
{- "id": 2,
- "tagname": "test001",
- "enabled": "yes",
- "lan_addr": "192.168.177.100",
- "lan_port": "90,9090-9099",
- "protocol": "tcp",
- "interface": "wan1",
- "wan_port": "90,9090-9099",
- "src_addr": {
- "custom": [
- "string"
], - "object": [
- {
- "type": 0,
- "gid": "string",
- "gp_name": "string"
}
]
}, - "comment": "test001"
}{- "code": 0,
- "message": "Success"
}部分更新现有的端口映射规则配置。 主要用于启用/停用规则状态。
| id required | integer <int64> >= 1 Example: 2 端口映射规则ID |
部分更新数据(如启用状态)
| enabled required | string Enum: "yes" "no" 规则启用状态 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}{- "message": "Success",
- "results": {
- "total": 7,
- "data": [
- {
- "id": 1,
- "request": 1388762,
- "hit": 1010261,
- "miss": 378501,
- "date": "2025-11-12",
- "save_time": "2025-11-12 10:30:00"
}, - {
- "id": 2,
- "request": 5000,
- "hit": 0,
- "miss": 0,
- "date": 0,
- "save_time": "2025-11-12 10:30:00"
}
]
}
}{- "message": "Success",
- "results": {
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "forbid_dns_4a": 0,
- "cache_ttl": 300,
- "cachemode": 0,
- "proxy_force": 0,
- "proxy_force_dns": "",
- "dns1": "114.114.114.114",
- "dns2": "119.29.29.29",
- "network": "",
- "defense": "",
- "query_args_ip": "",
- "query_head_ip": ""
}
]
}
}更新DNS服务的配置信息,包括启用DNS代理服务、 设置缓存TTL、配置DNS工作模式等。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
DNS配置数据
| enabled required | string Enum: "yes" "no" 启用DNS代理服务,yes为启用,no为停用 |
| forbid_dns_4a required | integer Enum: 0 1 忽略DNS 4A记录,0为允许,1为忽略 |
| cache_ttl required | integer [ 60 .. 3600 ] Default: 300 缓存的最大TTL(秒),范围 60-3600 |
| cachemode required | integer Enum: 0 1 2 3 DNS工作模式:
|
| proxy_force required | integer Enum: 0 1 强制客户端启用DNS代理(只针对dnsmasq),0为否,1为是 |
| proxy_force_dns required | string 第三方代理的DNS服务器IP列表,多个以逗号分隔,当 cachemode=2 时必填 |
| query required | string <uri> Default: "https://doh.pub/dns-query" DoH解析URL地址,当 cachemode=3(DoH模式)时必填 |
| dns1 required | string <ipv4> Default: "114.114.114.114" 主DNS服务器地址 |
| dns2 required | string <ipv4> Default: "119.29.29.29" 备DNS服务器地址 |
| defense required | string DNS防御配置,详情回填后保存原值 |
| network required | string 网络接口配置,详情回填后保存原值 |
| query_args_ip required | string 查询参数IP,详情回填后保存原值 |
| query_head_ip required | string 查询头部IP,详情回填后保存原值 |
{- "enabled": "yes",
- "forbid_dns_4a": 0,
- "cache_ttl": 300,
- "cachemode": 0,
- "proxy_force": 0,
- "proxy_force_dns": "",
- "dns1": "114.114.114.114",
- "dns2": "119.29.29.29",
- "defense": "",
- "network": "",
- "query_args_ip": "",
- "query_head_ip": ""
}{- "code": 0,
- "message": "Success"
}获取当前配置的DNS代理规则列表,支持分页和过滤功能。 包含域名、解析IP地址、启用状态、备注等信息。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
{- "message": "Success",
- "results": {
- "total": 25,
- "data": [
- {
- "id": 1,
- "domain": "example.com",
- "dns_addr": "192.168.1.100",
- "enabled": "yes",
- "comment": "示例域名解析规则",
- "src_addr": "192.168.1.0/24,192.168.1.1,192.168.1.10-192.168.1.20",
- "is_ipv6": 0,
- "parse_type": "ipv4"
}
]
}
}添加新的DNS代理规则,指定域名和对应的解析IP地址。 支持IPv4和IPv6解析类型。
DNS代理规则配置数据
| domain required | string [ 1 .. 255 ] characters 域名,不能为空 |
| dns_addr required | string 解析的IP地址,不能为空;parse_type=ipv4 时须为合法 IPv4,parse_type=ipv6 时须为合法 IPv6 |
| enabled required | string Enum: "yes" "no" 开启状态,yes为启用,no为停用 |
| comment | string <= 64 characters 备注信息,最多64个字符 |
| src_addr | string 限制来源IP范围,多个以逗号隔开,支持固定IP、带掩码格式、范围格式(可不传,不填表示不限制来源) |
| is_ipv6 | integer Enum: 0 1 是否为IPv6,0为IPv4,1为IPv6 |
| parse_type required | string Enum: "ipv4" "ipv6" "proxy" "proxy6" 解析类型:
|
{- "domain": "example.com",
- "dns_addr": "192.168.1.100",
- "enabled": "yes",
- "comment": "示例域名解析规则",
- "src_addr": "192.168.1.0/24",
- "is_ipv6": 0,
- "parse_type": "ipv4"
}{- "code": 0,
- "message": "success",
- "rowid": 1
}根据规则ID获取单个DNS代理规则的详细信息。
| id required | integer <int64> >= 1 Example: 1 DNS代理规则ID |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "domain": "example.com",
- "dns_addr": "192.168.1.100",
- "enabled": "yes",
- "comment": "示例域名解析规则",
- "src_addr": "192.168.1.0/24,192.168.1.1,192.168.1.10-192.168.1.20",
- "is_ipv6": 0,
- "parse_type": "ipv4"
}
]
}
}完全更新现有的DNS代理规则配置。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 DNS代理规则ID |
完整的DNS代理规则配置数据
| domain required | string [ 1 .. 255 ] characters 域名,不能为空 |
| dns_addr required | string 解析的IP地址,不能为空;parse_type=ipv4 时须为合法 IPv4,parse_type=ipv6 时须为合法 IPv6 |
| enabled required | string Enum: "yes" "no" 开启状态,yes为启用,no为停用 |
| comment | string <= 64 characters 备注信息,最多64个字符 |
| src_addr | string 限制来源IP范围,多个以逗号隔开,支持固定IP、带掩码格式、范围格式(可不传,不填表示不限制来源) |
| is_ipv6 | integer Enum: 0 1 是否为IPv6,0为IPv4,1为IPv6 |
| parse_type required | string Enum: "ipv4" "ipv6" "proxy" "proxy6" 解析类型:
|
{- "domain": "example.com",
- "dns_addr": "192.168.1.100",
- "enabled": "yes",
- "comment": "示例域名解析规则",
- "src_addr": "192.168.1.0/24,192.168.1.1,192.168.1.10-192.168.1.20",
- "is_ipv6": 0,
- "parse_type": "ipv4"
}{- "code": 0,
- "message": "Success"
}部分更新现有的DNS代理规则配置。 主要用于启用/停用规则状态。
| id required | integer <int64> >= 1 Example: 1 DNS代理规则ID |
部分更新数据(如启用状态)
| enabled required | string Enum: "yes" "no" 规则启用状态 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}获取当前配置的多线DNS策略列表,支持分页功能。 每个WAN口线路可以自定义上级DNS服务器地址。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
{- "message": "Success",
- "results": {
- "total": 25,
- "data": [
- {
- "id": 1,
- "interface": "wan1",
- "tagname": "线路1",
- "dns1": "8.8.8.8",
- "dns2": "8.8.4.4",
- "enabled": "yes",
- "comment": "主线路DNS配置"
}
]
}
}添加新的多线DNS策略,为WAN口线路配置自定义DNS服务器地址。 每个WAN口可以配置不同的上级DNS服务器。
多线DNS策略配置数据
| interface required | string [ 1 .. 20 ] characters ^[a-zA-Z0-9_-]+$ 网卡接口名称 |
| tagname required | string [ 1 .. 50 ] characters ^[a-zA-Z0-9_-]+$ 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| dns1 required | string <ipv4> 主DNS服务器地址 |
| dns2 required | string <ipv4> 备DNS服务器地址 |
| enabled required | string Enum: "yes" "no" 策略启用状态,yes为启用,no为停用 |
| comment required | string <= 64 characters 备注信息,最多64个字符 |
{- "interface": "wan1",
- "tagname": "线路1",
- "dns1": "8.8.8.8",
- "dns2": "8.8.4.4",
- "enabled": "yes",
- "comment": "主线路DNS配置"
}{- "code": 0,
- "message": "Success"
}根据策略ID获取单个多线DNS策略的详细信息。
| id required | integer <int64> >= 1 Example: 1 多线DNS策略ID |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "interface": "wan1",
- "tagname": "线路1",
- "dns1": "8.8.8.8",
- "dns2": "8.8.4.4",
- "enabled": "yes",
- "comment": "主线路DNS配置"
}
]
}
}完全更新现有的多线DNS策略配置。 需要提供所有字段。
| id required | integer <int64> >= 1 Example: 1 多线DNS策略ID |
完整的多线DNS策略配置数据
| interface required | string [ 1 .. 20 ] characters ^[a-zA-Z0-9_-]+$ 网卡接口名称 |
| tagname required | string [ 1 .. 50 ] characters ^[a-zA-Z0-9_-]+$ 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| dns1 required | string <ipv4> 主DNS服务器地址 |
| dns2 required | string <ipv4> 备DNS服务器地址 |
| enabled required | string Enum: "yes" "no" 策略启用状态,yes为启用,no为停用 |
| comment required | string <= 64 characters 备注信息,最多64个字符 |
{- "interface": "wan1",
- "tagname": "线路1",
- "dns1": "8.8.8.8",
- "dns2": "8.8.4.4",
- "enabled": "yes",
- "comment": "主线路DNS配置"
}{- "code": 0,
- "message": "Success"
}部分更新现有的多线DNS策略配置。 主要用于启用/停用策略状态。
| id required | integer <int64> >= 1 Example: 1 多线DNS策略ID |
部分更新数据(如启用状态)
| enabled required | string Enum: "yes" "no" 策略启用状态 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}查询所有LAN接口的配置信息,包括接口名称、绑定网卡、IP地址/掩码、 DHCP服务器状态、VLAN绑定、链路聚合模式等详细信息。
{- "code": 0,
- "message": "Success",
- "results": {
- "data": [
- {
- "id": 1,
- "name": "lan1",
- "tagname": "lan1",
- "comment": "",
- "mac": "",
- "speed": 0,
- "duplex": 0,
- "lan_visit": 1,
- "bandmode": 0,
- "linkmode": 4,
- "policy": 0,
- "ip_mask": "192.168.99.1/255.255.255.0",
- "bandif": "00:e2:69:00:89:e5,00:e2:69:00:89:e6",
- "bandeth": "eth0,eth1,eth2",
- "bandflag": "0,0",
- "vlan": "vlan1001",
- "dhcp_server": 1
}
]
}
}更新指定LAN接口的网卡配置。本接口为全量修改,请求时需传入所有字段, 未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 LAN接口ID |
| bandif required | string 绑定网卡MAC地址,多个以逗号分隔 |
| bandmode required | integer Enum: 0 1 绑定模式(0=网桥, 1=汇聚) |
| speed required | integer Enum: 0 10 100 1000 10000 网卡速率(0=自动, 10/100/1000/10000 Mbps) |
| duplex required | integer Enum: 0 1 2 工作模式(0=自动, 1=全双工, 2=半双工) |
| lan_visit required | integer Enum: 0 1 是否允许其他LAN访问(0=不允许, 1=允许) |
| ip_mask required | string IP地址和子网掩码,格式:IP/掩码,如 192.168.1.1/255.255.255.0 |
| mac | string <= 17 characters 克隆MAC地址,空字符串表示不克隆 |
| comment | string <= 64 characters 备注信息,最多64字符 |
| linkmode | integer Enum: 2 4 链路聚合模式,bandmode=1时有效(2=手工链路聚合, 4=LACP链路聚合) |
| policy | integer Enum: 0 1 2 汇聚负载方式(0=layer2, 1=layer3+4, 2=layer2+3) |
{- "bandif": "00:e2:69:00:89:e5,00:e2:69:00:89:e6",
- "bandmode": 0,
- "speed": 0,
- "duplex": 0,
- "lan_visit": 1,
- "ip_mask": "192.168.99.1/255.255.255.0",
- "mac": "",
- "comment": "",
- "linkmode": 4,
- "policy": 0
}{- "code": 0,
- "message": "success"
}查询所有物理网卡的列表及属性信息,包括驱动类型、网卡类型、 MAC地址、链路状态、协商速率、双工模式和所属接口名称。 返回结果以网卡名称(如eth0、eth1)为键的对象格式。
{- "message": "Success",
- "results": {
- "ether_info": {
- "eth0": {
- "driver": "igb",
- "type": "TP",
- "mac": "00:e2:69:00:89:e5",
- "link": 1,
- "speed": 100,
- "duplex": 1,
- "model": "Intel Corporation I211 Gigabit Network Connection",
- "interface": "lan1",
- "lock": 0,
- "bindmod": 0
}, - "eth1": {
- "driver": "igb",
- "type": "TP",
- "mac": "00:e2:69:00:89:e6",
- "link": 1,
- "speed": 1000,
- "duplex": 1,
- "model": "Intel Corporation I211 Gigabit Network Connection",
- "interface": "lan1",
- "lock": 0,
- "bindmod": 0
}, - "eth2": {
- "driver": "igb",
- "type": "TP",
- "mac": "00:e2:69:00:89:e7",
- "link": 0,
- "speed": 0,
- "duplex": 0,
- "model": "Intel Corporation I211 Gigabit Network Connection",
- "interface": "lan1",
- "lock": 0,
- "bindmod": 0
}, - "eth3": {
- "driver": "igb",
- "type": "TP",
- "mac": "00:e2:69:00:89:e8",
- "link": 1,
- "speed": 1000,
- "duplex": 1,
- "model": "Intel Corporation I211 Gigabit Network Connection",
- "interface": "wan1",
- "lock": 0,
- "bindmod": 0
}, - "vnet": {
- "driver": "kvm",
- "type": "TP",
- "mac": "00:00:00:00:00:00",
- "link": 1,
- "speed": 1000,
- "duplex": 1,
- "model": "Kvm Virtual Bridge Enternet Controller",
- "interface": "Null",
- "lock": 0,
- "bindmod": 0
}
}
}
}获取当前配置的NAT规则列表,支持分页功能。 包含规则名称、动作类型、接口配置、地址配置、端口配置等信息。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
{- "message": "Success",
- "results": {
- "total": 10,
- "data": [
- {
- "id": 1,
- "tagname": "test001",
- "enabled": "yes",
- "action": "filter",
- "iinterface": "lan1",
- "ointerface": "wan1",
- "src_addr": {
- "custom": [
- "192.168.1.1"
], - "object": [
- {
- "type": 0,
- "gid": "IPGP1",
- "gp_name": "test001"
}
]
}, - "dst_addr": {
- "custom": [
- "192.168.2.2"
], - "object": [
- {
- "type": 0,
- "gid": "IPGP5",
- "gp_name": "test002"
}
]
}, - "nat_addr": "",
- "nat_port": "",
- "protocol": "tcp",
- "comment": "test002",
- "src_port": {
- "custom": [ ],
- "object": [
- {
- "type": 3,
- "gid": "PORTGP3",
- "gp_name": "test999"
}
]
}, - "dst_port": {
- "custom": [ ],
- "object": [
- {
- "type": 3,
- "gid": "PORTGP4",
- "gp_name": "test1000"
}
]
}, - "src_addr_inv": 0,
- "dst_addr_inv": 0,
- "src_addr_int": 0,
- "dst_addr_int": 0,
- "nat_addr_int": 0
}
]
}
}添加新的NAT规则,支持过滤(filter)、DNAT、SNAT三种动作类型。 可配置源地址、目标地址、端口、接口等参数。
NAT规则配置数据
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| enabled required | string Enum: "yes" "no" 开启状态,yes为启用,no为停用 |
| action required | string Enum: "filter" "dnat" "snat" NAT动作类型:
|
| iinterface required | string 进接口,多个接口以逗号分隔,any表示任意接口 |
| ointerface required | string 出接口,多个接口以逗号分隔,any表示任意接口 |
object 源地址配置 | |
object 目标地址配置 | |
| nat_addr | string <ipv4> NAT地址(action为snat或dnat时使用) |
| nat_port | string NAT端口(action为dnat时使用) |
| protocol | string Enum: "" "any" "tcp" "udp" "tcp+udp" 传输协议类型,空字符串或any表示不限制 |
| comment | string <= 64 characters 备注信息,最多64个字符,不支持特殊字符 |
| src_addr_inv required | integer Default: 0 Enum: 0 1 源地址取反(0:不取反, 1:取反) |
| dst_addr_inv required | integer Default: 0 Enum: 0 1 目的地址取反(0:不取反, 1:取反) |
object 源端口配置 | |
object 目标端口配置 |
{- "tagname": "test001",
- "enabled": "yes",
- "action": "filter",
- "iinterface": "lan1",
- "ointerface": "wan1",
- "src_addr": {
- "custom": [
- "192.168.1.1"
], - "object": [
- {
- "type": 0,
- "gid": "IPGP1",
- "gp_name": "test001"
}
]
}, - "dst_addr": {
- "custom": [
- "192.168.2.2"
], - "object": [
- {
- "type": 0,
- "gid": "IPGP5",
- "gp_name": "test002"
}
]
}, - "nat_addr": "",
- "nat_port": "",
- "protocol": "tcp",
- "comment": "test002",
- "src_port": {
- "custom": [ ],
- "object": [
- {
- "type": 3,
- "gid": "PORTGP3",
- "gp_name": "test999"
}
]
}, - "dst_port": {
- "custom": [ ],
- "object": [
- {
- "type": 3,
- "gid": "PORTGP4",
- "gp_name": "test1000"
}
]
}
}{- "code": 0,
- "message": "Success"
}根据规则ID获取单个NAT规则的详细信息。
| id required | integer <int64> >= 1 Example: 1 NAT规则ID |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "tagname": "test001",
- "enabled": "yes",
- "action": "filter",
- "iinterface": "lan1",
- "ointerface": "wan1",
- "src_addr": {
- "custom": [
- "192.168.1.1"
], - "object": [
- {
- "type": 0,
- "gid": "IPGP1",
- "gp_name": "test001"
}
]
}, - "dst_addr": {
- "custom": [
- "192.168.2.2"
], - "object": [
- {
- "type": 0,
- "gid": "IPGP5",
- "gp_name": "test002"
}
]
}, - "nat_addr": "",
- "nat_port": "",
- "protocol": "tcp",
- "comment": "test002",
- "src_port": {
- "custom": [ ],
- "object": [
- {
- "type": 3,
- "gid": "PORTGP3",
- "gp_name": "test999"
}
]
}, - "dst_port": {
- "custom": [ ],
- "object": [
- {
- "type": 3,
- "gid": "PORTGP4",
- "gp_name": "test1000"
}
]
}, - "src_addr_inv": 0,
- "dst_addr_inv": 0,
- "src_addr_int": 0,
- "dst_addr_int": 0,
- "nat_addr_int": 0
}
]
}
}完全更新现有的NAT规则配置。 需要提供所有字段。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 NAT规则ID |
完整的NAT规则配置数据
| tagname required | string [ 1 .. 15 ] characters 标识名称(支持中文/数字/字母/下划线/连字符,不能以符号开头,1-15字符) |
| enabled required | string Enum: "yes" "no" 开启状态,yes为启用,no为停用 |
| action required | string Enum: "filter" "dnat" "snat" NAT动作类型:
|
| iinterface required | string 进接口,多个接口以逗号分隔,any表示任意接口 |
| ointerface required | string 出接口,多个接口以逗号分隔,any表示任意接口 |
object 源地址配置 | |
object 目标地址配置 | |
| nat_addr | string <ipv4> NAT地址(action为snat或dnat时使用) |
| nat_port | string NAT端口(action为dnat时使用) |
| protocol | string Enum: "" "any" "tcp" "udp" "tcp+udp" 传输协议类型,空字符串或any表示不限制 |
| comment | string <= 64 characters 备注信息,最多64个字符,不支持特殊字符 |
| src_addr_inv required | integer Default: 0 Enum: 0 1 源地址取反(0:不取反, 1:取反) |
| dst_addr_inv required | integer Default: 0 Enum: 0 1 目的地址取反(0:不取反, 1:取反) |
object 源端口配置 | |
object 目标端口配置 |
{- "tagname": "test001",
- "enabled": "yes",
- "action": "filter",
- "iinterface": "lan1",
- "ointerface": "wan1",
- "src_addr": {
- "custom": [
- "192.168.1.1"
], - "object": [
- {
- "type": 0,
- "gid": "IPGP1",
- "gp_name": "test001"
}
]
}, - "dst_addr": {
- "custom": [
- "192.168.2.2"
], - "object": [
- {
- "type": 0,
- "gid": "IPGP5",
- "gp_name": "test002"
}
]
}, - "nat_addr": "",
- "nat_port": "",
- "protocol": "tcp",
- "comment": "test002",
- "src_addr_inv": 0,
- "dst_addr_inv": 0,
- "src_port": {
- "custom": [ ],
- "object": [
- {
- "type": 3,
- "gid": "PORTGP3",
- "gp_name": "test999"
}
]
}, - "dst_port": {
- "custom": [ ],
- "object": [
- {
- "type": 3,
- "gid": "PORTGP4",
- "gp_name": "test1000"
}
]
}
}{- "code": 0,
- "message": "Success"
}部分更新现有的NAT规则配置。 主要用于启用/停用规则状态。
| id required | integer <int64> >= 1 Example: 1 NAT规则ID |
部分更新数据(如启用状态)
| enabled required | string Enum: "yes" "no" 规则启用状态 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}获取所有自定义协议策略列表。 支持分页功能。
| page | integer >= 1 Default: 1 Example: page=1 页码(从1开始) |
| limit | integer >= 1 Default: 20 Example: limit=20 每页记录数 |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "comment": "",
- "name": "11",
- "class": 0,
- "appid": 1900001,
- "protocol": "udp",
- "src_addr": {
- "custom": [
- "192.168.9.168"
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "dst_addr": {
- "custom": [
- "192.168.10.168"
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "src_port": "",
- "dst_port": ""
}
]
}
}创建新的自定义协议策略。 支持配置源/目的地址、协议类型和端口,可引用IP/端口对象组。
自定义协议策略配置数据
| enabled required | string Enum: "yes" "no" 规则状态(启用/禁用) |
| comment | string <= 64 characters 备注信息,最多64个字符 |
| name required | string [ 1 .. 15 ] characters ^[\u4e00-\u9fa5a-zA-Z0-9]+$ 协议名称(仅支持中文、英文、数字,长度限制1-15字符) |
string or object (network_network_protocols_AddressFilter) | |
string or object (network_network_protocols_AddressFilter) | |
| protocol required | string Enum: "tcp" "udp" "tcp+udp" "icmp" "any" 协议类型 |
string or object (network_network_protocols_PortFilter) | |
string or object (network_network_protocols_PortFilter) | |
| class required | integer [ 0 .. 8 ] 协议分类(0-8):
|
{- "class": "0",
- "comment": "",
- "name": "11",
- "src_addr": {
- "custom": [
- "192.168.9.168"
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "dst_addr": {
- "custom": [
- "192.168.10.168"
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "protocol": "udp",
- "dst_port": {
- "custom": [
- "9000",
- "10000-20000"
], - "object": [
- {
- "gid": "PORTGP26",
- "gp_name": "ip55",
- "type": 3
}
]
}, - "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}根据ID获取单个自定义协议策略的详细信息。 需要提供有效的策略ID。
| id required | integer <int64> >= 1 Example: 1 自定义协议策略ID |
{- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "comment": "",
- "name": "11",
- "class": 0,
- "appid": 1900001,
- "protocol": "udp",
- "src_addr": {
- "custom": [
- "192.168.9.168"
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "dst_addr": {
- "custom": [
- "192.168.10.168"
], - "object": [
- {
- "type": 0,
- "gp_name": "11",
- "gid": "GPIP1"
}
]
}, - "src_port": "",
- "dst_port": ""
}
]
}
}完全更新指定自定义协议策略的配置信息。 需要提供所有字段。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 自定义协议策略ID |
完整的自定义协议策略配置数据
| enabled required | string Enum: "yes" "no" 规则状态(启用/禁用) |
| comment required | string <= 64 characters 备注信息,最多64个字符 |
| name required | string [ 1 .. 15 ] characters ^[\u4e00-\u9fa5a-zA-Z0-9]+$ 协议名称(仅支持中文、英文、数字,长度限制1-15字符) |
required | string or object (network_network_protocols_AddressFilter) |
required | string or object (network_network_protocols_AddressFilter) |
| protocol required | string Enum: "tcp" "udp" "tcp+udp" "icmp" "any" 协议类型 |
required | string or object (network_network_protocols_PortFilter) |
required | string or object (network_network_protocols_PortFilter) |
| class required | integer [ 0 .. 8 ] 协议分类(0-8):
|
{- "class": 0,
- "appid": 1900001,
- "comment": "updated",
- "name": "11",
- "protocol": "tcp",
- "src_addr": {
- "custom": [
- "192.168.9.168"
], - "object": [ ]
}, - "dst_addr": {
- "custom": [ ],
- "object": [ ]
}, - "src_port": "",
- "dst_port": {
- "custom": [
- "80"
], - "object": [ ]
}, - "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}部分更新指定自定义协议策略。 主要用于启用/停用状态切换。
| id required | integer <int64> >= 1 Example: 1 自定义协议策略ID |
部分更新数据(如启用状态)
| enabled required | string Enum: "yes" "no" 启用状态 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}获取所有IP限速规则列表。 支持分页功能。
| page | integer >= 1 Default: 1 页码(从1开始) |
| limit | integer >= 1 Default: 20 每页记录数 |
{- "code": 0,
- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "interface": "wan1",
- "protocol": "",
- "src_port": "",
- "type": 0,
- "upload": 100,
- "download": 100,
- "time": {
- "custom": [
- {
- "end_time": "10:00",
- "start_time": "00:00",
- "comment": "test11",
- "type": "weekly",
- "weekdays": "1234567"
}, - {
- "comment": "test11",
- "type": "date",
- "end_time": "2026-05-10T08:00",
- "start_time": "2026-05-01T08:00"
}
], - "object": [
- {
- "gid": "TIMEGP1",
- "type": 4,
- "gp_name": "11"
}
]
}, - "attr": 0,
- "dst_port": "",
- "tagname": "testmac_wan1",
- "comment": "",
- "id": 1,
- "enabled": "yes",
- "ip_addr": {
- "custom": [
- "192.168.9.169"
]
}
}
]
}
}创建新的IP限速规则。 支持独立和共享带宽配置,以及协议、端口、时间等高级选项。
IP限速规则配置数据
| enabled required | string Enum: "yes" "no" 规则状态 |
| comment | string <= 64 characters 备注信息,最多64个字符,不支持特殊字符 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
object 内网地址配置 | |
| type | integer Default: 0 Enum: 0 1 带宽类型(0:独立, 1:共享) |
| interface | string 外网线路选择 |
| protocol | string Default: "any" Enum: "any" "tcp" "udp" "tcp+udp" 协议类型 |
object 源端口配置(对象类型,含custom和object数组) | |
object 目的端口配置(对象类型,含custom和object数组) | |
| upload required | integer >= 0 上传带宽限制(KB/s) |
| download required | integer >= 0 下载带宽限制(KB/s) |
object 生效时间配置 | |
| attr | integer Default: 0 Enum: 0 1 属性(0:页面操作, 1:快速添加) |
{- "upload": "100",
- "download": "100",
- "comment": "",
- "enabled": "yes",
- "type": 0,
- "protocol": "any",
- "interface": "wan1",
- "ip_addr": {
- "custom": [
- "192.168.9.168"
]
}, - "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}, - {
- "type": "date",
- "start_time": "2026-05-01T08:00",
- "end_time": "2026-05-10T08:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 4,
- "gp_name": "11",
- "gid": "TIMEGP1"
}
]
}, - "tagname": "testmac_wan1"
}{- "code": 0,
- "message": "success",
- "rowid": 1
}根据ID获取单个IP限速规则的详细信息。 需要提供有效的规则ID。
| id required | integer <int64> >= 1 Example: 1 IP限速规则ID |
{- "code": 0,
- "message": "Success",
- "results": {
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "comment": "",
- "tagname": "testmac_wan1",
- "ip_addr": {
- "custom": [
- "192.168.9.168"
], - "object": [
- {
- "type": 0,
- "gp_name": "ipgroup1",
- "gid": "IPGP1"
}
]
}, - "type": 0,
- "interface": "wan1",
- "protocol": "any",
- "src_port": {
- "custom": [ ],
- "object": [ ]
}, - "dst_port": {
- "custom": [ ],
- "object": [ ]
}, - "upload": 100,
- "download": 100,
- "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 4,
- "gp_name": "11",
- "gid": "TIMEGP1"
}
]
}, - "attr": 0
}
], - "total": 1
}
}修改指定IP限速规则的配置信息。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 IP限速规则ID |
IP限速规则更新数据
| enabled required | string Enum: "yes" "no" 规则状态 |
| comment required | string <= 64 characters 备注信息,最多64个字符 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
object 内网地址配置 | |
| type required | integer Default: 0 Enum: 0 1 带宽类型(0:独立, 1:共享) |
| interface required | string 外网线路选择 |
| protocol required | string Default: "any" Enum: "any" "tcp" "udp" "tcp+udp" 协议类型 |
required | object 源端口配置(对象类型,含custom和object数组) |
required | object 目的端口配置(对象类型,含custom和object数组) |
| upload required | integer >= 0 上传带宽限制(KB/s) |
| download required | integer >= 0 下载带宽限制(KB/s) |
object 生效时间配置 |
{- "upload": "200",
- "download": "200",
- "comment": "updated",
- "enabled": "yes",
- "type": 0,
- "protocol": "any",
- "interface": "wan1",
- "ip_addr": {
- "custom": [
- "192.168.9.169"
]
}, - "src_port": {
- "custom": [ ],
- "object": [ ]
}, - "dst_port": {
- "custom": [ ],
- "object": [ ]
}, - "tagname": "testmac_wan1_updated"
}{- "code": 0,
- "message": "success"
}部分修改指定IP限速规则的配置信息。 只更新提供的字段。
| id required | integer <int64> >= 1 Example: 1 IP限速规则ID |
IP限速规则部分更新数据
| enabled required | string Enum: "yes" "no" 规则启用状态,yes为启用,no为停用 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "success"
}获取所有MAC限速规则列表。 支持分页功能。
| page | integer >= 1 Default: 1 页码(从1开始) |
| limit | integer [ 1 .. 1000 ] Default: 20 每页记录数 |
{- "code": 0,
- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "enabled": "yes",
- "upload": 100,
- "tagname": "testmac_wan1",
- "comment": "",
- "mac_addr": {
- "custom": [
- "08:9b:4b:00:10:6e"
], - "object": [
- {
- "type": 2,
- "gid": "MACIP1",
- "gp_name": "22"
}
]
}, - "ip_type": "4",
- "time": {
- "custom": [
- {
- "end_time": "20:00",
- "comment": "test11",
- "weekdays": "1234567",
- "type": "weekly",
- "start_time": "00:00"
}, - {
- "comment": "test11",
- "end_time": "2026-05-10T08:00",
- "type": "date",
- "start_time": "2026-05-01T08:00"
}
], - "object": [
- {
- "type": 4,
- "gid": "TIMEGP1",
- "gp_name": "11"
}
]
}, - "type": 0,
- "attr": 0,
- "download": 100,
- "interface": "wan1",
- "id": 1
}
]
}
}创建新的MAC限速规则。 支持独立和共享带宽配置,以及IPv4/IPv6协议类型选择。
MAC限速规则配置数据
| enabled required | string Enum: "yes" "no" 规则状态 |
| comment | string <= 64 characters 备注信息,最多64个字符,不支持特殊字符 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| ip_type | string Enum: "4" "6" IP协议类型(4:IPv4, 6:IPv6),默认空代表IPv4 |
object MAC地址配置 | |
| type | integer Default: 0 Enum: 0 1 带宽类型(0:独立, 1:共享),默认空代表独立限速 |
| interface | string 外网线路选择 |
| upload required | integer >= 0 上传带宽限制(KB/s) |
| download required | integer >= 0 下载带宽限制(KB/s) |
object 生效时间配置 |
{- "upload": "100",
- "download": "100",
- "comment": "",
- "enabled": "yes",
- "ip_type": "4",
- "interface": "wan1",
- "mac_addr": {
- "custom": [
- "08:9b:4b:00:10:6e"
], - "object": [
- {
- "type": 2,
- "gp_name": "22",
- "gid": "MACIP1"
}
]
}, - "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}, - {
- "type": "date",
- "start_time": "2026-05-01T08:00",
- "end_time": "2026-05-10T08:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 4,
- "gp_name": "11",
- "gid": "TIMEGP1"
}
]
}, - "tagname": "testmac_wan1"
}{- "code": 0,
- "message": "success",
- "rowid": 1
}根据ID获取单个MAC限速规则的详细信息。 需要提供有效的规则ID。
| id required | integer <int64> >= 1 Example: 1 MAC限速规则ID |
{- "code": 0,
- "message": "Success",
- "results": {
- "data": [
- {
- "id": 1,
- "enabled": "yes",
- "tagname": "testmac_wan1",
- "comment": "",
- "mac_addr": {
- "custom": [
- "08:9b:4b:00:10:6e"
], - "object": [
- {
- "type": 2,
- "gp_name": "22",
- "gid": "MACIP1"
}
]
}, - "type": 0,
- "ip_type": "4",
- "interface": "wan1",
- "upload": 100,
- "download": 100,
- "time": {
- "custom": [
- {
- "type": "weekly",
- "weekdays": "1234567",
- "start_time": "00:00",
- "end_time": "20:00",
- "comment": "test11"
}
], - "object": [
- {
- "type": 4,
- "gp_name": "11",
- "gid": "TIMEGP1"
}
]
}, - "attr": 0
}
], - "total": 1
}
}修改指定MAC限速规则的配置信息。 支持完整更新。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer <int64> >= 1 Example: 1 MAC限速规则ID |
MAC限速规则更新数据
| enabled required | string Enum: "yes" "no" 规则状态 |
| comment required | string <= 64 characters 备注信息,最多64个字符 |
| tagname required | string [ 1 .. 15 ] characters 名称,支持中文、英文、数字、下划线和连字符,1-15个字符,不能以下划线或连字符开头 |
| ip_type | string Enum: "4" "6" IP协议类型(4:IPv4, 6:IPv6) |
required | object MAC地址配置 |
| type | integer Default: 0 Enum: 0 1 带宽类型(0:独立, 1:共享) |
| interface required | string 外网线路选择 |
| upload required | integer >= 0 上传带宽限制(KB/s) |
| download required | integer >= 0 下载带宽限制(KB/s) |
object 生效时间配置 |
{- "upload": "200",
- "download": "200",
- "comment": "updated",
- "enabled": "yes",
- "ip_type": "4",
- "interface": "wan1",
- "mac_addr": {
- "custom": [
- "08:9b:4b:00:10:6f"
]
}, - "tagname": "testmac_wan1_updated"
}{- "code": 0,
- "message": "success"
}启用或停用指定MAC限速规则。 仅支持修改 enabled 字段,传 yes 为启用,传 no 为停用。
| id required | integer <int64> >= 1 Example: 1 MAC限速规则ID |
MAC限速规则启用/停用数据
| enabled required | string Enum: "yes" "no" 规则启用状态,yes为启用,no为停用 |
{- "enabled": "yes"
}{- "code": 0,
- "message": "success"
}查询VLAN接口配置列表,支持分页、关键字模糊匹配和字段过滤。
| limit | integer >= 1 Example: limit=10 每页返回记录数 |
| page | integer >= 1 Example: page=1 页码(从1开始) |
| key | string Example: key=vlan_name 模糊搜索字段名(如 vlan_name、tagname、interface) |
| pattern | string Example: pattern=vlan100 模糊搜索关键词(与key配合使用) |
| filter | string Example: filter=enabled==yes 精确过滤条件,支持以下格式:
|
{- "code": 0,
- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "vlan_id": "1001",
- "vlan_name": "vlan1001",
- "interface": "lan1",
- "mac": "",
- "ip_addr": "192.168.88.1",
- "ip_addr_int": 3232258049,
- "netmask": "255.255.255.255",
- "ip_mask": "",
- "enabled": "yes",
- "comment": ""
}
]
}
}创建一个新的VLAN接口。
| vlan_id required | string VLAN ID(1-4094) |
| vlan_name required | string <= 15 characters VLAN接口名称(以vlan开头) |
| interface required | string <= 50 characters 所属物理接口(LAN口) |
| mac | string <= 17 characters MAC地址(空字符串表示不设置) |
| ip_addr | string <ipv4> VLAN接口IP地址 |
| netmask required | string <ipv4> 子网掩码 |
| ip_mask | string 扩展IP输入,格式:192.168.88.1/255.255.255.0,192.168.89.2/255.255.255.0 |
| enabled required | string Default: "yes" Enum: "yes" "no" 是否启用 |
| comment | string <= 64 characters 备注信息,最多64个字符 |
{- "vlan_id": "1001",
- "vlan_name": "vlan1001",
- "interface": "lan1",
- "mac": "",
- "ip_addr": "192.168.88.1",
- "netmask": "255.255.255.255",
- "ip_mask": "",
- "enabled": "yes",
- "comment": ""
}{- "code": 0,
- "message": "Success",
- "results": {
- "id": 1
}
}根据ID查询单个VLAN接口的配置详情。
| id required | integer >= 1 Example: 1 VLAN记录ID |
{- "code": 0,
- "message": "Success",
- "results": {
- "total": 1,
- "data": [
- {
- "id": 1,
- "vlan_id": "1001",
- "vlan_name": "vlan1001",
- "interface": "lan1",
- "mac": "",
- "ip_addr": "192.168.88.1",
- "ip_addr_int": 3232258049,
- "netmask": "255.255.255.255",
- "ip_mask": "",
- "enabled": "yes",
- "comment": ""
}
]
}
}更新指定ID的VLAN接口配置。
注意: 本接口为全量修改,请求时需传入所有字段。无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
| id required | integer >= 1 Example: 1 VLAN记录ID |
| vlan_id required | string VLAN ID(1-4094) |
| vlan_name required | string <= 15 characters VLAN接口名称(以vlan开头) |
| interface required | string <= 50 characters 所属物理接口(LAN口) |
| mac required | string <= 17 characters MAC地址(空字符串表示不设置) |
| ip_addr required | string <ipv4> VLAN接口IP地址 |
| netmask required | string <ipv4> 子网掩码 |
| ip_mask required | string 扩展IP输入,格式:192.168.88.1/255.255.255.0,192.168.89.2/255.255.255.0 |
| enabled required | string Enum: "yes" "no" 是否启用 |
| comment required | string <= 64 characters 备注信息,最多64个字符 |
{- "vlan_id": "1001",
- "vlan_name": "vlan1001",
- "interface": "lan1",
- "mac": "",
- "ip_addr": "192.168.88.1",
- "netmask": "255.255.255.255",
- "ip_mask": "",
- "enabled": "yes",
- "comment": ""
}{- "code": 0,
- "message": "Success"
}切换指定VLAN接口的启用状态。
| id required | integer >= 1 Example: 1 VLAN记录ID |
| enabled required | string Enum: "yes" "no" 启用状态 (yes=启用, no=停用) |
{- "enabled": "yes"
}{- "code": 0,
- "message": "Success"
}查询所有WAN接口的配置信息,包括接口名称、接入模式、绑定网卡、 PPPoE/DHCP/静态IP参数、线路检测、定时重启、LTE拨号及多拨助手等配置。
{- "message": "Success",
- "results": {
- "data": [
- {
- "id": 1,
- "name": "wan1",
- "tagname": "wan1",
- "comment": "",
- "bandmode": 0,
- "internet": 3,
- "mac": "",
- "speed": 0,
- "duplex": 0,
- "upload": 0,
- "download": 0,
- "qos_upload": 1000,
- "qos_download": 1000,
- "vendorclass": "",
- "clientid": "",
- "hostname": "",
- "opt_type12": 0,
- "opt_type60": 0,
- "opt_type61": 0,
- "wifi_wisp": 1,
- "wifi_bssid": "",
- "wifi_ssid": "",
- "wifi_psk": "",
- "ip_mask": "",
- "gateway": "",
- "username": "",
- "password": "",
- "timing_rst_switch": 0,
- "timing_rst_week": "1234567",
- "timing_rst_time": "12:00",
- "cycle_rst_time": 0,
- "pppoe_service": "",
- "pppoe_ac": "",
- "mtu": 1480,
- "mru": 1480,
- "default_route": 0,
- "disc_auto_switch": 1,
- "link_time": "00:00-23:59",
- "check_link_mode": 3,
- "check_link_host": "www.baidu.com",
- "qos_switch": 1,
- "enable_ipv6": 0,
- "linkmode": 0,
- "policy": 1,
- "lte_service": "umts_gprs",
- "lte_mode": "auto",
- "lte_apn": "3gnet",
- "lte_dialnum": "*99#",
- "lte_pincode": "",
- "lte_antenna_switch": 0,
- "bandlist_5g": "1,3,5,8,28,41,77,78,79",
- "sim_switch": 0,
- "pppoe_ass_switch": 0,
- "ass_multi_total": 10,
- "ass_disc_rst_switch": 0,
- "ass_rst_check_week": "1234567",
- "ass_rst_check_time": "00:00-08:00",
- "ass_rst_check_interval": 10,
- "ass_rst_disc_num": 5,
- "ass_rst_disc_norestart": 0,
- "ass_check_errip_switch": 0,
- "ass_check_errip_list": "10,172,192.168",
- "pppoe_check_errip_switch": 0,
- "pppoe_check_errip_list": "10,172,192.168",
- "vlan_internet_info": "2,0,0",
- "pppoe_ip_addr": "",
- "pppoe_netmask": "",
- "pppoe_gateway": "",
- "pppoe_updatetime": 0,
- "pppoe_dns1": "",
- "pppoe_dns2": "",
- "pppoe_macremote": "",
- "pppoe_status": 0,
- "dhcp_ip_addr": "",
- "dhcp_netmask": "",
- "dhcp_gateway": "",
- "dhcp_updatetime": 0,
- "dhcp_dns1": "",
- "dhcp_dns2": "",
- "dhcp_lease": 0,
- "dhcp_status": 0,
- "modified_time": 1772161919,
- "bandif": "00:e2:69:00:89:e8",
- "bandeth": "eth3"
}
]
}
}更新指定WAN接口的配置。本接口为全量修改,请求时需传入所有字段。 无需修改的字段请保持原值或传空值,未传入的字段可能被重置。
参数按 internet 接入模式分组:
| id required | integer <int64> >= 1 Example: 1 WAN接口ID |
| internet required | integer Enum: 0 1 2 3 4 接入模式(0=静态IP, 1=DHCP, 2=ADSL/PPPoE, 3=基于物理网卡混合模式, 4=基于VLAN混合模式) |
| bandif required | string 绑定网卡MAC地址,多个以逗号分隔 |
| bandmode required | integer Enum: 0 1 绑定模式(0=网桥, 1=汇聚) |
| mac | string <= 17 characters 克隆MAC地址,空字符串表示不克隆 |
| speed | integer Enum: 0 10 100 1000 10000 网卡速率(0=自动, 10/100/1000/10000 Mbps) |
| duplex | integer Enum: 0 1 2 工作模式(0=自动, 1=全双工, 2=半双工) |
| comment | string <= 64 characters 备注信息,最多64字符 |
| default_route required | integer Enum: 0 1 是否设置为默认路由(0=否, 1=是) |
| disc_auto_switch required | integer Enum: 0 1 掉线自动切换(0=关闭, 1=开启) |
| link_time required | string <= 11 characters 上线时间段,格式:HH:MM-HH:MM |
| check_link_mode required | integer Enum: 0 1 2 3 4 5 6 线路检测模式(0=关闭, 1=HTTP+网关, 2=PING+网关, 3=HTTP+PING+网关, 4=HTTP, 5=PING, 6=HTTP+PING) |
| check_link_host | string <= 200 characters 线路检测主机地址 |
| ip_mask required | string 静态IP地址和子网掩码,格式:IP/掩码,如 192.168.1.1/255.255.255.0 |
| gateway required | string 静态IP网关 |
{- "internet": 0,
- "bandif": "00:e2:69:00:89:e8",
- "bandmode": 0,
- "mac": "",
- "speed": 0,
- "duplex": 0,
- "comment": "",
- "default_route": 1,
- "disc_auto_switch": 1,
- "link_time": "00:00-23:59",
- "check_link_mode": 3,
- "check_link_host": "www.baidu.com",
- "ip_mask": "192.168.1.100/255.255.255.0",
- "gateway": "192.168.1.1"
}{- "code": 0,
- "message": "success"
}查询基于WAN接口的混合模式配置信息,包括基于物理网卡的混合模式 和基于VLAN的混合模式。包含VLAN名称、接入模式、PPPoE/DHCP/静态IP 参数、线路检测等配置。 当WAN接口配置中 internet=3(基于物理网卡的混合模式)或 internet=4(基于VLAN的混合模式)时使用此接口查询详细配置。
{- "message": "Success",
- "results": {
- "vlan_data": [
- {
- "id": 3,
- "interface": "wan1",
- "vlan_name": "vwan666",
- "vlan_id": "3",
- "vlan_internet": 0,
- "enabled": "yes",
- "comment": "",
- "mac": "00:71:6f:a6:0c:2d",
- "upload": 0,
- "download": 0,
- "qos_upload": 0,
- "qos_download": 0,
- "vendorclass": "",
- "clientid": "",
- "hostname": "",
- "opt_type12": 0,
- "opt_type60": 0,
- "opt_type61": 0,
- "ip_mask": "192.168.3.220/255.255.255.0",
- "gateway": "192.168.3.253",
- "dhcp_gateway": "",
- "dhcp_dns1": "",
- "dhcp_dns2": "",
- "username": "",
- "password": "",
- "timing_rst_switch": 0,
- "timing_rst_week": "1234567",
- "timing_rst_time": "12:00",
- "cycle_rst_time": 0,
- "pppoe_service": "",
- "pppoe_ac": "",
- "mtu": 1480,
- "mru": 1480,
- "default_route": 1,
- "disc_auto_switch": 0,
- "link_time": "00:00-23:59",
- "check_link_mode": 1,
- "check_link_host": "www.baidu.com",
- "qos_switch": 0,
- "pppoe_check_errip_switch": 0,
- "pppoe_check_errip_list": "10,172,192.168",
- "dhcp_lease": 0,
- "dhcp_updatetime": 0,
- "dhcp_netmask": "",
- "dhcp_ip_addr": "",
- "pppoe_macremote": "",
- "pppoe_dns1": "",
- "pppoe_dns2": "",
- "pppoe_updatetime": 0,
- "pppoe_gateway": "",
- "pppoe_netmask": "",
- "pppoe_ip_addr": ""
}
]
}
}