mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-09-10 18:34:18 +08:00
Update luci-app-passwall.patch
This commit is contained in:
@@ -1,17 +1,3 @@
|
||||
--- a/luci-app-passwall/root/etc/uci-defaults/luci-passwall
|
||||
+++ b/luci-app-passwall/root/etc/uci-defaults/luci-passwall
|
||||
@@ -1,5 +1,10 @@
|
||||
#!/bin/sh
|
||||
|
||||
+[ "`which nft`" ] && uci -q set passwall.@global_forwarding[0].use_nft=1
|
||||
+
|
||||
+grep -q ip-api.com /usr/share/passwall/rules/proxy_host ||
|
||||
+ sed -i '$a ip-api.com' /usr/share/passwall/rules/proxy_host
|
||||
+
|
||||
if [ -e "/etc/config/ucitrack" ]; then
|
||||
uci -q batch <<-EOF
|
||||
delete ucitrack.@passwall[-1]
|
||||
|
||||
--- a/luci-app-passwall/Makefile
|
||||
+++ b/luci-app-passwall/Makefile
|
||||
@@ -35,7 +35,25 @@ LUCI_PKGARCH:=all
|
||||
@@ -111,13 +97,13 @@
|
||||
--- a/luci-app-passwall/luasrc/controller/passwall.lua
|
||||
+++ b/luci-app-passwall/luasrc/controller/passwall.lua
|
||||
@@ -21,6 +21,8 @@ function index()
|
||||
entry({"admin", "services", appname, "reset_config"}, call("reset_config")).leaf = true
|
||||
entry({"admin", "services", appname}).dependent = true
|
||||
entry({"admin", "services", appname, "show"}, call("show_menu")).leaf = true
|
||||
entry({"admin", "services", appname, "hide"}, call("hide_menu")).leaf = true
|
||||
+ entry({"admin", "services", appname, "ip"}, call('check_ip')).leaf = true
|
||||
+ entry({"admin", "services", appname, "adblock_refresh"}, call('adblock_refresh')).leaf = true
|
||||
local e
|
||||
if uci:get(appname, "@global[0]", "hide_from_luci") ~= "1" then
|
||||
if uci:get(c_config, "@global[0]", "hide_from_luci") ~= "1" then
|
||||
e = entry({"admin", "services", appname}, alias("admin", "services", appname, "settings"), _("Pass Wall"), -1)
|
||||
@@ -211,6 +213,81 @@ function clear_log()
|
||||
luci.sys.call("echo '' > /tmp/log/passwall.log")
|
||||
@@ -254,8 +240,8 @@
|
||||
@@ -834,5 +855,6 @@ footer.api = api
|
||||
footer.global_cfgid = global_cfgid
|
||||
footer.shunt_list = api.jsonc.stringify(shunt_list)
|
||||
m:append(footer)
|
||||
+m:append(Template(appname .. "/global/status_bottom"))
|
||||
m:appendTemplate("/global/footer", {shunt_list = api.jsonc.stringify(shunt_list)})
|
||||
+m:appendTemplate("/global/status_bottom")
|
||||
|
||||
return api.return_map(m)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user