mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
DNS check
This commit is contained in:
parent
9a66b3b594
commit
b26c636f0d
2 changed files with 13 additions and 2 deletions
|
@ -189,6 +189,13 @@ function interfaces_status()
|
|||
mArray.openmptcprouter["ss_addr"] = sys.exec("curl -s -4 --socks5 127.0.0.1:1111 -m 2 http://ip.openmptcprouter.com")
|
||||
-- wanaddr
|
||||
mArray.openmptcprouter["wan_addr"] = sys.exec("wget -4 -qO- -T 1 http://ip.openmptcprouter.com")
|
||||
|
||||
-- dns
|
||||
mArray.openmptcprouter["dns"] = false
|
||||
local dns_test = sys.exec("dig openmptcprouter.com | grep 'ANWER: 0'")
|
||||
if dns_test == "" then
|
||||
mArray.openmptcprouter["dns"] = true
|
||||
end
|
||||
|
||||
mArray.openmptcprouter["remote_addr"] = luci.http.getenv("REMOTE_ADDR") or ""
|
||||
mArray.openmptcprouter["remote_from_lease"] = false
|
||||
|
|
|
@ -111,11 +111,15 @@
|
|||
}
|
||||
if (mArray.openmptcprouter.wan_addr == "")
|
||||
{
|
||||
statusMessage += 'No VPS IP address, No WAN IP address';
|
||||
statusMessage += 'No VPS IP address, No WAN IP address<br/>';
|
||||
}
|
||||
if (mArray.openmptcprouter.dns == false)
|
||||
{
|
||||
statusMessage += 'DNS issue: can\'t resolve hostname<br/>';
|
||||
}
|
||||
if (mArray.openmptcprouter.ss_addr == "")
|
||||
{
|
||||
statusMessage += 'ShadowSocks not working';
|
||||
statusMessage += 'ShadowSocks not working<br/>';
|
||||
}
|
||||
|
||||
if(statusMessage !== "")
|
||||
|
|
Loading…
Reference in a new issue