API 路径:/api/net
开启:i=tc_rules&enable=enable 关闭:i=tc_rules&enable=disable
API 路径:/api/config
参数:i=tc_rules
返回数据:
{
"ENABLE":"no", ## 启用状态(yes/no)
"data":[
{
"active":"yes", # 规则激活状态(yes/no)
"alarm_duration":"60", # 警戒触发时长
"alarm_rate":"512", # 警戒速度
"desc":"测试", # 备注
"direction":"upload", # 数据流向(upload=上行,download=下行)
"id":1, # 规则序号
"mode":"each", # 带宽使用模式(each=独占带宽,share=共享带宽)
"name":"上传限速", # 规则名称
"policy_type":"ai", # 限速类型(normal=普通限速,ai=智能限速)
"prio":"1", # 优先级
"proto":"all", # 协议类型(tcp/udp/all)
"pulish_rate":"200", # 惩罚速度
"pulish_time":"300", # 惩罚时长
"rate":"1024", # 最大限速
"target":"192.168.201.0/24" # 限速对象
},
...
],
"page":1,
"pages":1,
"pmax":0,
"total":2 # 记录条数
}
API 路径:/api/net
参数:
i: tc_rules new: 1 # 新增规则时传递 oldname: 旧规则名 # 修改规则且规则改名时传递 1.2 中data部分的其他字段
API 路径:/api/net
参数:
i: tc_rules
target: 规则名 # 多个用逗号分隔
o: deactive # 禁用
active # 激活
del # 删除
API 路径:/api/net
开启:i=flowlimit_rules&enable=enable 关闭:i=flowlimit_rules&enable=disable
API 路径:/api/config
参数:i=flowlimit_rules
返回数据:
{
"ENABLE":"no", ## 启用状态(yes/no)
"data":[
{
"_d_total_bytes":1853151249, # 累计下行流量(字节)
"_d_total_pkts":1063039, # 累计下行包数量
"_u_total_bytes":34726958, # 累计上行流量(字节)
"_u_total_pkts":557291, # 累计上行包数量
"active":"yes", # 规则激活状态(yes/no)
"d_total_bytes":"1.73 GB", # 累计下行流量(格式化后)
"d_total_pkts":"1.06M", # 累计下行包数量(格式化后)
"desc":"测试", # 备注
"id":2,
"monthly_down":"1G", # 月度总下行流量
"monthly_up":"2G", # 月度总上行流量
"name":"192.168.201.84", # 名称(目标IP)
"over_action":"limit", # 超出流量后的动作(limit=限速,drop=禁止上网)
"over_limit_down":"200", # 超出流量后的下行限速(KByte/s)
"over_limit_up":"100", # 超出流量后的上行限速(KByte/s)
"u_total_bytes":"33.12 MB", # 累计上行流量(格式化后)
"u_total_pkts":"0.56M", # 累计上行包数量(格式化后)
"usage_down":"17.3", # 下行流量使用率(%)
"usage_up":"1.6" # 上行流量使用率(%)
},
...
],
"page":1,
"pages":1,
"pmax":0,
"total":2 # 记录条数
}
API 路径:/api/net
参数:
i: flowlimit_rules new: 1 # 新增规则时传递 oldname: 旧规则名 # 修改规则且规则改名时传递 2.2 中data部分的其他字段
API 路径:/api/net
参数:
i: flowlimit_rules
target: 规则名 # 多个用逗号分隔
o: deactive # 禁用
active # 激活
del # 删除
Copyright © 2014-2020 版权所有 (MoreQuick Networs Co., Ltd. All rights reserved)
本系统由 秒开 iRouter &
在阿里云上强力驱动