getPortForwardingList.lua
[返回首页]

API说明

Get port forwarding list

Get all configured port forwarding list.

参数

HTTP提交参数:GET; POST

通过HTTP测试该API调用 (URL):

NONE

返回

返回JSON格式的结果。该JSON数据的格式如下:

{
/*对象*/

"Result":
数值

200表示OK, 其它错误码含义类似于HTTP Response.

"Status":
"字符串"

状态消息。反馈API执行的结果状态,如有错误,将描述出错的原因。

"Data": [
/*数组*/

The port forwarding list, each item is a JSON object

{
/*对象*/

"Status":
"字符串"

The port forwarding work status:

running

Normal case, port forwarding task is running.

idle

For some reason, the port forwarding task is not started. This is an abnormal case, you can assume this is an error.

error

Port forwarding start failed.

restart

The port forwarding task is terminated (since an exception) but now is restarting.

terminated

The port forwarding task is terminated since it's destroied.

"Protocol":
"字符串"

Forward protocol type, 'tcp' or 'udp'.

"Listen":
"字符串"

Device local listen address and port, the format is "address:port". Which address can be '*', that means listen at any network interface.

"__Port":
整数

The listening port extracted from "Listen", for alternative using.

"Target":
"字符串"

Forward to network target, format is "address:port", wich address can be a domain name, i.e. 'www.google.com'.

"Over":
"字符串"

The data forwarding over which device's network interface. You can get all valid network interfaces by getNetInterface.lua

"MaxPacketSize":
整数

The maximum packet size for data transmission, in KB.

"SocketRxBuffer":
整数

Socket receiving buffer size, in KB.

"SocketTxBuffer":
整数

Socket sending buffer size, in KB.

}
]
}

其它说明

Device HTTP API, v1.0