mirror of
https://github.com/roacn/openwrt-packages.git
synced 2025-01-07 03:16:45 +08:00
🗽 Sync 2024-05-31 00:26
This commit is contained in:
parent
a3d686c44d
commit
c5c21368f2
@ -3,7 +3,6 @@ local appname = "passwall"
|
|||||||
local sys = api.sys
|
local sys = api.sys
|
||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
s = m:section(TypedSection, "global", translate("ACLs"), "<font color='red'>" .. translate("ACLs is a tools which used to designate specific IP proxy mode.") .. "</font>")
|
s = m:section(TypedSection, "global", translate("ACLs"), "<font color='red'>" .. translate("ACLs is a tools which used to designate specific IP proxy mode.") .. "</font>")
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
@ -13,7 +13,6 @@ local port_validate = function(self, value, t)
|
|||||||
end
|
end
|
||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
local nodes_table = {}
|
local nodes_table = {}
|
||||||
for k, e in ipairs(api.get_valid_nodes()) do
|
for k, e in ipairs(api.get_valid_nodes()) do
|
||||||
|
@ -2,7 +2,6 @@ local api = require "luci.passwall.api"
|
|||||||
local appname = "passwall"
|
local appname = "passwall"
|
||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
-- [[ App Settings ]]--
|
-- [[ App Settings ]]--
|
||||||
s = m:section(TypedSection, "global_app", translate("App Update"),
|
s = m:section(TypedSection, "global_app", translate("App Update"),
|
||||||
|
@ -9,7 +9,6 @@ local has_chnlist = api.fs.access("/usr/share/passwall/rules/chnlist")
|
|||||||
local has_chnroute = api.fs.access("/usr/share/passwall/rules/chnroute")
|
local has_chnroute = api.fs.access("/usr/share/passwall/rules/chnroute")
|
||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
local nodes_table = {}
|
local nodes_table = {}
|
||||||
for k, e in ipairs(api.get_valid_nodes()) do
|
for k, e in ipairs(api.get_valid_nodes()) do
|
||||||
|
@ -16,7 +16,6 @@ for k, e in ipairs(api.get_valid_nodes()) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
-- [[ Haproxy Settings ]]--
|
-- [[ Haproxy Settings ]]--
|
||||||
s = m:section(TypedSection, "global_haproxy")
|
s = m:section(TypedSection, "global_haproxy")
|
||||||
|
@ -10,7 +10,6 @@ end
|
|||||||
|
|
||||||
m = Map(appname, translate("Node Config"))
|
m = Map(appname, translate("Node Config"))
|
||||||
m.redirect = api.url()
|
m.redirect = api.url()
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
s = m:section(NamedSection, arg[1], "nodes", "")
|
s = m:section(NamedSection, arg[1], "nodes", "")
|
||||||
s.addremove = false
|
s.addremove = false
|
||||||
|
@ -4,7 +4,6 @@ local sys = api.sys
|
|||||||
local datatypes = api.datatypes
|
local datatypes = api.datatypes
|
||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
-- [[ Other Settings ]]--
|
-- [[ Other Settings ]]--
|
||||||
s = m:section(TypedSection, "global_other")
|
s = m:section(TypedSection, "global_other")
|
||||||
|
@ -44,7 +44,6 @@ if has_hysteria2 then
|
|||||||
end
|
end
|
||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
-- [[ Subscribe Settings ]]--
|
-- [[ Subscribe Settings ]]--
|
||||||
s = m:section(TypedSection, "global_subscribe", "")
|
s = m:section(TypedSection, "global_subscribe", "")
|
||||||
|
@ -45,7 +45,6 @@ end
|
|||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
m.redirect = api.url("node_subscribe")
|
m.redirect = api.url("node_subscribe")
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
s = m:section(NamedSection, arg[1])
|
s = m:section(NamedSection, arg[1])
|
||||||
s.addremove = false
|
s.addremove = false
|
||||||
|
@ -11,7 +11,6 @@ local port_validate = function(self, value, t)
|
|||||||
end
|
end
|
||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
-- [[ Delay Settings ]]--
|
-- [[ Delay Settings ]]--
|
||||||
s = m:section(TypedSection, "global_delay", translate("Delay Settings"))
|
s = m:section(TypedSection, "global_delay", translate("Delay Settings"))
|
||||||
|
@ -4,8 +4,6 @@ local has_xray = api.finded_com("xray")
|
|||||||
local has_singbox = api.finded_com("singbox")
|
local has_singbox = api.finded_com("singbox")
|
||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
-- [[ Rule Settings ]]--
|
-- [[ Rule Settings ]]--
|
||||||
s = m:section(TypedSection, "global_rules", translate("Rule status"))
|
s = m:section(TypedSection, "global_rules", translate("Rule status"))
|
||||||
s.anonymous = true
|
s.anonymous = true
|
||||||
|
@ -9,7 +9,6 @@ local chnlist_path = "/usr/share/passwall/rules/chnlist"
|
|||||||
local chnroute_path = "/usr/share/passwall/rules/chnroute"
|
local chnroute_path = "/usr/share/passwall/rules/chnroute"
|
||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
-- [[ Rule List Settings ]]--
|
-- [[ Rule List Settings ]]--
|
||||||
s = m:section(TypedSection, "global_rules")
|
s = m:section(TypedSection, "global_rules")
|
||||||
|
@ -4,7 +4,6 @@ local datatypes = api.datatypes
|
|||||||
|
|
||||||
m = Map(appname, "Sing-Box/Xray " .. translate("Shunt Rule"))
|
m = Map(appname, "Sing-Box/Xray " .. translate("Shunt Rule"))
|
||||||
m.redirect = api.url()
|
m.redirect = api.url()
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
s = m:section(NamedSection, arg[1], "shunt_rules", "")
|
s = m:section(NamedSection, arg[1], "shunt_rules", "")
|
||||||
s.addremove = false
|
s.addremove = false
|
||||||
|
@ -5,7 +5,6 @@ local has_singbox = api.finded_com("singbox")
|
|||||||
local has_xray = api.finded_com("xray")
|
local has_xray = api.finded_com("xray")
|
||||||
|
|
||||||
m = Map(appname)
|
m = Map(appname)
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
local nodes_table = {}
|
local nodes_table = {}
|
||||||
for k, e in ipairs(api.get_valid_nodes()) do
|
for k, e in ipairs(api.get_valid_nodes()) do
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
local api = require "luci.passwall.api"
|
local api = require "luci.passwall.api"
|
||||||
|
|
||||||
m = Map("passwall_server", translate("Server-Side"))
|
m = Map("passwall_server", translate("Server-Side"))
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
t = m:section(NamedSection, "global", "global")
|
t = m:section(NamedSection, "global", "global")
|
||||||
t.anonymous = true
|
t.anonymous = true
|
||||||
|
@ -4,7 +4,6 @@ local types_dir = "/usr/lib/lua/luci/model/cbi/passwall/server/type/"
|
|||||||
|
|
||||||
m = Map("passwall_server", translate("Server Config"))
|
m = Map("passwall_server", translate("Server Config"))
|
||||||
m.redirect = api.url("server")
|
m.redirect = api.url("server")
|
||||||
api.set_apply_on_parse(m)
|
|
||||||
|
|
||||||
s = m:section(NamedSection, arg[1], "user", "")
|
s = m:section(NamedSection, arg[1], "user", "")
|
||||||
s.addremove = false
|
s.addremove = false
|
||||||
|
@ -999,22 +999,6 @@ function to_check_self()
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
function is_js_luci()
|
|
||||||
return sys.call('[ -f "/www/luci-static/resources/uci.js" ]') == 0
|
|
||||||
end
|
|
||||||
|
|
||||||
function set_apply_on_parse(map)
|
|
||||||
if is_js_luci() == true then
|
|
||||||
map.apply_on_parse = false
|
|
||||||
map.on_after_apply = function(self)
|
|
||||||
if self.redirect then
|
|
||||||
os.execute("sleep 1")
|
|
||||||
luci.http.redirect(self.redirect)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function luci_types(id, m, s, type_name, option_prefix)
|
function luci_types(id, m, s, type_name, option_prefix)
|
||||||
local rewrite_option_table = {}
|
local rewrite_option_table = {}
|
||||||
for key, value in pairs(s.fields) do
|
for key, value in pairs(s.fields) do
|
||||||
|
@ -76,7 +76,6 @@ start_service() {
|
|||||||
local update_time
|
local update_time
|
||||||
config_get update_time "config" "update_time" "3"
|
config_get update_time "config" "update_time" "3"
|
||||||
sed -i "/$NAME/d" /etc/crontabs/root
|
sed -i "/$NAME/d" /etc/crontabs/root
|
||||||
echo -e "30 2 * * * /etc/init.d/unblockneteasemusic" >> "/etc/crontabs/root"
|
|
||||||
! is_enabled "config" "auto_update" || echo -e "0 ${update_time} * * * $UNM_DIR/update.sh update_core" >> "/etc/crontabs/root"
|
! is_enabled "config" "auto_update" || echo -e "0 ${update_time} * * * $UNM_DIR/update.sh update_core" >> "/etc/crontabs/root"
|
||||||
/etc/init.d/cron restart
|
/etc/init.d/cron restart
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user