luci-app-passwall: bump to 3.9-41
This commit is contained in:
parent
28af7f5183
commit
f5797e4daa
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2018-2020 Lienol <lawlienol@gmail.com>
|
||||
# Copyright (C) 2018-2020 L-WRT Team
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v3.
|
||||
#
|
||||
@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-passwall
|
||||
PKG_VERSION:=3.9
|
||||
PKG_RELEASE:=39
|
||||
PKG_DATE:=20200819
|
||||
PKG_RELEASE:=41
|
||||
PKG_DATE:=20200820
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
-- Copyright 2018-2020 Lienol <lawlienol@gmail.com>
|
||||
-- Copyright (C) 2018-2020 L-WRT Team
|
||||
module("luci.controller.passwall", package.seeall)
|
||||
local appname = "passwall"
|
||||
local ucic = luci.model.uci.cursor()
|
||||
@ -187,7 +187,8 @@ function ping_node()
|
||||
local port = luci.http.formvalue("port")
|
||||
local e = {}
|
||||
e.index = index
|
||||
if (ucic:get(appname, "@global_other[0]", "use_tcping") or 1) == "1" and luci.sys.exec("echo -n $(command -v tcping)") ~= "" then
|
||||
local nodes_ping = ucic:get(appname, "@global_other[0]", "nodes_ping") or ""
|
||||
if nodes_ping:find("tcping") and luci.sys.exec("echo -n $(command -v tcping)") ~= "" then
|
||||
e.ping = luci.sys.exec(string.format("echo -n $(tcping -q -c 1 -i 1 -t 2 -p %s %s 2>&1 | grep -o 'time=[0-9]*' | awk -F '=' '{print $2}') 2>/dev/null", port, address))
|
||||
end
|
||||
if e.ping == nil or tonumber(e.ping) == 0 then
|
||||
|
||||
@ -50,8 +50,8 @@ uci:foreach(appname, "socks", function(s)
|
||||
end)
|
||||
|
||||
m = Map(appname)
|
||||
local status_use_big_icon = m:get("@global_other[0]", "status_use_big_icon") or 1
|
||||
if status_use_big_icon and tonumber(status_use_big_icon) == 1 then
|
||||
local status = m:get("@global_other[0]", "status") or ""
|
||||
if status:find("big_icon") then
|
||||
m:append(Template(appname .. "/global/status"))
|
||||
else
|
||||
m:append(Template(appname .. "/global/status2"))
|
||||
@ -182,6 +182,12 @@ o:depends({dns_mode = "chinadns-ng", up_trust_chinadns_ng_dns = "dns2socks"})
|
||||
o:depends({dns_mode = "dns2socks"})
|
||||
o:depends({dns_mode = "pdnsd"})
|
||||
|
||||
o = s:taboption("DNS", Button, "clear_ipset", translate("Clear IPSET"))
|
||||
o.inputstyle = "remove"
|
||||
function o.write(e, e)
|
||||
luci.sys.call("/etc/init.d/" .. appname .. " stop && /usr/share/" .. appname .. "/iptables.sh flush_ipset && /etc/init.d/" .. appname .. " restart")
|
||||
end
|
||||
|
||||
s:tab("Proxy", translate("Mode"))
|
||||
|
||||
---- TCP Default Proxy Mode
|
||||
@ -225,6 +231,11 @@ o:value("global", translate("Global Proxy"))
|
||||
o.default = "default"
|
||||
o.rmempty = false
|
||||
|
||||
s:tab("tips", translate("Tips"))
|
||||
|
||||
o = s:taboption("tips", DummyValue, "")
|
||||
o.template = appname .. "/global/tips"
|
||||
|
||||
-- [[ Socks Server ]]--
|
||||
s = m:section(TypedSection, "socks", translate("Socks Config"))
|
||||
s.anonymous = true
|
||||
|
||||
@ -8,31 +8,21 @@ m = Map(appname)
|
||||
s = m:section(TypedSection, "global_other")
|
||||
s.anonymous = true
|
||||
|
||||
---- Auto Ping
|
||||
o = s:option(Flag, "auto_ping", translate("Auto Ping"),
|
||||
translate("This will automatically ping the node for latency"))
|
||||
o.default = 1
|
||||
o = s:option(MultiValue, "nodes_ping", "Ping")
|
||||
o:value("auto_ping", translate("Auto Ping"), translate("This will automatically ping the node for latency"))
|
||||
o:value("tcping", translate("Tcping"), translate("This will use tcping replace ping detection of node"))
|
||||
|
||||
---- 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
|
||||
|
||||
---- Show Add Mode
|
||||
o = s:option(Flag, "show_add_mode", translate("Show Add Mode"))
|
||||
o.default = 1
|
||||
|
||||
---- Show group
|
||||
o = s:option(Flag, "show_group", translate("Show Group"))
|
||||
o.default = 1
|
||||
o = s:option(MultiValue, "nodes_display", translate("Operation"))
|
||||
o:value("compact_display_nodes", translate("Concise display nodes"))
|
||||
o:value("show_add_mode", translate("Show Add Mode"))
|
||||
o:value("show_group", translate("Show Group"))
|
||||
|
||||
-- [[ Add the node via the link ]]--
|
||||
s:append(Template(appname .. "/node_list/link_add_node"))
|
||||
|
||||
local nodes_ping = m:get("@global_other[0]", "nodes_ping") or ""
|
||||
local nodes_display = m:get("@global_other[0]", "nodes_display") or ""
|
||||
|
||||
-- [[ Node List ]]--
|
||||
s = m:section(TypedSection, "nodes")
|
||||
s.anonymous = true
|
||||
@ -52,7 +42,7 @@ function s.remove(e, t)
|
||||
luci.http.redirect(d.build_url("admin", "services", appname, "node_list"))
|
||||
end
|
||||
|
||||
if m:get("@global_other[0]", "show_group") == "1" then
|
||||
if nodes_display:find("show_group") then
|
||||
show_group = s:option(DummyValue, "group", translate("Group"))
|
||||
show_group.cfgvalue = function(t, n)
|
||||
local group = m:get(n, "group") or "无"
|
||||
@ -62,7 +52,7 @@ end
|
||||
|
||||
s.sortable = true
|
||||
-- 简洁模式
|
||||
if m:get("@global_other[0]", "compact_display_nodes") == "1" then
|
||||
if nodes_display:find("compact_display_nodes") then
|
||||
if show_group then show_group.width = "25%" end
|
||||
o = s:option(DummyValue, "remarks", translate("Remarks"))
|
||||
o.cfgvalue = function(t, n)
|
||||
@ -90,7 +80,7 @@ if m:get("@global_other[0]", "compact_display_nodes") == "1" then
|
||||
end
|
||||
else
|
||||
---- Add Mode
|
||||
if m:get("@global_other[0]", "show_add_mode") == "1" then
|
||||
if nodes_display:find("show_add_mode") then
|
||||
o = s:option(DummyValue, "add_mode", translate("Add Mode"))
|
||||
o.cfgvalue = function(t, n)
|
||||
local v = Value.cfgvalue(t, n)
|
||||
@ -140,7 +130,8 @@ end
|
||||
|
||||
---- Ping
|
||||
o = s:option(DummyValue, "ping", translate("Latency"))
|
||||
if m:get("@global_other[0]", "auto_ping") == "0" then
|
||||
o.width = "6%"
|
||||
if not nodes_ping:find("auto_ping") then
|
||||
o.template = appname .. "/node_list/ping"
|
||||
else
|
||||
o.template = appname .. "/node_list/auto_ping"
|
||||
|
||||
@ -144,21 +144,10 @@ o:value("1")
|
||||
o:value("2")
|
||||
o:value("3")
|
||||
|
||||
---- 状态使用大图标
|
||||
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
|
||||
o = s:option(MultiValue, "status", translate("Status info"))
|
||||
o:value("big_icon", translate("Big icon")) -- 大图标
|
||||
o:value("show_check_port", translate("Show node check")) -- 显示节点检测
|
||||
o:value("show_ip111", translate("Show Show IP111")) -- 显示IP111
|
||||
|
||||
local nodes_table = {}
|
||||
uci:foreach(appname, "nodes", function(e)
|
||||
|
||||
@ -5,8 +5,7 @@ local api = require "luci.model.cbi.passwall.api.api"
|
||||
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 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)
|
||||
local status = api.uci_get_type("global_other", "status", "")
|
||||
-%>
|
||||
|
||||
<style>
|
||||
@ -195,7 +194,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% if tonumber(status_show_check_port) == 1 then %>
|
||||
<% if status:find("show_check_port") then %>
|
||||
<div class="pure-u-1-2 check" onclick="check_port(this)">
|
||||
<div class="block pure-g">
|
||||
<div class="pure-u-1-5">
|
||||
@ -210,7 +209,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if tonumber(status_show_ip111) == 1 then %>
|
||||
<% if status:find("show_ip111") then %>
|
||||
<div class="pure-u-1-2 check" onclick="javascript:window.open('http://www.ip111.cn/','target');">
|
||||
<div class="block pure-g">
|
||||
<div class="pure-u-1-5">
|
||||
|
||||
@ -5,8 +5,7 @@ local api = require "luci.model.cbi.passwall.api.api"
|
||||
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 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)
|
||||
local status = api.uci_get_type("global_other", "status", "")
|
||||
-%>
|
||||
|
||||
<style>
|
||||
@ -130,7 +129,7 @@ local status_show_ip111 = api.uci_get_type("global_other", "status_show_ip111",
|
||||
<font id="_github_status"></font>
|
||||
</div>
|
||||
</div>
|
||||
<% if tonumber(status_show_check_port) == 1 then %>
|
||||
<% if status:find("show_check_port") then %>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title">
|
||||
<%:Node Check%>
|
||||
@ -142,7 +141,7 @@ local status_show_ip111 = api.uci_get_type("global_other", "status_show_ip111",
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% if tonumber(status_show_ip111) == 1 then %>
|
||||
<% if status:find("show_ip111") then %>
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"></label>
|
||||
<div class="cbi-value-field">
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<div class="cbi-section cbi-tblsection"><h3><%:Tips%></h3>
|
||||
<div>
|
||||
<div class="cbi-section cbi-tblsection">
|
||||
<!-- <h3><%:Tips%></h3> -->
|
||||
<div>
|
||||
<%:You can use load balancing for failover.%>
|
||||
<br />
|
||||
<%:Restore the default configuration method. Input example in the address bar:%> http://192.168.1.1/cgi-bin/luci/admin/services/passwall/reset_config
|
||||
|
||||
@ -133,11 +133,12 @@ local dsp = require "luci.dispatcher"
|
||||
</div>
|
||||
|
||||
<div class="cbi-value">
|
||||
<label class="cbi-value-title"><%:Operation%></label>
|
||||
<label class="cbi-value-title"></label>
|
||||
<div class="cbi-value-field">
|
||||
<input class="cbi-button cbi-button-add" type="button" onclick="open_add_link_div()" value="<%:Add the node via the link%>" />
|
||||
<input class="cbi-button cbi-button-remove" type="button" onclick="clear_all_nodes()" value="<%:Clear all nodes%>" />
|
||||
<input class="cbi-button cbi-button-remove" type="button" onclick="delete_select_nodes()" value="<%:Delete select nodes%>" />
|
||||
<input class="cbi-button" type="button" onclick="select_all(this)" value="<%:Select all%>" />
|
||||
<input class="cbi-button cbi-button-apply" type="submit" name="cbi.apply" value="<%:Save & Apply%>" />
|
||||
</div>
|
||||
</div>
|
||||
@ -1,11 +1,11 @@
|
||||
<%
|
||||
-- Copyright 2018-2020 Lienol <lawlienol@gmail.com>
|
||||
-- Copyright (C) 2018-2020 L-WRT Team
|
||||
local api = require "luci.model.cbi.passwall.api.api"
|
||||
local dsp = require "luci.dispatcher"
|
||||
|
||||
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 compact_display_nodes = api.uci_get_type("global_other", "compact_display_nodes", 1)
|
||||
local nodes_display = api.uci_get_type("global_other", "nodes_display", "")
|
||||
-%>
|
||||
|
||||
<style>
|
||||
@ -15,7 +15,7 @@ table th, .table .th {
|
||||
|
||||
table td, .table .td {
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
/* white-space: nowrap; */
|
||||
word-break: keep-all;
|
||||
}
|
||||
|
||||
@ -197,7 +197,7 @@ table td, .table .td {
|
||||
}
|
||||
|
||||
function get_address_full(id) {
|
||||
<% if compact_display_nodes and tonumber(compact_display_nodes) == 1 then %>
|
||||
<% if nodes_display:find("compact_display_nodes") then %>
|
||||
var remarks = document.getElementById("cbid.passwall." + id + ".remarks").value;
|
||||
var result = remarks.match("\\((.+?)\\)");
|
||||
if (result != null) {
|
||||
|
||||
@ -187,6 +187,9 @@ msgstr "域名过滤服务(用于被代理的域名)"
|
||||
msgid "Cache Resolved"
|
||||
msgstr "缓存解析结果"
|
||||
|
||||
msgid "Clear IPSET"
|
||||
msgstr "清空 IPSET"
|
||||
|
||||
msgid "IP:Port mode acceptable, the 1st for 'dns2socks' if split with english comma."
|
||||
msgstr "接受 IP:Port 形式的输入,多个以英文逗号分隔 ,'dns2socks' 模式下仅首个有效。"
|
||||
|
||||
@ -916,14 +919,17 @@ msgstr "节点数量"
|
||||
msgid "You can only set up a maximum of %s nodes for the time being, Used for access control."
|
||||
msgstr "目前最多只能设置%s个节点,用于给访问控制使用。"
|
||||
|
||||
msgid "Status Use Big Icon"
|
||||
msgstr "状态信息使用大图标"
|
||||
msgid "Status info"
|
||||
msgstr "状态信息"
|
||||
|
||||
msgid "Status Show Check Port"
|
||||
msgstr "状态信息显示节点检测"
|
||||
msgid "Big icon"
|
||||
msgstr "大图标"
|
||||
|
||||
msgid "Status Show IP111"
|
||||
msgstr "状态信息显示IP111"
|
||||
msgid "Show node check"
|
||||
msgstr "显示节点检测"
|
||||
|
||||
msgid "Show Show IP111"
|
||||
msgstr "显示IP111"
|
||||
|
||||
msgid "Hide menu method, input example in the address bar:"
|
||||
msgstr "隐藏菜单方法,地址栏输入例:"
|
||||
|
||||
@ -30,25 +30,20 @@ config global_forwarding
|
||||
option proxy_ipv6 '0'
|
||||
|
||||
config global_other
|
||||
option use_tcping '1'
|
||||
option auto_ping '1'
|
||||
option tcp_node_num '1'
|
||||
option udp_node_num '1'
|
||||
option status_use_big_icon '1'
|
||||
option status_show_check_port '0'
|
||||
option status_show_ip111 '0'
|
||||
option compact_display_nodes '0'
|
||||
option show_group '0'
|
||||
option show_add_mode '0'
|
||||
option status 'big_icon show_check_port show_ip111'
|
||||
option nodes_ping 'auto_ping tcping'
|
||||
option nodes_display 'compact_display_nodes show_add_mode'
|
||||
|
||||
config global_rules
|
||||
option auto_update '0'
|
||||
option chnlist_update '1'
|
||||
option chnroute_update '1'
|
||||
option gfwlist_update '1'
|
||||
option gfwlist_version '2020-04-14'
|
||||
option chnroute_version '2020-05-22'
|
||||
option chnlist_version '2020-05-22'
|
||||
option gfwlist_version '2020-08-20'
|
||||
option chnroute_version '2020-08-20'
|
||||
option chnlist_version '2020-08-20'
|
||||
option enable_custom_url '0'
|
||||
option gfwlist_url 'https://cdn.jsdelivr.net/gh/Loukky/gfwlist-by-loukky/gfwlist.txt'
|
||||
option chnroute_url 'https://ispip.clang.cn/all_cn.txt'
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2018-2020 Lienol <lawlienol@gmail.com>
|
||||
# Copyright (C) 2018-2020 L-WRT Team
|
||||
|
||||
. $IPKG_INSTROOT/lib/functions.sh
|
||||
. $IPKG_INSTROOT/lib/functions/service.sh
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -2,3 +2,5 @@ apple.com
|
||||
microsoft.com
|
||||
dyndns.com
|
||||
rrys.tv
|
||||
douyucdn.cn
|
||||
douyucdn2.cn
|
||||
File diff suppressed because it is too large
Load Diff
@ -132,6 +132,7 @@ turnin.com
|
||||
tvb.com
|
||||
twitch.tv
|
||||
uplynk.com
|
||||
v2fly.org
|
||||
vudu.com
|
||||
warnerbros.com
|
||||
wdtvlive.com
|
||||
|
||||
Loading…
Reference in New Issue
Block a user