diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 2b72468..15c6437 100644 --- a/luci-app-passwall/Makefile +++ b/luci-app-passwall/Makefile @@ -144,7 +144,7 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Geodata config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Geoview bool "Include V2ray_Geoview" select PACKAGE_geoview - default y if aarch64||arm||i386||x86_64 + default n config PACKAGE_$(PKG_NAME)_INCLUDE_V2ray_Plugin bool "Include V2ray-Plugin (Shadowsocks Plugin)" @@ -177,7 +177,6 @@ define Package/$(PKG_NAME)/conffiles /usr/share/passwall/rules/lanlist_ipv4 /usr/share/passwall/rules/lanlist_ipv6 /usr/share/passwall/rules/domains_excluded -/www/luci-static/resources/qrcode.min.js endef define Package/$(PKG_NAME)/postrm diff --git a/luci-app-passwall/luasrc/controller/passwall.lua b/luci-app-passwall/luasrc/controller/passwall.lua index 6851861..669a612 100644 --- a/luci-app-passwall/luasrc/controller/passwall.lua +++ b/luci-app-passwall/luasrc/controller/passwall.lua @@ -279,7 +279,7 @@ function connect_status() url = "-x socks5h://" .. socks_server .. " " .. url end end - local result = luci.sys.exec('curl --connect-timeout 3 -o /dev/null -I -sk -w "%{http_code}:%{time_appconnect}" ' .. url) + local result = luci.sys.exec('curl --connect-timeout 3 -o /dev/null -I -sk -w "%{http_code}:%{time_starttransfer}" ' .. url) local code = tonumber(luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $1}'") or "0") if code ~= 0 then local use_time = luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $2}'") diff --git a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua index 958ff0a..89543b9 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua @@ -474,6 +474,12 @@ o:value("9.9.9.9", "9.9.9.9 (Quad9)") o:value("149.112.112.112", "149.112.112.112 (Quad9)") o:value("208.67.220.220", "208.67.220.220 (OpenDNS)") o:value("208.67.222.222", "208.67.222.222 (OpenDNS)") +if nixio.fs.access("/usr/share/mosdns/mosdns.sh") then + local mosdns_port = string.gsub(luci.sys.exec("uci -q get mosdns.config.listen_port"), "\n", "") + if mosdns_port ~= nil and result ~= "" then + o:value("127.0.0.1:" .. mosdns_port, "127.0.0.1:" .. mosdns_port .. " (MosDNS)") + end +end o:depends({dns_mode = "dns2socks"}) o:depends({dns_mode = "tcp"}) o:depends({dns_mode = "udp"}) @@ -565,7 +571,7 @@ if api.is_finded("smartdns") then end o = s:taboption("DNS", Flag, "dns_redirect", translate("DNS Redirect"), translate("Force special DNS server to need proxy devices.")) -o.default = "1" +o.default = "0" o.rmempty = false if (uci:get(appname, "@global_forwarding[0]", "use_nft") or "0") == "1" then diff --git a/luci-app-passwall/luasrc/passwall/api.lua b/luci-app-passwall/luasrc/passwall/api.lua index 8c4e6ef..81089eb 100644 --- a/luci-app-passwall/luasrc/passwall/api.lua +++ b/luci-app-passwall/luasrc/passwall/api.lua @@ -219,14 +219,7 @@ end function is_install(package) if package and #package > 0 then - local file_path = "/usr/lib/opkg/info" - local file_ext = ".control" - local has = sys.call("[ -d " .. file_path .. " ]") - if has == 0 then - file_path = "/lib/apk/packages" - file_ext = ".list" - end - return sys.call(string.format('[ -s "%s/%s%s" ]', file_path, package, file_ext)) == 0 + return sys.call(string.format('opkg list-installed | grep "%s" > /dev/null 2>&1', package)) == 0 end return false end diff --git a/luci-app-passwall/luasrc/view/passwall/global/status.htm b/luci-app-passwall/luasrc/view/passwall/global/status.htm index e8d76ec..a872950 100644 --- a/luci-app-passwall/luasrc/view/passwall/global/status.htm +++ b/luci-app-passwall/luasrc/view/passwall/global/status.htm @@ -1,5 +1,11 @@ <% local api = require "luci.passwall.api" +local fs = require "nixio.fs" +local uci = require 'luci.model.uci'.cursor() +local mode = 'normal' +if fs.access('/etc/config/argon') then + mode = uci:get_first('argon', 'global', 'mode') +end -%>