mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Display public even if no wan configured with multipath enabled
This commit is contained in:
parent
da3834c407
commit
7cfb24a351
1 changed files with 5 additions and 2 deletions
|
@ -790,12 +790,12 @@ function interfaces_status()
|
|||
end
|
||||
|
||||
if uci:get("openmptcprouter","settings","external_check") ~= "0" and mArray.openmptcprouter["dns"] == true then
|
||||
if mArray.openmptcprouter["service_addr_ip"] ~= "" and mArray.openmptcprouter["service_addr_ip"] ~= nil then
|
||||
--if mArray.openmptcprouter["service_addr_ip"] ~= "" and mArray.openmptcprouter["service_addr_ip"] ~= nil then
|
||||
mArray.openmptcprouter["wan_addr"] = ut.trim(sys.exec("curl -4 -s -m " .. timeout .. " " .. check_ipv4_website))
|
||||
if mArray.openmptcprouter["wan_addr"] == "" then
|
||||
mArray.openmptcprouter["wan_addr"] = ut.trim(sys.exec("dig -4 TXT +timeout=" .. timeout .. " +tries=1 +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'\"' '{print $2}'"))
|
||||
end
|
||||
end
|
||||
--end
|
||||
if mArray.openmptcprouter["ipv6"] == "enabled" or ( mArray.openmptcprouter["service_addr_ip6"] ~= "" and mArray.openmptcprouter["service_addr_ip6"] ~= nil) then
|
||||
mArray.openmptcprouter["wan_addr6"] = uci:get("openmptcprouter","omr","public_detected_ipv6") or ""
|
||||
if mArray.openmptcprouter["wan_addr6"] == "" then
|
||||
|
@ -1550,6 +1550,9 @@ function interfaces_status()
|
|||
table.insert(mArray.wans, data);
|
||||
end
|
||||
end)
|
||||
if next(mArray.wans) == nil then
|
||||
mArray.openmptcprouter["direct_output"] = true
|
||||
end
|
||||
|
||||
--luci.http.prepare_content("application/json")
|
||||
--luci.http.write_json(mArray)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue