3 Network Function Class
3 Network Function Class
3.1 Network interfaces
Note: There may be parts of this category of interface settings that have been implemented that need to take effect (/general/apply_do).
3.1.1 WAN network configuration /net_wan/set
Note: This interface needs to be in effect after setting up.
Note: When performing macaddr cloning, please set isclonemac to 1, otherwise the setting will not be successful. After exporting the configuration of the successfully cloned macaddr, the macaddr will be set when restoring the configuration.
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
ip6enable | string | N | 0 | Enable ipv6 Format: 1 yes, 0 no (default) | 240326 |
proto | string | Y | – | Format: dhcp, static, pppoe | 240123 |
ipaddr | string | N/Y | – | static=REQ_Y IP address ip6enable=0 Format: IPv4 address, length 1-15; ip6enable=1 Format: IPv6 address, length 2-39 | 240123 |
netmask | string | N/Y | – | static=REQ_Y Subnet mask Format: IPv4 address, length 1-15 | 240123 |
gateway | string | N/Y | – | static=REQ_Y gateway ip6enable=0 Format: IPv4 address, length 1-15; ip6enable=1 Format: IPv6 address, length 2-39 | 240123 |
username | string | N/Y | – | pppoe=REQ_Y Account number Format: length 1-64 | 240123 |
password | string | N/Y | – | pppoe=REQ_Y Password format: length 1-64 | 240123 |
ac | string | N | Empty | pppoe=REQ_Y Access Concentrator Format: length 0-64 | 240123 |
service | string | N | Empty | pppoe=REQ_Y Service provider name Format: length 0-64 | 240123 |
peerdns | string | N | 1 | Remote DNS allowed Format: 1 allowed (default), 0 not allowed | 240123 |
dns | string | N | Empty | Fixed DNS, multi-DNS space-separated Format: length 0-64 ip6enable=0 Single dns format: IPv4 address, length 1-15; ip6enable=1 Single dns format: IPv6 address, length 2-39 | 240123 |
macaddr | string | N | Empty | MAC address cloning Format: MAC address, length 0 (not set)/17 (new MAC) | 240123 |
isclonemac | string | N | 0 | Enable MAC address cloning Format: 1 yes, 0 no (default) | 240123 |
management_access | string | N | 1 | Management access restrictions Format: 1 WAN and MGT (default), 0 MGT | 240123 |
vendorid | string | N | Empty | Set the vendorid that OPT 60 sends to the server Format: length 0-64 | 240123 |
ip6subnetprefixlength | string | N/Y | Empty | ip6enable=REQ_Y IPv6 subnet prefix length Range 0-128 | 240326 |
Server→Client Response
Request Example
Post:/controller/net_wan/set
Host:172.16.6.79
Raw:{"assign_netmask":"255.255.255.0","assign_ip6subnetprefixlength":"","assign_gateway":"172.16.6.1","assign_dns":"","dhcp_expire_time":"","proto":"static","peerdns":"1","netmask":"255.255.255.0","username":"","password":"","ac":"","service":"","dns":"","isclonemac":"0","management_access":"1","ip6enable":"0","ipaddr":"172.16.6.124","gateway":"172.16.6.1","ip6subnetprefixlength":"","assign_ipaddr":"172.16.6.124","macaddr":"a0:e1:c5:f8:90:f0","vendorid":"iad","token":"182e2aafc911a752653f20ff2a60c00b"}
Response Example
{
"uri": "net_wan/set",
"msg": "",
"code": 200,
"data": []
}
3.1.2 WAN network get /net_wan/get
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
Reference /net_wan/set | ||||
assign_ipaddr | string | Dynamic data, current IP address | ||
assign_netmask | string | Dynamic data, current subnet mask | ||
assign_gateway | string | Dynamic data, current gateway | ||
assign_dns | string | Dynamic data, current DNS | ||
dhcp_expire_time | string | Dynamic data, current dhcp failure time (seconds) | ||
assign_ip6subnetprefixlength | string | Dynamic data, current IP6 subnet prefix length | 240326 |
Request Example
Post:/controller/net_wan/get
Host:172.16.6.79
Raw:{"token":"bdbafa6fe23da1fe4838c3779b79dfdf"}
Response Example
{
"uri": "net_wan/get",
"msg": "",
"code": 200,
"data": {
"assign_netmask": "255.255.255.0",
"assign_ip6subnetprefixlength": "",
"assign_gateway": "172.16.6.1",
"assign_dns": "172.16.188.5",
"dhcp_expire_time": "",
"proto": "static",
"peerdns": "1",
"netmask": "255.255.255.0",
"username": "",
"password": "",
"ac": "",
"service": "",
"dns": "172.16.188.5",
"isclonemac": "0",
"management_access": "1",
"ip6enable": "0",
"ipaddr": "172.16.6.79",
"gateway": "172.16.6.1",
"ip6subnetprefixlength": "",
"assign_ipaddr": "172.16.6.79",
"macaddr": "ff:ff:ff:00:00:00",
"vendorid": ""
}
}
3.1.3 LAN network configuration /net_lan/set
- Note: devices with platform as netbus should not support this interface, remember!!!!
- Note: This interface needs to be in effect after setting up.
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
ipaddr | string | Y | – | IP address Format: IPv4 address | 240418 |
netmask | string | Y | – | Subnet mask Format: IPv4 address | 240418 |
Server→Client Response
Request Example
Post:/controller/net_lan/set
Host:172.16.6.79
Raw:{"token":"bdbafa6fe23da1fe4838c3779b79dfdf","ipaddr":"172.16.6.79"}
Response Example
{
"uri": "net_lan/set",
"msg": "",
"code": 200,
"data": {}
}
3.1.4 LAN network get /net_lan/get
Client→Server Request
Server→Client Response
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
Reference /net_lan/set | 240418 |
Request Example
Post:/controller/net_lan/get
Host:172.16.6.79
Raw:{"token":"bdbafa6fe23da1fe4838c3779b79dfdf"}
Response Example
{
"uri": "net_lan/get",
"msg": "",
"code": 200,
"data": {
"ipaddr": "117.103.92.1",
"netmask": "255.255.252.0"
}
}
3.1.5 MGT network configuration /net_mgt/set
Note: This interface needs to be in effect after setting up.
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
disabled | string | Y | – | mgt port disabled Format: 0 no, 1 yes | 240319 |
proto | string | Y | – | Network protocol type Format: dhcp, static | 240319 |
ipaddr | string | N/Y | – | static=REQ_Y, IP address Format: IPv4 address, length 1-15; wan port ip6enable=1 Format: IPv6 address, length 2-39 | 240614 |
netmask | string | N/Y | – | static=REQ_Y, subnet mask Format: IPv4 address, length 1-15; wan port ip6enable=1, not valid | 240319 |
gateway | string | N | – | Gateway Format: IPv4 address, length 0-15; wan port ip6enable=1 Format: IPv6 address, length 0-39 | 240614 |
peerdns | string | N | 1 | Remote DNS allowed Format: 1 allowed, 0 not allowed | 240319 |
dns | string | N | unoccupied | Fixed DNS address, multiple DNS separated by spaces Format: length 0-64 | 240319 |
ip6subnetprefixlength | string | N/Y | unoccupied | wan port ip6enable=REQ_Y IPv6 subnet prefix length Range 0-128 | 240614 |
Server→Client Response
Request Example
Post:/controller/net_mgt/set
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238","disabled":"0","proto":"static","ipaddr":"172.16.6.80","netmask":"255.255.255.0","gateway":"172.16.6.1"}
Response Example
{ "uri": "net_mgt/set", "msg": "", "code": 200, "data": [] }
3.1.6 MGT network get /net_mgt/get
Client→Server Request
Server→Client Response
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
Reference /net_mgt/set | 240319 | ||||
assign_ipaddr | string | Dynamic data, current IP address | 240319 | ||
assign_netmask | string | Dynamic data, current subnet mask | 240319 | ||
assign_gateway | string | Dynamic data, current gateway | 240319 | ||
assign_dns | string | Dynamic data, current DNS | 240319 | ||
dhcp_expire_time | string | Dynamic data, current dhcp failure time (seconds) | 240319 |
Request Example
Post:/controller/net_mgt/get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{ "uri": "net_mgt/get",
"msg": "",
"code": 200,
"data": { "assign_netmask": "255.255.255.0", "assign_gateway": "172.16.6.1", "assign_dns": "", "dhcp_expire_time": "", "disabled": "0", "proto": "static", "peerdns": "1", "netmask": "255.255.255.0", "dns": "", "ip6enable": "0", "ipaddr": "172.16.6.80", "gateway": "172.16.6.1", "ip6subnetprefixlength": "", "assign_ipaddr": "172.16.6.80" } }
3.1.7 VLAN PRIORITY configuration /net_vlan/set
Note: This interface needs to be in effect after setting up.
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
wan_vlanid | int | N | 0 | Layer 2 QoS 802.1Q/VLAN tagging on WAN port, format: 0, 3-4094, 1,2 for internal system use | 240417 |
wan_signaling_priority | int | N | 0 | Layer 2 SIP signalling QoS 802.1p priority, format: 0-7 | 240417 |
wan_media_priority | int | N | 0 | Layer 2 voice QoS 802.1p priority, format: 0-7 | 240417 |
mgt_vlanid | int | N | 0 | Layer 2 QoS 802.1Q/VLAN tagging for mgt port, format: 0, 3-4094, 1,2 for internal system use | 240417 |
mgt_priority | int | N | 0 | Layer 2 QoS 802.1p priority, format: 0-7 | 240417 |
Server→Client Response
Request Example
Post:/controller/net_vlan/set
Host:172.16.6.79
Raw:{ "token": "6deea3c12ddc8526ec0ac1436d0f06c9","wan_vlanid":3,"wan_signaling_priority":2,"mgt_vlanid":5}
Response Example
{ "uri": "net_vlan/set", "msg": "", "code": 200, "data": [] }
3.1.8 VLAN PRIORITY configuration get /net_vlan/get
Client→Server Request
Server→Client Response
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
References /net_vlan/set | 240417 |
Request Example
Post:/controller/net_vlan/get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{ "uri": "net_vlan/get",
"msg": "",
"code": 200,
"data": {
"wan_vlanid": 3,
"wan_signaling_priority": 2,
"wan_media_priority": 0,
"mgt_vlanid": 5,
"mgt_priority": 0 } }
3.2 Network routing
Note: route means route and router means router function are not one and the same.
3.2.1 Static Route Configuration /net_route/set
Note: This interface needs to be in effect after setting up.
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
routes | array | N | – | Format [{ROUTEKV}…]. , refer to “ROUTEKV”. | 240423 |
ROUTEKV | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
interface | string | N | wan | Interface interface (basic, logical) Format: wan lan vpn1 | 240423 |
target | string | Y | – | Destination IP address Format: IPv4 address | 240423 |
netmask | string | Y | – | Subnet Mask Format: Subnet Mask (IPv4 Address) | 240423 |
gateway | string | N | unoccupied | Via gateway Format: IP address, empty | 240423 |
metric | int | N | 0 | Number of Leap Points Format: 0-1024 | 240423 |
Server→Client Response
Request Example
Post:/controller/net_route/set
Host:172.16.6.79
Raw:{ "token": "b100bbc3d59b5cb4ac077e23696a80c6","routes":[{"interface":"wan","target":"192.168.6.10","netmask":"255.255.255.0","gateway":"192.168.6.1"}]}
Response Example
{ "uri": "net_route/set", "msg": "", "code": 200, "data": [] }
3.2.2 Static route acquisition /net_route/get
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
References /net_route/set | 240423 |
Request Example
Post:/controller/net_route/get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{ "uri": "net_route/get", "msg": "", "code": 200, "data": { "routes": [ { "interface": "wan", "target": "192.168.6.10", "netmask": "255.255.255.0", "gateway": "192.168.6.1", "metric": "0" }]}}
3.3 Service functions
3.3.1 DHCP service configuration /net_dhcp/set
- Note: Devices with platform as netbus should not support this interface call, remember!
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
start | int | N | 100 | Starting IP address Format: 1-500 | 240412 |
limit | int | N | 150 | Maximum number of allocations Format: 1-500 | 240412 |
leasetime | string | N | 12h | Rental time Format: (1-1000)h | 240412 |
ignore | int | N | 0 | Disabling services for LAN Format: 0 (not disabled) 1 (disabled) | 240412 |
Server→Client Response
Request Example
Post:/controller/net_dhcp/set
Host:172.16.6.79
Raw:{ "token": "272aa2fef92ee592f62c27e163f405f5","start":"192.168.6.2","limit":10,"leasetime":2}
Response Example
{ "uri": "net_dhcp/set", "msg": "", "code": 200, "data": [] }
3.3.2 DHCP Service Get /net_dhcp/get
Client→Server Request
Server→Client Response
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
References /net_dhcp/set | 240412 |
Request Example
Post:/controller/net_dhcp/get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{ "uri": "net_dhcp/get", "msg": "", "code": 200, "data": { "start": 192, "limit": 10, "leasetime": "12h", "ignore": 1 } }
3.3.3 Setting the domain name resolution list /net_dhcp/dns_set
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
lists | array | N | – | Format [{RULESKV}…]. , refer to “RULESKV”. | 240412 |
RULESKV | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
domain | string | Y | – | Domain name Format: 1-63 characters | 240412 |
parse_ip | string | Y | – | Parse IP Format: IPv4 address | 240412 |
Server→Client Response
Request Example
Post:/controller/net_dhcp/dns_set
Host:172.16.6.79
Raw:{"lists":[{"domain":"test.com","parse_ip":"1.1.1.1"}],"token":"a357124e14551fc1c8ebb393d15d3006"}
Response Example
{ "uri": "net_dhcp/dns_set", "msg": "", "code": 200, "data": [] }
3.3.4 Getting the domain name resolution list /net_dhcp/dns_get
Client→Server Request
Server→Client Response
RULESKV | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
References /net_dhcp/dns_set | 240412 |
Request Example
Post:/controller/net_dhcp/dns_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{ "uri": "net_dhcp/dns_get", "msg": "", "code": 200, "data": { "lists": [ { "domain": "test.com", "parse_ip": "1.1.1.1" } ] } }d
3.4 Firewalls
3.4.1 Basic Settings /net_firewall/set (incomplete)
3.4.2 Basic get /net_firewall/get (incomplete)
3.4.3 Transmission Rule Setting /net_firewall/rule_set
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
rules | array | N | – | Format [{RULESKV}…]. , refer to “RULESKV”. | 240422 |
RULESKV | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
name | string | N | unoccupied | Name Format: 0-32 characters | 240422 |
proto | string | N | tcp | Protocol Format: tcp udp icmp igmp all | 240422 |
src | string | N | unoccupied | Source network domain Format: wan lan mgt empty (not specified) | 240422 |
src_ip | string | N | unoccupied | Source IP or source network Format: IP address or IP/CIDR, nullable, length 0-32 | 240422 |
src_port | string | N | unoccupied | Source port Format: Single port 1-65536 Multiple ports (1-65536):(1-65536) | 240422 |
dest | string | N | unoccupied | Target network domain Format: wan lan mgt empty (not specified) | 240422 |
dest_ip | string | N | unoccupied | Destination IP or destination network Format: IP address or IP/CIDR, nullable, length 0-32 | 240422 |
dest_port | string | N | unoccupied | Destination port Format: single port 1-65536 Multiple ports (1-65536):(1-65536) | 240422 |
target | string | N | ACCEPT | Rule Action Format: ACCEPT REJECT DROP | 240422 |
enabled | int | N | 1 | Switch Format: 0 (off), 1 (on) | 240422 |
Server→Client Response
Request Example
Post:/controller/net_firewall/rule_set
Host:172.16.6.79
Raw:{"rules":[{"name":"http","proto":"tcp","src":"wan","src_ip":"","src_port":"80","dest":"","dest_ip":"","dest_port":"","target":"ACCEPT","enabled":1,"icmp_type":""}],"token":"39a77f6e1f606d46fa641120e9018b8b"}
Response Example
{ "uri": "net_firewall/rule_set", "msg": "", "code": 200, "data": [] }
3.4.4 Transport Rule Get /net_firewall/rule_get
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
References /net_firewall/rule_set | 240422 |
Request Example
Post:/controller/net_firewall/rule_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{ "uri": "net_firewall/rule_get", "msg": "", "code": 200, "data": { "rules": [ { "name": "http", "proto": "tcp", "src": "wan", "src_ip": "", "src_port": "80", "dest": "", "dest_ip": "", "dest_port": "", "target": "ACCEPT", "enabled": 1 } ] } }
3.4.5 Port forwarding settings /net_firewall/redirect_set
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
redirects | array | N | – | Format [{RDRTSKV}…]. , refer to “RDRTSKV”. | 240422 |
RDRTSKV | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
name | string | N | unoccupied | Name Format: 0-32 characters | 240422 |
proto | string | N | tcp | Protocol Format (optional): tcp udp icmp | 240422 |
src | string | N | wan | Source network domain Format: wan lan | 240422 |
src_dport | string | Y | – | Source Destination Port Format: single port 1-65536 multiple ports (1-65536):(1-65536), this value is null when proto is icmp, page label hidden | 240422 |
dest | string | N | lan | Target network domain Format: wan lan | 240422 |
dest_ip | string | Y | – | Destination IP Format: IP address | 240422 |
dest_port | string | Y | – | Destination port Format: single port 1-65536 multiple ports (1-65536):(1-65536), this value is null when proto is icmp, page label hidden | 240422 |
target | string | N | dnat | Forwarding model Format: dnat | 240422 |
Server→Client Response
Request Example
Post:/controller/net_firewall/redirect_set
Host:172.16.6.79
Raw:{"token":"abc18525e6fe2d4ecba0438c96494007","redirects":[{"name":"forwading","proto":"udp","src":"wan","src_dport":"5016","dest":"lan","dest_port":"5160","dest_ip":"192.168.6.10"}]}
Response Example
{ "uri": "net_firewall/redirect_set", "msg": "", "code": 200, "data": [] }
3.4.6 Port Forwarding Get /net_firewall/redirect_get
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
References /net_firewall/redirect_set | 240422 |
Request Example
Post:/controller/net_firewall/redirect_get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{ "uri": "net_firewall/redirect_get", "msg": "", "code": 200, "data": { "redirects": [ { "name": "forwading", "proto": "udp", "src": "wan", "src_dport": "5016", "dest": "lan", "dest_ip": "192.168.6.10", "dest_port": "5160", "target": "dnat" } ] } }
3.5 Network Port IP Alias
3.5.1 IP Alias Configuration /net_alias/set
- Note: When the IP alias is set to null, it means that the alias is disabled.
- Note: This interface needs to be in effect after setting up.
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
alias1_device | string | N | unoccupied | Binding interface (basic) Format: wan, lan, empty | 240412 |
alias1_ipaddr | string | N | unoccupied | IP address Format: IP format, 0-15 characters, null | 240412 |
alias1_netmask | string | N | unoccupied | Subnet mask Format: 0-15 characters, null | 240412 |
alias2_device | string | N | unoccupied | Binding interface (basic) Format: wan, lan, empty | 240412 |
alias2_ipaddr | string | N | unoccupied | IP address Format: IP format, 0-15 characters, null | 240412 |
alias2_netmask | string | N | unoccupied | Subnet mask Format: 0-15 characters, null | 240412 |
Server→Client Response
Request Example
Post:/controller/net_alias/set
Host:172.16.6.79
Raw:{"alias1_device":"wan","alias1_ipaddr":"192.168.6.10","alias1_netmask":"255.255.255.0","alias2_device":"wan","alias2_ipaddr":"","alias2_netmask":"","token":"475981f0f3d4d130dda895213420265d"}
Response Example
{"uri":"net_alias/set","msg":"","code":200,"data":[]}
3.5.2 IP Alias Get /net_alias/get
Client→Server Request
Server→Client Response
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
References /net_alias/set | 240412 |
Request Example
Post:/controller/net_alias/get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{ "uri": "net_alias/get", "msg": "", "code": 200, "data": { "alias1_device": "wan", "alias1_ipaddr": "192.168.6.10", "alias1_netmask": "255.255.255.0", "alias2_device": "", "alias2_ipaddr": "", "alias2_netmask": "" } }
3.6 VPN Client
3.6.1 VPN Configuration /net_vpn/set
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
switch | string | N | unoccupied | VPN enable type Format: openvpn empty (off) | 240425 |
ovpn_username | string | N | unoccupied | Account verification name Format: 0-32 characters, empty | 240425 |
ovpn_password | string | N | unoccupied | Account verification password Format: 0-32 characters, empty | 240425 |
ovpn_cert_password | string | N | unoccupied | cert authentication password Format: 0-32 characters, empty | 240425 |
ovpn_config | string | N | unoccupied | ovpn configuration contents Format: 0-32678 characters, empty | 240425 |
Server→Client Response
Request Example
Post:/controller/net_vpn/set
Host:172.16.6.79
Raw:{"switch":"openvpn","ovpn_username":"","ovpn_password":"","ovpn_cert_password":"","ovpn_config":"client\ndev tun\nproto udp\nsndbuf 0\nrcvbuf 0\nremote 81.68.244.137 1194\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\nremote-cert-tls server\nauth SHA512\ncipher AES-256-CBC\nsetenv opt block-outside-dns\nkey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nf4p6GzIT1TC1rPti/BII9r0NS4vn/Th7edjepZannBGdAytvZuiaMnmfy3RFkSrR\nQmsb+3fTblhFr1luFbj2VZsPne1XEHHhpoQqk4PLw5vV+sK258W0ad0UomvCauf/\njnZCjKE517OLGAyXGuNMukx4Ct0CgYEAy49Qat1+QI4GEXJYQZrFmsxaYzB3FAyP\n1HzwIRhWmAeryGQbdlONnjjCxXnWXQwEnDlkFR+R+E/AbpkzhEXKOfU07SUhnclh\nS6dPWfAwIM/8mDrYY9eexcpWIRG1MkP2EeZUgVVgw+XqBdcwYuV27WF5/6yvE5Bd\nNVAQwcJfiYcCgYEA37xLCMcNDQH8RCRqUan5byLw2cZe6m8I7VkOC2cWXHQ7Fr+G\nqVuPNKCHeZ25yijX2aArkH15wIiSzoAZLMpyHOxS3RLopT0W/pO5rcJ865qI6E1a\nmITtYkVtTVJab3+Kon3eCK+uRbpZf5NUp00hU8emKTJIxPSzxXG4Iiiw5X0CgYEA\njpg9OC8iouwaehxEkOhvpmmio7sun1/RXYOL31MiTeuJvZ3K0w/is8SFRDp+HL4v\neJSHdHiiE3UikxdEzFLrP8Byq/EH5HVOb+WrI5Cq1kF8a9NFBGPmOB3uScoSyTxs\nYsubxOHfIDutvRuqLI0by1wuTxlTp3vIn3EP2/tiW38CgYBdwaV+iDxhV28Ab7yW\n03tx8qsZsAwK6Yt/IO5cahIj0PVD6ns1vaX9xDPf56r0S5TDSY/rMfQJe+TV7mUJ\nUz+MbPWmWVnSw3NX7OHg45SfmFzt1tCc+mFpJrX8+8Lov7nqtq3ks4GECAhFuYko\nU2rfr7rJAXbnuAt0Iuq2HpxLkw==\n-----END PRIVATE KEY-----\n</key>\n<tls-auth>\n-----BEGIN OpenVPN Static key V1-----\n0c036eaca93c89f69bf8466107f2009a\n828873626afb2d910dec262e87407398\na4744b164146c1ceb1a7b1c197880269\ncee4e944644f97129e7ae4c51989cb8b\n5098ecc5a7b8ced6adcf772ea0096d83\n0b0185187908f21a541a56275f9e0080\n8236a1874121d70880e82032ffb7d25e\n4f71c078c0a4cbd9decc81736dd468cd\n1bb1227898580f89ecf154264217500e\n9fcb229000de2e76ddcc460939886fda\n1b129249e32c60871b6958305db6eeb7\n400ce8db04f3cc08885311cecd0950ed\n25d6c8b7e35d3ad490a07dd06864d67d\ne13551b9522f5d392ebb274c24961b7c\n6b2fadafccd740d72d77702d59d80322\n4d251d2a730829b888f3d7a0f54a9b30\n-----END OpenVPN Static key V1-----\n</tls-auth>\n","token":"475981f0f3d4d130dda895213420265d"}
Response Example
{ "uri": "net_vpn/set", "msg": "", "code": 200, "data": [] }
3.6.2 VPN Get /net_vpn/get
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
ovpn_status | string | 0 | VPN connection status Format: 0 (not connected), 1 (connected) | 240425 | |
ovpn_ipaddr | string | unoccupied | IP address after successful VPN connection | 240425 | |
ovpn_netmask | string | unoccupied | Mask after successful VPN connection | 240425 | |
References /net_vpn/set |
Request Example
Post:/controller/net_vpn/get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{ "uri": "net_vpn/get", "msg": "", "code": 200, "data": { "switch": "openvpn", "ovpn_username": "", "ovpn_password": "", "ovpn_cert_password": "", "ovpn_config": "client\nproto udp\nsndbuf 0\nrcvbuf 0\nremote 81.68.244.137 1194\nresolv-retry infinite\nnobind\npersist-key\npersist-tun\nremote-cert-tls server\nauth SHA512\ncipher AES-256-CBC\nsetenv opt block-outside-dns\nkey-direction 1\nverb 3\nroute-nopull\n<ca>\n-----BEGIN CERTIFICATE-----\nMIIDKzCCAhOgAwIBAgIJAIIc1qtEbT+uMA0GCSqGSIb3DQEBCwUAMBMxETAPBgNV\nBAMMCENoYW5nZU1lMB4XDTIxMDMxNTAzNTQyM1oXDTMxMDMxMzAzNTQyM1owEzER\nMA8GA1UEAwwIQ2hhbmdlTWUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggE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fU07SUhnclh\nS6dPWfAwIM/8mDrYY9eexcpWIRG1MkP2EeZUgVVgw+XqBdcwYuV27WF5/6yvE5Bd\nNVAQwcJfiYcCgYEA37xLCMcNDQH8RCRqUan5byLw2cZe6m8I7VkOC2cWXHQ7Fr+G\nqVuPNKCHeZ25yijX2aArkH15wIiSzoAZLMpyHOxS3RLopT0W/pO5rcJ865qI6E1a\nmITtYkVtTVJab3+Kon3eCK+uRbpZf5NUp00hU8emKTJIxPSzxXG4Iiiw5X0CgYEA\njpg9OC8iouwaehxEkOhvpmmio7sun1/RXYOL31MiTeuJvZ3K0w/is8SFRDp+HL4v\neJSHdHiiE3UikxdEzFLrP8Byq/EH5HVOb+WrI5Cq1kF8a9NFBGPmOB3uScoSyTxs\nYsubxOHfIDutvRuqLI0by1wuTxlTp3vIn3EP2/tiW38CgYBdwaV+iDxhV28Ab7yW\n03tx8qsZsAwK6Yt/IO5cahIj0PVD6ns1vaX9xDPf56r0S5TDSY/rMfQJe+TV7mUJ\nUz+MbPWmWVnSw3NX7OHg45SfmFzt1tCc+mFpJrX8+8Lov7nqtq3ks4GECAhFuYko\nU2rfr7rJAXbnuAt0Iuq2HpxLkw==\n-----END PRIVATE KEY-----\n</key>\n<tls-auth>\n-----BEGIN OpenVPN Static key V1-----\n0c036eaca93c89f69bf8466107f2009a\n828873626afb2d910dec262e87407398\na4744b164146c1ceb1a7b1c197880269\ncee4e944644f97129e7ae4c51989cb8b\n5098ecc5a7b8ced6adcf772ea0096d83\n0b0185187908f21a541a56275f9e0080\n8236a1874121d70880e82032ffb7d25e\n4f71c078c0a4cbd9decc81736dd468cd\n1bb1227898580f89ecf154264217500e\n9fcb229000de2e76ddcc460939886fda\n1b129249e32c60871b6958305db6eeb7\n400ce8db04f3cc08885311cecd0950ed\n25d6c8b7e35d3ad490a07dd06864d67d\ne13551b9522f5d392ebb274c24961b7c\n6b2fadafccd740d72d77702d59d80322\n4d251d2a730829b888f3d7a0f54a9b30\n-----END OpenVPN Static key V1-----\n</tls-auth>\ndev-type tun\ndev vpn1\nscript-security 2\nup /appenv/bin/openvpn.sh\ndown /appenv/bin/openvpn.sh\n", "ovpn_status": "1", "ovpn_ipaddr": "10.8.0.29", "ovpn_netmask": "255.255.255.0" } }
3.6.2 VPN log /net_vpn/log
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
limit | int | N | 128 | Number of log lines Format: 1-1024 | 240425 |
Server→Client Response
DATA_SUBKEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
log | string | 240425 |
Request Example
Post:/controller/net_vpn/log
Host:172.16.6.79
Raw:{"limit":128,"token":"475981f0f3d4d130dda895213420265d"}
Response Example
{ "uri": "net_vpn/log", "msg": "", "code": 200, "data": { "log": "Fri Oct 18 03:13:49 2024 daemon.notice openvpn(vpn1)[2123]: TUN\/TAP device vpn1 opened\nFri Oct 18 03:13:49 2024 daemon.notice openvpn(vpn1)[2123]: net_iface_mtu_set: mtu 1500 for vpn1\nFri Oct 18 03:13:49 2024 daemon.notice openvpn(vpn1)[2123]: net_iface_up: set vpn1 up\nFri Oct 18 03:13:49 2024 daemon.notice openvpn(vpn1)[2123]: net_addr_v4_add: 10.8.0.29\/24 dev vpn1\nFri Oct 18 03:13:49 2024 daemon.notice openvpn(vpn1)[2123]: \/usr\/libexec\/openvpn-hotplug up vpn1 vpn1 1500 1552 10.8.0.29 255.255.255.0 init\nFri Oct 18 03:13:49 2024 daemon.warn openvpn(vpn1)[2123]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this\nFri Oct 18 03:13:49 2024 daemon.notice openvpn(vpn1)[2123]: Initialization Sequence Completed\n" } } } }
3.7 Network model
3.7.1 Network mode switching /net_switch/set
Note: This interface needs to be set up with a requirement for it to take effect (/general/apply_do).
Client→Server Request
KEY | VAL | REQ | DEF | Remark | Renew |
---|---|---|---|---|---|
network_mode | string | Y | – | Network Mode Format Optional value to be obtained via configuration, example: route/bridge | 240123 |
Server→Client Response
Request Example
Post:/controller/net_switch/set
Host:172.16.6.79
Raw:{"network_mode":"bridge","token":"b0fb815458d47e08dde5f425f7d830f3"}
Response Example
{ "uri": "net_switch/set", "msg": "", "code": 200, "data": [] }
3.7.2 Network mode get /net_switch/get
Note: If type_list has only one value, it means that the device is a single port, or the device is a dual port but not switchable.
Client→Server Request
Server→Client Response
DATA_SUBKEY | VAL | Default | Remark | Renew |
---|---|---|---|---|
type_list | array | – | Switching mode selectable list Format: [bridge,route], contains list values for bridge and route. | 230925 |
References /net_switch/set | 230901 |
Request Example
Post:/controller/net_switch/get
Host:172.16.6.79
Raw:{ "token": "bb3bcfc8771679d3b80288a7ade46238"}
Response Example
{ "uri": "net_switch/get", "msg": "", "code": 200, "data": { "network_mode": "bridge", "type_list": [ "route", "bridge" ] } }