update 2026-08-30 17:40:26
|
After Width: | Height: | Size: 91 KiB |
|
After Width: | Height: | Size: 319 KiB |
|
After Width: | Height: | Size: 389 KiB |
|
Before Width: | Height: | Size: 640 KiB |
|
Before Width: | Height: | Size: 550 KiB |
|
Before Width: | Height: | Size: 547 KiB |
|
Before Width: | Height: | Size: 659 KiB |
|
Before Width: | Height: | Size: 650 KiB |
@@ -7,7 +7,10 @@ local gfwlist_path = path .. "gfwlist"
|
||||
local chnlist_path = path .. "chnlist"
|
||||
local chnroute_path = path .. "chnroute"
|
||||
|
||||
m = Map(api.appname)
|
||||
api.set_default_cbi()
|
||||
|
||||
m = Map()
|
||||
m.apply_on_parse = true
|
||||
|
||||
function clean_text(text)
|
||||
local nbsp = string.char(0xC2, 0xA0) -- 不间断空格(U+00A0)
|
||||
@@ -314,7 +317,7 @@ if fs.access(chnroute_path) then
|
||||
]], translate("Read List"))
|
||||
end
|
||||
|
||||
m:append(Template(api.appname .. "/rule_list/js"))
|
||||
m:appendTemplate("/rule_list/js")
|
||||
|
||||
local geo_dir = (api.uci_get_c("@global_rules[0]", "v2ray_location_asset") or "/usr/share/v2ray/"):match("^(.*)/")
|
||||
local geosite_path = geo_dir .. "/geosite.dat"
|
||||
@@ -324,7 +327,7 @@ if api.finded_com("geoview") and fs.access(geosite_path) and fs.access(geoip_pat
|
||||
s:tab("geoview", translate("Geo View"))
|
||||
o = s:taboption("geoview", DummyValue, "_geoview_fieldset")
|
||||
o.rawhtml = true
|
||||
o.template = api.appname .. "/rule_list/geoview"
|
||||
o.template = m:template_path("/rule_list/geoview")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -332,4 +335,4 @@ m.on_before_save = function(self)
|
||||
m:set("@global[0]", "flush_set", "1")
|
||||
end
|
||||
|
||||
return m
|
||||
return api.return_map(m)
|
||||
|
||||
@@ -2063,7 +2063,9 @@ function gen_config(var)
|
||||
fakedns_dns_rule.query_type = { "A", "AAAA" }
|
||||
end
|
||||
fakedns_dns_rule.server = fakedns_tag
|
||||
fakedns_dns_rule.rewrite_ttl = 1
|
||||
fakedns_dns_rule.disable_cache = true
|
||||
fakedns_dns_rule.client_subnet = nil
|
||||
table.insert(dns.rules, fakedns_dns_rule)
|
||||
end
|
||||
end
|
||||
@@ -2098,7 +2100,7 @@ function gen_config(var)
|
||||
query_type = dns_rule_query_type,
|
||||
server = fakedns_tag,
|
||||
disable_cache = true,
|
||||
rewrite_ttl = 30
|
||||
rewrite_ttl = 1
|
||||
}
|
||||
table.insert(dns.rules, fakedns_dns_rule)
|
||||
end
|
||||
|
||||
@@ -23,8 +23,8 @@ local map = self.map
|
||||
<% if luci.http.formvalue("cbi.apply") == "1" and map.is_js_luci then -%>
|
||||
<script type="text/javascript">
|
||||
document.addEventListener("luci-loaded", function() {
|
||||
L.env.apply_display = 2; //Write whatever you want, it's all just a fake progress bar anyway.
|
||||
L.env.apply_holdoff = 1;
|
||||
//L.env.apply_display = 2; //Write whatever you want, it's all just a fake progress bar anyway.
|
||||
//L.env.apply_holdoff = 1;
|
||||
|
||||
let tt;
|
||||
let flag = 2;
|
||||
@@ -50,10 +50,12 @@ local map = self.map
|
||||
}
|
||||
|
||||
window.setTimeout(() => {
|
||||
<% if not map.redirect then -%>
|
||||
if (tt)
|
||||
window.clearTimeout(tt);
|
||||
L.ui.changes.displayStatus(false);
|
||||
window.location = window.location.href.split('#')[0];
|
||||
L.ui.changes.displayStatus(false);
|
||||
<% if not map.redirect then -%>
|
||||
//window.location = window.location.href.split('#')[0];
|
||||
window.location = "<%=map.api.url("log")%>";
|
||||
<%- else %>
|
||||
window.location.href = "<%=map.redirect%>";
|
||||
<%- end %>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<%
|
||||
local api = require "luci.passwall.api"
|
||||
local map = self.map
|
||||
local api = map.api
|
||||
-%>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<%
|
||||
local api = require "luci.passwall.api"
|
||||
local map = self.map
|
||||
local api = map.api
|
||||
-%>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
|
||||