mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Update openmptcprouter
This commit is contained in:
parent
b7dee85748
commit
f0957d2ad2
1 changed files with 10 additions and 2 deletions
|
@ -1473,10 +1473,18 @@ function interfaces_status()
|
|||
end
|
||||
end
|
||||
if publicIP ~= "" then
|
||||
whois = ut.trim(sys.exec("curl -4 --max-time 20 -s -k 'https://api.ip138.com/ip/?ip=" .. publicIP .. "&datatype=txt&callback=find' -H 'token:99eeff11df2c5c5a6e6b984bafd0bb77' | awk '{print $3 $4 $5 $6}'"))
|
||||
whois = uci:get("openmptcprouter",interface,"asn") or ""
|
||||
if whois == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
|
||||
whois = ut.trim(sys.exec("whois " .. publicIP .. " | grep -i 'netname' | awk '{print $2}'"))
|
||||
--whois = ut.trim(sys.exec("wget -4 -qO- -T 1 'http://api.iptoasn.com/v1/as/ip/" .. publicIP .. "' | jsonfilter -q -e '@.as_description'"))
|
||||
end
|
||||
end
|
||||
if publicIP6 ~= "" then
|
||||
whois6 = ut.trim(sys.exec("curl -6 --max-time 20 -s -k 'https://api.ip138.com/ip/?ip=" .. publicIP6 .. "&datatype=txt&callback=find' -H 'token:99eeff11df2c5c5a6e6b984bafd0bb77' | awk '{print $3 $4 $5 $6}'"))
|
||||
whois6 = uci:get("openmptcprouter",interface,"asn") or ""
|
||||
if whois6 == "" and mArray.openmptcprouter["external_check"] ~= false and mArray.openmptcprouter["dns"] == true then
|
||||
whois6 = ut.trim(sys.exec("whois " .. publicIP6 .. " | grep -i 'netname' | awk '{print $2}'"))
|
||||
--whois6 = ut.trim(sys.exec("wget -6 -qO- -T 1 'http://api.iptoasn.com/v1/as/ip/" .. publicIP6 .. "' | jsonfilter -q -e '@.as_description'"))
|
||||
end
|
||||
end
|
||||
if ifname ~= "" and ifname ~= nil then
|
||||
if fs.access("/sys/class/net/" .. ifname) then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue