mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-11-05 18:44:06 +08:00
update 2026-10-03 17:36:19
This commit is contained in:
1 parent
ba8090b29d
commit
7a2d332eaf
1968 files changed
+1523393
-89
No files matched your search
@@ -185,7 +185,7 @@ end
|
||||
function exec_call(cmd)
|
||||
math.randomseed(os.time())
|
||||
local tag = "\x01__RC__" .. tostring(math.random(100000, 999999)) .. "\x01"
|
||||
local f = io.popen('(' .. cmd .. '); printf "\\n' .. tag .. '%d" "$?"')
|
||||
local f = io.popen('(' .. cmd .. ') 2>&1; printf "\\n' .. tag .. '%d" "$?"')
|
||||
local out = f:read("*a") or ""
|
||||
f:close()
|
||||
local rc = out:match(tag .. "(%d+)%s*$")
|
||||
|
||||
@@ -56,10 +56,9 @@ function geo_convert_srs(var)
|
||||
if not fs.access(output_srs_file) and bin then
|
||||
local cmd = string.format("%q -type %q -action convert -input %q -list %q -output %q -lowmem=true",
|
||||
bin, prefix, geo_path, rule_name, output_srs_file)
|
||||
sys.call(cmd)
|
||||
local status = fs.access(output_srs_file) and "success." or "failed!"
|
||||
if status == "failed!" then
|
||||
api.log(string.format(" - %s:%s 转换为srs格式:%s", prefix, rule_name, status))
|
||||
local code, out = api.exec_call(cmd)
|
||||
if code ~= 0 or not fs.access(output_srs_file) then
|
||||
api.log(string.format(" - %s:%s 转换为srs格式:%s [%s]", prefix, rule_name, "failed!", out))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1985,7 +1984,7 @@ function gen_config(var)
|
||||
table.insert(dns.servers, {
|
||||
tag = fakedns_tag,
|
||||
type = "fakeip",
|
||||
inet4_range = "198.18.0.0/15",
|
||||
inet4_range = "198.18.0.0/16",
|
||||
inet6_range = "2001:2::/48",
|
||||
})
|
||||
|
||||
|
||||
@@ -1752,7 +1752,7 @@ function gen_config(var)
|
||||
if remote_dns_fake or inner_fakedns == "1" then
|
||||
fakedns = {}
|
||||
local fakedns4 = {
|
||||
ipPool = "198.18.0.0/15",
|
||||
ipPool = "198.18.0.0/16",
|
||||
poolSize = 65535
|
||||
}
|
||||
local fakedns6 = {
|
||||
|
||||
Reference in new issue
Block a user