diff --git a/luci-app-passwall/Makefile b/luci-app-passwall/Makefile index 12dc85f..5fff077 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 99c620f..ba84fc9 100644 --- a/luci-app-passwall/luasrc/controller/passwall.lua +++ b/luci-app-passwall/luasrc/controller/passwall.lua @@ -283,7 +283,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 4168039..c4321b5 100644 --- a/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua +++ b/luci-app-passwall/luasrc/model/cbi/passwall/client/global.lua @@ -492,6 +492,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"}) @@ -591,7 +597,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 (m.uci:get(appname, "@global_forwarding[0]", "use_nft") or "0") == "1" then 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 -%>