1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add get ip and netstat diagnostics tools

This commit is contained in:
Ycarus 2018-03-07 14:01:47 +01:00
parent 9b258aedb8
commit 2f4e19176c
3 changed files with 38 additions and 5 deletions

View file

@ -158,6 +158,12 @@ function index()
page = entry({"admin", "network", "diag_speedtest"}, post("diag_speedtest"), nil)
page.leaf = true
page = entry({"admin", "network", "diag_getip"}, post("diag_getip"), nil)
page.leaf = true
page = entry({"admin", "network", "diag_netstat"}, post("diag_netstat"), nil)
page.leaf = true
-- end
end
@ -438,6 +444,14 @@ function diag_iperf3(addr)
diag_command("iperf3 -c %q 2>&1", addr)
end
function diag_getip(addr)
diag_command("curl %q", addr)
end
function diag_netstat(addr)
diag_command("netstat -lapute 2>&1", "openmptcprouter.com")
end
function diag_speedtest(addr)
if addr then
diag_command("speedtestc --server %q 2>&1", addr)