mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 19:12:33 +08:00
luci-app-passwall: bump to 3.9-39
This commit is contained in:
parent
dc9d40d98f
commit
d075409083
@ -7,8 +7,8 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=luci-app-passwall
|
PKG_NAME:=luci-app-passwall
|
||||||
PKG_VERSION:=3.9
|
PKG_VERSION:=3.9
|
||||||
PKG_RELEASE:=38
|
PKG_RELEASE:=39
|
||||||
PKG_DATE:=20200817
|
PKG_DATE:=20200819
|
||||||
|
|
||||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
|
|
||||||
|
@ -18,23 +18,26 @@ function index()
|
|||||||
if nixio.fs.access("/etc/config/passwall_show") then
|
if nixio.fs.access("/etc/config/passwall_show") then
|
||||||
entry({"admin", "services", appname}, alias("admin", "services", appname, "settings"), _("Pass Wall"), 1).dependent = true
|
entry({"admin", "services", appname}, alias("admin", "services", appname, "settings"), _("Pass Wall"), 1).dependent = true
|
||||||
end
|
end
|
||||||
entry({"admin", "services", appname, "settings"}, cbi("passwall/global"), _("Basic Settings"), 1).dependent = true
|
--[[ Client ]]
|
||||||
entry({"admin", "services", appname, "node_list"}, cbi("passwall/node_list"), _("Node List"), 2).dependent = true
|
entry({"admin", "services", appname, "settings"}, cbi(appname .. "/client/global"), _("Basic Settings"), 1).dependent = true
|
||||||
entry({"admin", "services", appname, "auto_switch"}, cbi("passwall/auto_switch"), _("Auto Switch"), 3).leaf = true
|
entry({"admin", "services", appname, "node_list"}, cbi(appname .. "/client/node_list"), _("Node List"), 2).dependent = true
|
||||||
entry({"admin", "services", appname, "other"}, cbi("passwall/other", {autoapply = true}), _("Other Settings"), 92).leaf = true
|
entry({"admin", "services", appname, "auto_switch"}, cbi(appname .. "/client/auto_switch"), _("Auto Switch"), 3).leaf = true
|
||||||
|
entry({"admin", "services", appname, "other"}, cbi(appname .. "/client/other", {autoapply = true}), _("Other Settings"), 92).leaf = true
|
||||||
if nixio.fs.access("/usr/sbin/haproxy") then
|
if nixio.fs.access("/usr/sbin/haproxy") then
|
||||||
entry({"admin", "services", appname, "haproxy"}, cbi("passwall/haproxy"), _("Load Balancing"), 93).leaf = true
|
entry({"admin", "services", appname, "haproxy"}, cbi(appname .. "/client/haproxy"), _("Load Balancing"), 93).leaf = true
|
||||||
end
|
end
|
||||||
entry({"admin", "services", appname, "node_subscribe"}, cbi("passwall/node_subscribe"), _("Node Subscribe"), 94).dependent = true
|
entry({"admin", "services", appname, "node_subscribe"}, cbi(appname .. "/client/node_subscribe"), _("Node Subscribe"), 94).dependent = true
|
||||||
entry({"admin", "services", appname, "app_update"}, cbi("passwall/app_update"), _("App Update"), 95).leaf = true
|
entry({"admin", "services", appname, "app_update"}, cbi(appname .. "/client/app_update"), _("App Update"), 95).leaf = true
|
||||||
entry({"admin", "services", appname, "rule"}, cbi("passwall/rule"), _("Rule Manage"), 96).leaf = true
|
entry({"admin", "services", appname, "rule"}, cbi(appname .. "/client/rule"), _("Rule Manage"), 96).leaf = true
|
||||||
entry({"admin", "services", appname, "rule_list"}, cbi("passwall/rule_list"), _("Rule List Manage"), 97).leaf = true
|
entry({"admin", "services", appname, "rule_list"}, cbi(appname .. "/client/rule_list"), _("Rule List Manage"), 97).leaf = true
|
||||||
entry({"admin", "services", appname, "node_config"}, cbi("passwall/node_config")).leaf = true
|
entry({"admin", "services", appname, "node_config"}, cbi(appname .. "/client/node_config")).leaf = true
|
||||||
entry({"admin", "services", appname, "shunt_rules"}, cbi("passwall/shunt_rules")).leaf = true
|
entry({"admin", "services", appname, "shunt_rules"}, cbi(appname .. "/client/shunt_rules")).leaf = true
|
||||||
entry({"admin", "services", appname, "acl"}, cbi("passwall/acl"), _("Access control"), 98).leaf = true
|
entry({"admin", "services", appname, "acl"}, cbi(appname .. "/client/acl"), _("Access control"), 98).leaf = true
|
||||||
entry({"admin", "services", appname, "server"}, cbi("passwall/server/index"), _("Server-Side"), 99).leaf = true
|
entry({"admin", "services", appname, "log"}, form(appname .. "/client/log"), _("Watch Logs"), 999).leaf = true
|
||||||
entry({"admin", "services", appname, "log"}, form("passwall/log"), _("Watch Logs"), 999).leaf = true
|
|
||||||
entry({"admin", "services", appname, "server_user"}, cbi("passwall/server/user")).leaf = true
|
--[[ Server ]]
|
||||||
|
entry({"admin", "services", appname, "server"}, cbi(appname .. "/server/index"), _("Server-Side"), 99).leaf = true
|
||||||
|
entry({"admin", "services", appname, "server_user"}, cbi(appname .. "/server/user")).leaf = true
|
||||||
|
|
||||||
--[[ API ]]
|
--[[ API ]]
|
||||||
entry({"admin", "services", appname, "server_user_status"}, call("server_user_status")).leaf = true
|
entry({"admin", "services", appname, "server_user_status"}, call("server_user_status")).leaf = true
|
||||||
@ -56,8 +59,6 @@ function index()
|
|||||||
entry({"admin", "services", appname, "clear_all_nodes"}, call("clear_all_nodes")).leaf = true
|
entry({"admin", "services", appname, "clear_all_nodes"}, call("clear_all_nodes")).leaf = true
|
||||||
entry({"admin", "services", appname, "delete_select_nodes"}, call("delete_select_nodes")).leaf = true
|
entry({"admin", "services", appname, "delete_select_nodes"}, call("delete_select_nodes")).leaf = true
|
||||||
entry({"admin", "services", appname, "update_rules"}, call("update_rules")).leaf = true
|
entry({"admin", "services", appname, "update_rules"}, call("update_rules")).leaf = true
|
||||||
entry({"admin", "services", appname, "luci_check"}, call("luci_check")).leaf = true
|
|
||||||
entry({"admin", "services", appname, "luci_update"}, call("luci_update")).leaf = true
|
|
||||||
entry({"admin", "services", appname, "kcptun_check"}, call("kcptun_check")).leaf = true
|
entry({"admin", "services", appname, "kcptun_check"}, call("kcptun_check")).leaf = true
|
||||||
entry({"admin", "services", appname, "kcptun_update"}, call("kcptun_update")).leaf = true
|
entry({"admin", "services", appname, "kcptun_update"}, call("kcptun_update")).leaf = true
|
||||||
entry({"admin", "services", appname, "brook_check"}, call("brook_check")).leaf = true
|
entry({"admin", "services", appname, "brook_check"}, call("brook_check")).leaf = true
|
||||||
@ -169,7 +170,7 @@ function connect_status()
|
|||||||
local e = {}
|
local e = {}
|
||||||
e.use_time = ""
|
e.use_time = ""
|
||||||
local url = luci.http.formvalue("url")
|
local url = luci.http.formvalue("url")
|
||||||
local result = luci.sys.exec('curl --connect-timeout 5 -o /dev/null -I -skL -w "%{http_code}:%{time_starttransfer}" ' .. url)
|
local result = luci.sys.exec('curl --connect-timeout 3 -o /dev/null -I -skL -w "%{http_code}:%{time_starttransfer}" ' .. url)
|
||||||
local code = tonumber(luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $1}'") or "0")
|
local code = tonumber(luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $1}'") or "0")
|
||||||
if code ~= 0 then
|
if code ~= 0 then
|
||||||
local use_time = luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $2}'")
|
local use_time = luci.sys.exec("echo -n '" .. result .. "' | awk -F ':' '{print $2}'")
|
||||||
|
@ -0,0 +1,43 @@
|
|||||||
|
local d = require "luci.dispatcher"
|
||||||
|
local appname = "passwall"
|
||||||
|
|
||||||
|
m = Map(appname, "V2ray" .. translate("Shunt") .. translate("Rule"))
|
||||||
|
m.redirect = d.build_url("admin", "services", appname)
|
||||||
|
|
||||||
|
s = m:section(NamedSection, arg[1], "shunt_rules", "")
|
||||||
|
s.addremove = false
|
||||||
|
s.dynamic = false
|
||||||
|
|
||||||
|
remarks = s:option(Value, "remarks", translate("Remarks"))
|
||||||
|
remarks.default = arg[1]
|
||||||
|
remarks.rmempty = false
|
||||||
|
|
||||||
|
domain_list = s:option(TextValue, "domain_list", translate("Domain"))
|
||||||
|
domain_list.rows = 15
|
||||||
|
domain_list.wrap = "off"
|
||||||
|
domain_list.validate = function(self, value)
|
||||||
|
local hosts= {}
|
||||||
|
string.gsub(value, '[^' .. "\r\n" .. ']+', function(w) table.insert(hosts, w) end)
|
||||||
|
for index, host in ipairs(hosts) do
|
||||||
|
if not datatypes.hostname(host) then
|
||||||
|
return nil, host .. " " .. translate("Not valid domain name, please re-enter!")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return value
|
||||||
|
end
|
||||||
|
|
||||||
|
ip_list = s:option(TextValue, "ip_list", "IP")
|
||||||
|
ip_list.rows = 15
|
||||||
|
ip_list.wrap = "off"
|
||||||
|
ip_list.validate = function(self, value)
|
||||||
|
local ipmasks= {}
|
||||||
|
string.gsub(value, '[^' .. "\r\n" .. ']+', function(w) table.insert(ipmasks, w) end)
|
||||||
|
for index, ipmask in ipairs(ipmasks) do
|
||||||
|
if not datatypes.ipmask4(ipmask) then
|
||||||
|
return nil, ipmask .. " " .. translate("Not valid IP format, please re-enter!")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return value
|
||||||
|
end
|
||||||
|
|
||||||
|
return m
|
@ -1,21 +0,0 @@
|
|||||||
local d = require "luci.dispatcher"
|
|
||||||
local appname = "passwall"
|
|
||||||
|
|
||||||
m = Map(appname, "V2ray" .. translate("Shunt") .. translate("Rule"))
|
|
||||||
m.redirect = d.build_url("admin", "services", appname)
|
|
||||||
|
|
||||||
s = m:section(NamedSection, arg[1], "shunt_rules", "")
|
|
||||||
s.addremove = false
|
|
||||||
s.dynamic = false
|
|
||||||
|
|
||||||
remarks = s:option(Value, "remarks", translate("Remarks"))
|
|
||||||
remarks.default = arg[1]
|
|
||||||
remarks.rmempty = false
|
|
||||||
|
|
||||||
domain_list = s:option(TextValue, "domain_list", translate("Domain"))
|
|
||||||
domain_list.rows = 15
|
|
||||||
|
|
||||||
ip_list = s:option(TextValue, "ip_list", "IP")
|
|
||||||
ip_list.rows = 15
|
|
||||||
|
|
||||||
return m
|
|
@ -171,7 +171,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="pure-u-1-4 check" onclick="check_connect('google', 'www.google.com/generate_204')">
|
<div class="pure-u-1-4 check" onclick="check_connect('google', 'https://www.google.com/generate_204')">
|
||||||
<div class="block pure-g">
|
<div class="block pure-g">
|
||||||
<div class="pure-u-8-24">
|
<div class="pure-u-8-24">
|
||||||
<div class="img-con">
|
<div class="img-con">
|
||||||
|
@ -29,6 +29,7 @@ blinkbox.com
|
|||||||
brightcove.com
|
brightcove.com
|
||||||
caddyserver.com
|
caddyserver.com
|
||||||
cbs.com
|
cbs.com
|
||||||
|
cloudflare-dns.com
|
||||||
cloudfront.net
|
cloudfront.net
|
||||||
conviva.com
|
conviva.com
|
||||||
crackle.com
|
crackle.com
|
||||||
@ -37,6 +38,8 @@ crwdcntrl.net
|
|||||||
cwtv.com
|
cwtv.com
|
||||||
disney.com
|
disney.com
|
||||||
disneyjunior.com
|
disneyjunior.com
|
||||||
|
dns.google
|
||||||
|
dns.quad9.net
|
||||||
easylist-downloads.adblockplus.org
|
easylist-downloads.adblockplus.org
|
||||||
edgecastcdn.net
|
edgecastcdn.net
|
||||||
edgekey.net
|
edgekey.net
|
||||||
@ -57,6 +60,9 @@ githubassets.com
|
|||||||
githubusercontent.com
|
githubusercontent.com
|
||||||
gnews.org
|
gnews.org
|
||||||
go.com
|
go.com
|
||||||
|
google.com
|
||||||
|
google.com.hk
|
||||||
|
google.com.tw
|
||||||
googleapis.com
|
googleapis.com
|
||||||
googletagmanager.com
|
googletagmanager.com
|
||||||
googleusercontent.com
|
googleusercontent.com
|
||||||
@ -100,6 +106,7 @@ nflximg.net
|
|||||||
nflxso.net
|
nflxso.net
|
||||||
nflxvideo.net
|
nflxvideo.net
|
||||||
omtrdc.net
|
omtrdc.net
|
||||||
|
one.one.one.one
|
||||||
open.live.bbc.co.uk
|
open.live.bbc.co.uk
|
||||||
openwrt.proxy.ustclug.org
|
openwrt.proxy.ustclug.org
|
||||||
openx.net
|
openx.net
|
||||||
@ -117,6 +124,7 @@ sling.com
|
|||||||
southpark.cc.com
|
southpark.cc.com
|
||||||
spike.com
|
spike.com
|
||||||
srip.net
|
srip.net
|
||||||
|
stripe.com
|
||||||
theplatform.com
|
theplatform.com
|
||||||
ttvnw.net
|
ttvnw.net
|
||||||
turner.com
|
turner.com
|
||||||
@ -132,7 +140,4 @@ xboxlive.com
|
|||||||
youtu.be
|
youtu.be
|
||||||
youtube.com
|
youtube.com
|
||||||
ytimg.com
|
ytimg.com
|
||||||
dns.google
|
zerotier.com
|
||||||
cloudflare-dns.com
|
|
||||||
one.one.one.one
|
|
||||||
dns.quad9.net
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user