diff --git a/package/lienol/luci-app-mia/luasrc/controller/mia.lua b/package/lienol/luci-app-mia/luasrc/controller/mia.lua
index f91fb120f6..4096b41894 100644
--- a/package/lienol/luci-app-mia/luasrc/controller/mia.lua
+++ b/package/lienol/luci-app-mia/luasrc/controller/mia.lua
@@ -3,10 +3,10 @@ module("luci.controller.mia", package.seeall)
function index()
if not nixio.fs.access("/etc/config/mia") then return end
- entry({"admin", "network"}, firstchild(), "Control", 44).dependent = false
- entry({"admin", "network", "mia"}, cbi("mia"), _("时间控制"), 10).dependent =
+ entry({"admin", "control"}, firstchild(), "Control", 44).dependent = false
+ entry({"admin", "control", "mia"}, cbi("mia"), _("时间控制"), 10).dependent =
true
- entry({"admin", "network", "mia", "status"}, call("status")).leaf = true
+ entry({"admin", "control", "mia", "status"}, call("status")).leaf = true
end
function status()
diff --git a/package/lienol/luci-app-passwall/Makefile b/package/lienol/luci-app-passwall/Makefile
index 34e6c75edd..4f04678415 100644
--- a/package/lienol/luci-app-passwall/Makefile
+++ b/package/lienol/luci-app-passwall/Makefile
@@ -6,11 +6,10 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall
-PKG_VERSION:=3.1
-PKG_RELEASE:=3-20200103
+PKG_VERSION:=3.3
+PKG_RELEASE:=25-20200114
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
-PO2LMO:=./po2lmo
include $(INCLUDE_DIR)/package.mk
@@ -19,7 +18,7 @@ menu "Configuration"
config PACKAGE_$(PKG_NAME)_INCLUDE_ipt2socks
bool "Include ipt2socks"
- default n
+ default y
config PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks
bool "Include Shadowsocks Redir (ss-redir)"
@@ -55,19 +54,19 @@ config PACKAGE_$(PKG_NAME)_INCLUDE_kcptun
config PACKAGE_$(PKG_NAME)_INCLUDE_haproxy
bool "Include haproxy"
- default n
+ default y
config PACKAGE_$(PKG_NAME)_INCLUDE_ChinaDNS_NG
bool "Include ChinaDNS-NG"
default y
-config PACKAGE_$(PKG_NAME)_INCLUDE_dns2socks
- bool "Include dns2socks"
- default y
-
config PACKAGE_$(PKG_NAME)_INCLUDE_pdnsd
bool "Include pdnsd"
default y
+
+config PACKAGE_$(PKG_NAME)_INCLUDE_dns2socks
+ bool "Include dns2socks"
+ default n
endmenu
endef
@@ -77,8 +76,8 @@ define Package/$(PKG_NAME)
SUBMENU:=3. Applications
TITLE:=LuCI support for PassWall By Lienol
PKGARCH:=all
- DEPENDS:=+curl +wget +libcurl +libmbedtls +ca-bundle +ca-certificates +resolveip +iptables-mod-tproxy +kmod-ipt-tproxy +iptables-mod-ipopt +kmod-ipt-ipopt +ip +ipset +coreutils +coreutils-base64 +coreutils-nohup +luci-lib-jsonc +unzip \
- +dnsmasq-full +tcping +bash \
+ DEPENDS:=+libmbedtls +iptables-mod-tproxy +kmod-ipt-tproxy +iptables-mod-ipopt +kmod-ipt-ipopt +ip +ipset +coreutils +coreutils-base64 +coreutils-nohup +luci-lib-jsonc \
+ +bash +wget +resolveip +unzip +dnsmasq-full +tcping \
+PACKAGE_$(PKG_NAME)_INCLUDE_ipt2socks:ipt2socks \
+PACKAGE_$(PKG_NAME)_INCLUDE_Shadowsocks:shadowsocks-libev-ss-redir \
+PACKAGE_$(PKG_NAME)_INCLUDE_ShadowsocksR:shadowsocksr-libev-alt \
@@ -124,8 +123,7 @@ define Package/$(PKG_NAME)/install
cp -pR ./luasrc/* $(1)/usr/lib/lua/luci/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
- chmod 755 $(PO2LMO)
- $(PO2LMO) ./po/zh-cn/passwall.po $(1)/usr/lib/lua/luci/i18n/passwall.zh-cn.lmo
+ po2lmo ./po/zh-cn/passwall.po $(1)/usr/lib/lua/luci/i18n/passwall.zh-cn.lmo
endef
define Package/$(PKG_NAME)/postinst
diff --git a/package/lienol/luci-app-passwall/luasrc/controller/passwall.lua b/package/lienol/luci-app-passwall/luasrc/controller/passwall.lua
index 4861a65753..e289bf5179 100644
--- a/package/lienol/luci-app-passwall/luasrc/controller/passwall.lua
+++ b/package/lienol/luci-app-passwall/luasrc/controller/passwall.lua
@@ -19,13 +19,13 @@ function index()
end
entry({"admin", "vpn", "passwall", "settings"}, cbi("passwall/global"),
_("Basic Settings"), 1).dependent = true
- entry({"admin", "vpn", "passwall", "node_list"},
- cbi("passwall/node_list", {autoapply = true}), _("Node List"), 2).dependent =
- true
+ entry({"admin", "vpn", "passwall", "node_list"}, cbi("passwall/node_list"),
+ _("Node List"), 2).dependent = true
-- entry({"admin", "vpn", "passwall", "auto_switch"},
-- cbi("passwall/auto_switch"), _("Auto Switch"), 3).leaf = true
- entry({"admin", "vpn", "passwall", "other"}, cbi("passwall/other"),
- _("Other Settings"), 94).leaf = true
+ entry({"admin", "vpn", "passwall", "other"},
+ cbi("passwall/other", {autoapply = true}), _("Other Settings"), 94).leaf =
+ true
if nixio.fs.access("/usr/sbin/haproxy") then
entry({"admin", "vpn", "passwall", "balancing"},
cbi("passwall/balancing"), _("Load Balancing"), 95).leaf = true
@@ -34,10 +34,12 @@ function index()
_("Rule Update"), 96).leaf = true
entry({"admin", "vpn", "passwall", "acl"}, cbi("passwall/acl"),
_("Access control"), 97).leaf = true
- entry({"admin", "vpn", "passwall", "rule_list"}, cbi("passwall/rule_list"),
+ entry({"admin", "vpn", "passwall", "rule_list"},
+ cbi("passwall/rule_list", {autoapply = true}),
_("Set Blacklist And Whitelist"), 98).leaf = true
- entry({"admin", "vpn", "passwall", "log"}, cbi("passwall/log"),
- _("Watch Logs"), 99).leaf = true
+ entry({"admin", "vpn", "passwall", "log"},
+ cbi("passwall/log", {autoapply = true}), _("Watch Logs"), 99).leaf =
+ true
entry({"admin", "vpn", "passwall", "node_config"},
cbi("passwall/node_config")).leaf = true
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/auto_switch.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/auto_switch.lua
index 0efbbf5deb..2b7c2d7285 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/auto_switch.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/auto_switch.lua
@@ -1,10 +1,12 @@
local uci = require"luci.model.uci".cursor()
+local api = require "luci.model.cbi.passwall.api.api"
local appname = "passwall"
local n = {}
uci:foreach(appname, "nodes", function(e)
- if e.type and e.address and e.remarks then
- n[e[".name"]] = "%s:[%s] %s" % {e.type, e.remarks, e.address}
+ if e.type and e.remarks and e.address and e.port then
+ n[e[".name"]] = "%s:[%s] %s:%s" %
+ {e.type, e.remarks, e.address, e.port}
end
end)
@@ -26,12 +28,16 @@ o.rmempty = false
---- Testing Time
o = s:option(Value, "testing_time", translate("How often is a diagnosis made"),
translate("Units:minutes"))
-o.default = "10"
+o.default = "3"
----- Tcp Redir Server
-o = s:option(DynamicList, "tcp_redir_server",
- translate("List of alternate TCP forwarding nodes"), translate(
- "When there is no server, an automatic reconnect scheme is used"))
-for _, key in pairs(key_table) do o:value(key, n[key]) end
+---- TCP Node
+local tcp_node_num = api.uci_get_type("global_other", "tcp_node_num", 1)
+for i = 1, tcp_node_num, 1 do
+ o = s:option(DynamicList, "tcp_node" .. i,
+ "TCP " .. i .. " " .. translate("List of backup nodes"),
+ translate(
+ "List of backup nodes, the first of which must be the primary node and the others the standby node."))
+ for _, key in pairs(key_table) do o:value(key, n[key]) end
+end
return m
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/balancing.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/balancing.lua
index b0400551ac..7b33cc84ad 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/balancing.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/balancing.lua
@@ -4,22 +4,27 @@ local net = require"luci.model.network".init()
local uci = require"luci.model.uci".cursor()
local ifaces = e.net:devices()
local appname = "passwall"
-local nodes_name = {}
-local nodes_port = {}
+local n = {}
uci:foreach(appname, "nodes", function(e)
- if e.address and e.port and e.address ~= "127.0.0.1" then
- nodes_name[e[".name"]] = "%s" % {e.address}
- nodes_port[e[".name"]] = "%s" % {e.port}
+ if e.remarks and e.address and e.port and e.address ~= "127.0.0.1" then
+ e.remark = "[%s] %s:%s" % {e.remarks, e.address, e.port}
+ n[e[".name"]] = e
end
end)
-m = Map("passwall")
+local key_table = {}
+for key, _ in pairs(n) do table.insert(key_table, key) end
+table.sort(key_table)
+
+m = Map(appname)
-- [[ Haproxy Settings ]]--
s = m:section(TypedSection, "global_haproxy", translate("Load Balancing"))
s.anonymous = true
+s:append(Template("passwall/haproxy/status"))
+
---- Balancing Enable
o = s:option(Flag, "balancing_enable", translate("Enable Load Balancing"))
o.rmempty = false
@@ -43,15 +48,15 @@ o.default = "1188"
o:depends("balancing_enable", 1)
---- Haproxy Port
-o = s:option(Value, "haproxy_port", translate("Haproxy Port"), translate(
- "Configure this node with 127.0.0.1: this port"))
+o = s:option(Value, "haproxy_port", translate("Haproxy Port"),
+ translate("Configure this node with 127.0.0.1: this port"))
o.default = "1181"
o:depends("balancing_enable", 1)
-- [[ Balancing Settings ]]--
s = m:section(TypedSection, "balancing", translate("Load Balancing Setting"),
translate(
- "Add a node, Export Of Multi WAN Only support Multi Wan. If no effect, please go to mwan3 to set. Load specific gravity range 1-256. Multiple primary servers can be load balanced, standby will only be enabled when the primary server is offline!"))
+ "Add a node, Export Of Multi WAN Only support Multi Wan. Load specific gravity range 1-256. Multiple primary servers can be load balanced, standby will only be enabled when the primary server is offline!"))
s.template = "cbi/tblsection"
s.sortable = true
s.anonymous = true
@@ -59,12 +64,14 @@ s.addremove = true
---- Node Address
o = s:option(Value, "lbss", translate("Node Address"))
-for m, s in pairs(nodes_name) do o:value(s) end
+for _, key in pairs(key_table) do
+ o:value(n[key].address .. ":" .. n[key].port, n[key].remark)
+end
o.rmempty = false
---- Node Port
o = s:option(Value, "lbort", translate("Node Port"))
-for m, s in pairs(nodes_port) do o:value(s) end
+o:value("default", translate("Default"))
o.rmempty = false
---- Node Weight
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/global.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/global.lua
index 8b1e3e02fb..ae1154d4e3 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/global.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/global.lua
@@ -40,11 +40,15 @@ else
end
-- [[ Global Settings ]]--
-s = m:section(TypedSection, "global", translate("Global Settings"),
- translate("If you can use it, very stable. If not, GG !!!"))
+s = m:section(TypedSection, "global", translate("Global Settings"))
+-- s.description = translate("If you can use it, very stable. If not, GG !!!")
s.anonymous = true
s.addremove = false
+---- Main switch
+o = s:option(Flag, "enabled", translate("Main switch"))
+o.rmempty = false
+
---- TCP Node
local tcp_node_num = api.uci_get_type("global_other", "tcp_node_num", 1)
for i = 1, tcp_node_num, 1 do
@@ -81,7 +85,7 @@ local socks5_node_num = api.uci_get_type("global_other", "socks5_node_num", 1)
for i = 1, socks5_node_num, 1 do
if i == 1 then
o = s:option(ListValue, "socks5_node" .. i, translate("Socks5 Node"),
- translate("The client can use the router's Socks5 proxy"))
+ translate("The client can use the router's Socks5 proxy."))
else
o = s:option(ListValue, "socks5_node" .. i,
translate("Socks5 Node") .. " " .. i)
@@ -91,8 +95,8 @@ for i = 1, socks5_node_num, 1 do
end
---- DNS Forward Mode
-o = s:option(ListValue, "dns_mode", translate("DNS Forward Mode"), translate(
- "if you use no patterns are used, DNS of wan will be used by default as upstream of dnsmasq"))
+o = s:option(ListValue, "dns_mode", translate("DNS Mode"), translate(
+ "if has problem, please try another mode.
if you use no patterns are used, DNS of wan will be used by default as upstream of dnsmasq."))
o.rmempty = false
o:reset_values()
if is_finded("chinadns-ng") then o:value("chinadns-ng", "ChinaDNS-NG") end
@@ -105,15 +109,35 @@ end
o:value("local_7913", translate("Use local port 7913 as DNS"))
o:value("nonuse", translate("No patterns are used"))
----- DNS Forward
-o = s:option(Value, "dns_forward", translate("DNS Forward Address"))
-o.default = "8.8.4.4"
-o:value("8.8.4.4", "8.8.4.4 (Google DNS)")
-o:value("8.8.8.8", "8.8.8.8 (Google DNS)")
-o:value("208.67.222.222", "208.67.222.222 (OpenDNS DNS)")
-o:value("208.67.220.220", "208.67.220.220 (OpenDNS DNS)")
-o:depends("dns_mode", "dns2socks")
-o:depends("dns_mode", "pdnsd")
+---- China DNS Server
+o = s:option(Value, "up_china_dns", translate("China DNS Server") .. "(UDP)",
+ translate(
+ "Example: 127.0.0.1#6053 ,Represents DNS on using 127.0.0.1 the 6053 port. such as smartdns,AdGuard Home...
Only use two at most, english comma separation, If you do not fill in the # and the following port, you are using port 53.
If you use custom, unless you know what you're doing, setting it up incorrectly can cause your stuck to crash!"))
+o.default = "223.5.5.5"
+o:value("dnsbyisp", translate("dnsbyisp"))
+o:value("223.5.5.5", "223.5.5.5 (" .. translate("Ali") .. "DNS)")
+o:value("223.6.6.6", "223.6.6.6 (" .. translate("Ali") .. "DNS)")
+o:value("114.114.114.114", "114.114.114.114 (114DNS)")
+o:value("114.114.115.115", "114.114.115.115 (114DNS)")
+o:value("119.29.29.29", "119.29.29.29 (DNSPOD DNS)")
+o:value("182.254.116.116", "182.254.116.116 (DNSPOD DNS)")
+o:value("1.2.4.8", "1.2.4.8 (CNNIC DNS)")
+o:value("210.2.4.8", "210.2.4.8 (CNNIC DNS)")
+o:value("180.76.76.76", "180.76.76.76 (" .. translate("Baidu") .. "DNS)")
+
+---- Upstream trust DNS Server for ChinaDNS-NG
+o = s:option(Value, "up_trust_chinadns_ng_dns",
+ translate("Upstream trust DNS Server for ChinaDNS-NG") .. "(UDP)",
+ translate(
+ "Example: 127.0.0.1#5353 ,such as dns2socks,dns-forwarder...
Only use two at most, english comma separation, If you do not fill in the # and the following port, you are using port 53."))
+o.default = "8.8.4.4,8.8.8.8"
+o:value("8.8.4.4,8.8.8.8", "8.8.4.4, 8.8.8.8 (Google DNS)")
+o:value("208.67.222.222,208.67.220.220",
+ "208.67.222.222, 208.67.220.220 (Open DNS)")
+if is_finded("dns2socks") then
+ o:value("dns2socks", "dns2socks " .. translate("Need Socks5 server"))
+end
+o:depends("dns_mode", "chinadns-ng")
---- Use TCP Node Resolve DNS
o = s:option(Flag, "use_tcp_node_resolve_dns",
@@ -122,28 +146,27 @@ o = s:option(Flag, "use_tcp_node_resolve_dns",
o.default = 1
o:depends("dns_mode", "pdnsd")
----- upstreamm DNS Server for ChinaDNS-NG
-o = s:option(ListValue, "up_chinadns_ng_mode",
- translate("upstreamm DNS Server for ChinaDNS-NG"), translate(
- "Domestic DNS server in advanced Settings is used as domestic DNS by default"))
-o.default = "208.67.222.222"
-o:value("208.67.222.222", "208.67.222.222 (OpenDNS DNS)")
-o:value("208.67.220.220", "208.67.220.220 (OpenDNS DNS)")
-if is_finded("dns2socks") then
- o:value("dns2socks", "dns2socks " .. translate("Need Socks5 server"))
-end
-o:value("custom", translate("custom"))
-o:depends("dns_mode", "chinadns-ng")
+---- DNS Forward
+o = s:option(Value, "dns_forward", translate("DNS Address"))
+o.default = "8.8.4.4"
+o:value("8.8.4.4", "8.8.4.4 (Google DNS)")
+o:value("8.8.8.8", "8.8.8.8 (Google DNS)")
+o:value("208.67.222.222", "208.67.222.222 (Open DNS)")
+o:value("208.67.220.220", "208.67.220.220 (Open DNS)")
+o:depends("dns_mode", "dns2socks")
+o:depends("dns_mode", "pdnsd")
+o:depends("up_trust_chinadns_ng_dns", "dns2socks")
-o = s:option(Value, "up_chinadns_ng_custom", translate("DNS Server"), translate(
- "example: 127.0.0.1#5335
Need at least one,Other DNS services can be used as upstream, such as dns2socks."))
-o.default = "208.67.222.222#443"
-o:depends("up_chinadns_ng_mode", "custom")
+---- DNS Hijack
+o = s:option(Flag, "dns_53", translate("DNS Hijack"))
+o.default = 1
+o.rmempty = false
---- Default Proxy Mode
o = s:option(ListValue, "proxy_mode",
- translate("Default") .. translate("Proxy Mode"))
-o.default = "gfwlist"
+ translate("Default") .. translate("Proxy Mode"), translate(
+ "If using GFW mode is not available, try clearing the native cache."))
+o.default = "chnroute"
o.rmempty = false
o:value("disable", translate("No Proxy"))
o:value("global", translate("Global Proxy"))
@@ -155,14 +178,18 @@ o:value("returnhome", translate("Return Home"))
---- Localhost Proxy Mode
o = s:option(ListValue, "localhost_proxy_mode",
translate("Localhost") .. translate("Proxy Mode"), translate(
- "The server client can also use this rule to scientifically surf the Internet"))
+ "The server client can also use this rule to scientifically surf the Internet.
Global and continental whitelist are not recommended for non-special cases!"))
o:value("default", translate("Default"))
--- o:value("global", translate("Global Proxy").."("..translate("Danger")..")")
+o:value("global",
+ translate("Global Proxy") .. "(" .. translate("Danger") .. ")")
o:value("gfwlist", translate("GFW List"))
--- o:value("chnroute", translate("China WhiteList"))
+o:value("chnroute", translate("China WhiteList"))
o.default = "default"
o.rmempty = false
+---- Tips
+s:append(Template("passwall/global/tips"))
+
--[[
local apply = luci.http.formvalue("cbi.apply")
if apply then
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/node_config.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/node_config.lua
index edd89e2445..bb74c941f3 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/node_config.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/node_config.lua
@@ -3,8 +3,12 @@ local ipkg = require("luci.model.ipkg")
local appname = "passwall"
+local function get_customed_path(e)
+ return luci.model.cbi.passwall.api.api.uci_get_type("global_app", e .. "_file")
+end
+
local function is_finded(e)
- return luci.sys.exec("find /usr/*bin -iname " .. e .. " -type f") ~= "" and
+ return luci.sys.exec("find /usr/*bin %s -iname %s -type f" % {get_customed_path(e), e}) ~= "" and
true or false
end
@@ -62,7 +66,9 @@ if ((is_installed("redsocks2") or is_finded("redsocks2")) or
end
if is_finded("ss-redir") then type:value("SS", translate("Shadowsocks")) end
if is_finded("ssr-redir") then type:value("SSR", translate("ShadowsocksR")) end
-if is_installed("v2ray") then type:value("V2ray", translate("V2ray")) end
+if is_installed("v2ray") or is_finded("v2ray") then
+ type:value("V2ray", translate("V2ray"))
+end
if is_installed("brook") or is_finded("brook") then
type:value("Brook", translate("Brook"))
end
@@ -239,7 +245,7 @@ v2ray_tcp_guise_http_path:depends("v2ray_tcp_guise", "http")
v2ray_mkcp_guise = s:option(ListValue, "v2ray_mkcp_guise",
translate("Camouflage Type"), translate(
- '
none: default, no masquerade, data sent is packets with no characteristics.
srtp: disguised as an SRTP packet, it will be recognized as video call data (such as FaceTime).
utp: packets disguised as uTP will be recognized as bittorrent downloaded data.
wechat-video: packets disguised as WeChat video calls.
dtls: disguised as DTLS 1.2 packet.
wireguard: disguised as a WireGuard packet. (not really WireGuard protocol)'))
+ '
none: default, no masquerade, data sent is packets with no characteristics.
srtp: disguised as an SRTP packet, it will be recognized as video call data (such as FaceTime).
utp: packets disguised as uTP will be recognized as bittorrent downloaded data.
wechat-video: packets disguised as WeChat video calls.
dtls: disguised as DTLS 1.2 packet.
wireguard: disguised as a WireGuard packet. (not really WireGuard protocol)'))
for a, t in ipairs(v2ray_header_type_list) do v2ray_mkcp_guise:value(t) end
v2ray_mkcp_guise:depends("v2ray_transport", "mkcp")
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/node_list.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/node_list.lua
index dad2429867..c46ac6df5d 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/node_list.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/node_list.lua
@@ -11,16 +11,16 @@ m = Map(appname)
s = m:section(TypedSection, "global_other")
s.anonymous = true
----- Use TCPing
-o = s:option(Flag, "use_tcping", translate("Use TCPing"),
- translate("This will use tcping replace ping detection of node"))
-o.default = 1
-
---- Auto Ping
o = s:option(Flag, "auto_ping", translate("Auto Ping"),
translate("This will automatically ping the node for latency"))
o.default = 1
+---- Use TCP Detection delay
+o = s:option(Flag, "use_tcping", translate("Use TCP Detection delay"),
+ translate("This will use tcping replace ping detection of node"))
+o.default = 1
+
---- Concise display nodes
o = s:option(Flag, "compact_display_nodes", translate("Concise display nodes"))
o.default = 0
@@ -37,8 +37,8 @@ o.default = 1
s:append(Template("passwall/node_list/link_add_node"))
-- [[ Node List ]]--
-s = m:section(TypedSection, "nodes", translate(""), translate(
- "Support for more than 10,000 ping nodes and luci does not crash and not slow."))
+s = m:section(TypedSection, "nodes")
+-- s.description = translate("Support for more than 10,000 ping nodes and luci does not crash and not slow.")
s.anonymous = true
s.addremove = true
s.template = "cbi/tblsection"
@@ -85,9 +85,6 @@ if api.uci_get_type("global_other", "compact_display_nodes", "0") == "1" then
end
else
s.sortable = true
- ---- Remarks
- o = s:option(DummyValue, "remarks", translate("Remarks"))
-
---- Add Mode
if api.uci_get_type("global_other", "show_add_mode", "1") == "1" then
o = s:option(DummyValue, "add_mode", translate("Add Mode"))
@@ -101,6 +98,8 @@ else
return str
end
end
+ ---- Remarks
+ o = s:option(DummyValue, "remarks", translate("Remarks"))
---- Type
o = s:option(DummyValue, "type", translate("Type"))
@@ -129,18 +128,13 @@ end--]]
end
---- Ping
-o = s:option(DummyValue, "ping", translate("Ping"))
-o.width = "10%"
+o = s:option(DummyValue, "ping", translate("Latency"))
if api.uci_get_type("global_other", "auto_ping", "0") == "0" then
o.template = "passwall/node_list/ping"
else
o.template = "passwall/node_list/auto_ping"
end
----- Apply
-o = s:option(DummyValue, "apply", translate("Apply"))
-o.template = "passwall/node_list/apply"
-
m:append(Template("passwall/node_list/node_list"))
return m
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/other.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/other.lua
index b25390304d..ba7213a7b9 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/other.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/other.lua
@@ -46,81 +46,6 @@ o:depends("auto_on", "1")
o:value(nil, translate("Disable"))
for e = 0, 23 do o:value(e, e .. translate("oclock")) end
--- [[ DNS Settings ]]--
-s = m:section(TypedSection, "global_dns", translate("DNS Settings"))
-s.anonymous = true
-s.addremove = false
-
----- Mainland DNS Sever 1
-o = s:option(Value, "dns_1", translate("Mainland DNS Sever 1"))
-o.rmempty = false
-o.default = "dnsbyisp"
-o:value("dnsbyisp", translate("dnsbyisp"))
-o:value("223.5.5.5", "223.5.5.5(" .. translate("Ali") .. "DNS1)")
-o:value("223.6.6.6", "223.6.6.6(" .. translate("Ali") .. "DNS2)")
-o:value("114.114.114.114", "114.114.114.114(114DNS1)")
-o:value("114.114.115.115", "114.114.115.115(114DNS2)")
-o:value("119.29.29.29", "119.29.29.29(DNSPOD DNS1)")
-o:value("182.254.116.116", "182.254.116.116(DNSPOD DNS2)")
-o:value("1.2.4.8", "1.2.4.8(CNNIC DNS1)")
-o:value("210.2.4.8", "210.2.4.8(CNNIC DNS2)")
-o:value("180.76.76.76", "180.76.76.76(" .. translate("Baidu") .. "DNS)")
-
----- Mainland DNS Sever 2
-o = s:option(Value, "dns_2", translate("Mainland DNS Sever 2"))
-o.rmempty = false
-o.default = "223.5.5.5"
-o:value("dnsbyisp", translate("dnsbyisp"))
-o:value("223.5.5.5", "223.5.5.5(" .. translate("Ali") .. "DNS1)")
-o:value("223.6.6.6", "223.6.6.6(" .. translate("Ali") .. "DNS2)")
-o:value("114.114.114.114", "114.114.114.114(114DNS1)")
-o:value("114.114.115.115", "114.114.115.115(114DNS2)")
-o:value("119.29.29.29", "119.29.29.29(DNSPOD DNS1)")
-o:value("182.254.116.116", "182.254.116.116(DNSPOD DNS2)")
-o:value("1.2.4.8", "1.2.4.8(CNNIC DNS1)")
-o:value("210.2.4.8", "210.2.4.8(CNNIC DNS2)")
-o:value("180.76.76.76", "180.76.76.76(" .. translate("Baidu") .. "DNS)")
-
----- DNS Export Of Multi WAN
-o = s:option(ListValue, "dns_port", translate("DNS Export Of Multi WAN"),
- translate(
- "Only support Multi Wan. If no effect, please go to mwan3 to set."))
-o.rmempty = false
-o.default = 0
-o:value(0, translate("Auto"))
-for _, iface in ipairs(ifaces) do
- if (iface:match("^pppoe*")) then
- local nets = net:get_interface(iface)
- nets = nets and nets:get_networks() or {}
- for k, v in pairs(nets) do nets[k] = nets[k].sid end
- nets = table.concat(nets, ",")
- o:value(iface, ((#nets > 0) and "%s (%s)" % {iface, nets} or iface))
- end
-end
-
----- Node Export Of Multi WAN
-o = s:option(ListValue, "wan_port", translate("Node Export Of Multi WAN"),
- translate(
- "Only support Multi Wan. If no effect, please go to mwan3 to set."))
-o.default = 0
-o.rmempty = false
-o:value(0, translate("Auto"))
-for _, iface in ipairs(ifaces) do
- if (iface:match("^pppoe*")) then
- local nets = net:get_interface(iface)
- nets = nets and nets:get_networks() or {}
- for k, v in pairs(nets) do nets[k] = nets[k].sid end
- nets = table.concat(nets, ",")
- o:value(iface, ((#nets > 0) and "%s (%s)" % {iface, nets} or iface))
- end
-end
-
----- DNS Hijack
-o = s:option(Flag, "dns_53", translate("DNS Hijack"), translate(
- "If the GFW mode cannot be used normally, please enable it"))
-o.default = 1
-o.rmempty = false
-
-- [[ Forwarding Settings ]]--
s = m:section(TypedSection, "global_forwarding",
translate("Forwarding Settings"))
@@ -142,7 +67,7 @@ o:value("1:65535", translate("All"))
o:value("53", "53")
---- Multi SS/SSR Process Option
-o = s:option(Value, "process", translate("Multi Process Option"),
+--[[ o = s:option(Value, "process", translate("Multi Process Option"),
translate("you can start SS/SSR with multiple process"))
o.default = "0"
o.rmempty = false
@@ -151,6 +76,7 @@ o:value("1", translate("1 Process"))
o:value("2", "2 " .. translate("Process"))
o:value("3", "3 " .. translate("Process"))
o:value("4", "4 " .. translate("Process"))
+--]]
-- [[ Proxy Settings ]]--
s = m:section(TypedSection, "global_proxy", translate("Proxy Settings"))
@@ -187,15 +113,15 @@ o = s:option(Flag, "proxy_ipv6", translate("Proxy IPv6"),
o.default = 0
-- [[ Other Settings ]]--
-s = m:section(TypedSection, "global_other", translate("Other Settings"))
+s = m:section(TypedSection, "global_other", translate("Other Settings"),
+ translatef(
+ "You can only set up a maximum of %s nodes for the time being",
+ "3"))
s.anonymous = true
s.addremove = false
---- TCP Node Number Option
-o = s:option(ListValue, "tcp_node_num", "TCP" .. translate("Node Number"),
- translatef(
- "You can only set up a maximum of %s nodes for the time being",
- "3"))
+o = s:option(ListValue, "tcp_node_num", "TCP" .. translate("Node Number"))
o.default = "1"
o.rmempty = false
o:value("1")
@@ -203,10 +129,7 @@ o:value("2")
o:value("3")
---- UDP Node Number Option
-o = s:option(ListValue, "udp_node_num", "UDP" .. translate("Node Number"),
- translatef(
- "You can only set up a maximum of %s nodes for the time being",
- "3"))
+o = s:option(ListValue, "udp_node_num", "UDP" .. translate("Node Number"))
o.default = "1"
o.rmempty = false
o:value("1")
@@ -214,47 +137,35 @@ o:value("2")
o:value("3")
---- Socks5 Node Number Option
-o = s:option(ListValue, "socks5_node_num", "Socks5" .. translate("Node Number"),
- translatef(
- "You can only set up a maximum of %s nodes for the time being",
- "5"))
+o = s:option(ListValue, "socks5_node_num", "Socks5" .. translate("Node Number"))
o.default = "1"
o.rmempty = false
o:value("1")
o:value("2")
o:value("3")
-o:value("4")
-o:value("5")
---- 状态使用大图标
o = s:option(Flag, "status_use_big_icon", translate("Status Use Big Icon"))
+o.default = "1"
+o.rmempty = false
+
+---- 显示节点检测
+o = s:option(Flag, "status_show_check_port", translate("Status Show Check Port"))
+o.default = "0"
+o.rmempty = false
+
+---- 显示IP111
+o = s:option(Flag, "status_show_ip111", translate("Status Show IP111"))
o.default = "0"
o.rmempty = false
---- Hide Menu
o = s:option(Button, "hide", translate("Hide Menu"), translate(
- "After the hidden to the display, type in the address bar enter the admin/vpn/passwall/show, such as: http://192.168.1.1/cgi-bin/luci/admin/vpn/passwall/show"))
+ "After the hidden to the display, type in the address bar enter the admin/vpn/passwall/show.
such as: http://192.168.1.1/cgi-bin/luci/admin/vpn/passwall/show"))
o.inputstyle = "remove"
function o.write(e, e)
luci.http.redirect(luci.dispatcher.build_url("admin", "vpn", "passwall",
"hide"))
end
--- [[ Custom Dnsmasq Settings ]]--
---[[
-s = m:section(TypedSection, "global", translate("Custom Dnsmasq"))
-s.anonymous = true
-local e = "/usr/share/passwall/dnsmasq.d/user.conf"
-o = s:option(TextValue, "userconf")
-o.description = translate("Setting a parameter error will cause dnsmasq fail to start.")
-o.rows = 15
-o.wrap = "off"
-o.cfgvalue = function(a, a)
-return fs.readfile(e)or""
-end
-o.write = function(o, o, a)
-fs.writefile(e, a:gsub("\r\n", "\n"))
-end
-]] --
-
return m
diff --git a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/rule.lua b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/rule.lua
index 914e3668b1..7d19957eab 100644
--- a/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/rule.lua
+++ b/package/lienol/luci-app-passwall/luasrc/model/cbi/passwall/rule.lua
@@ -58,8 +58,8 @@ for e = 0, 23 do o:value(e, e .. translate("oclock")) end
o.default = 0
o:depends("auto_update_subscribe", 1)
----- Subscribe Manually update
-o = s:option(Button, "_update", translate("Manually update"))
+---- Manual subscription
+o = s:option(Button, "_update", translate("Manual subscription"))
o.inputstyle = "apply"
function o.write(e, e)
luci.sys
@@ -72,8 +72,7 @@ end
o = s:option(Button, "_stop", translate("Delete All Subscribe Node"))
o.inputstyle = "remove"
function o.write(e, e)
- luci.sys.call(
- "nohup /usr/share/passwall/subscription.sh stop > /dev/null 2>&1 &")
+ luci.sys.call("/usr/share/passwall/subscription.sh stop")
luci.http.redirect(luci.dispatcher.build_url("admin", "vpn", "passwall",
"log"))
end
diff --git a/package/lienol/luci-app-passwall/luasrc/view/passwall/global/status.htm b/package/lienol/luci-app-passwall/luasrc/view/passwall/global/status.htm
index 55b5282ee3..e5e1972377 100644
--- a/package/lienol/luci-app-passwall/luasrc/view/passwall/global/status.htm
+++ b/package/lienol/luci-app-passwall/luasrc/view/passwall/global/status.htm
@@ -14,6 +14,9 @@ end
local tcp_node_num = api.uci_get_type("global_other", "tcp_node_num", 1)
local udp_node_num = api.uci_get_type("global_other", "udp_node_num", 1)
local socks5_node_num = api.uci_get_type("global_other", "socks5_node_num", 1)
+
+local status_show_check_port = api.uci_get_type("global_other", "status_show_check_port", 0)
+local status_show_ip111 = api.uci_get_type("global_other", "status_show_ip111", 0)
-%>