fix: zapret2 daemon privileges and lua loader, dnsmasq reload auto-repair (1.3.20)

This commit is contained in:
Dushnilin
2026-09-04 14:45:01 +03:00
parent e901f9d41a
commit 6bedef4c77
12 changed files with 4629 additions and 18 deletions
+13 -1
View File
@@ -294,9 +294,13 @@ cat >"$WORK_DIR/service-dns-state.json" <<'JSON'
"server": [ "1.1.1.1#53", "8.8.8.8" ],
"noresolv": "1",
"cachesize": "0",
"rebind_protection": "1",
"localuse": "0",
"tachyon_server": [ "127.0.0.42#53" ],
"tachyon_noresolv": "0",
"tachyon_cachesize": "1500"
"tachyon_cachesize": "1500",
"tachyon_rebind_protection": "0",
"tachyon_localuse": "1"
},
"legacy_dnsmasq_present": true
}
@@ -320,12 +324,20 @@ cat >"$WORK_DIR/dnsmasq-signature.expected" <<'EOF_DNSMASQ_SIG'
1
[dhcp.@dnsmasq[0].cachesize]
0
[dhcp.@dnsmasq[0].rebind_protection]
1
[dhcp.@dnsmasq[0].localuse]
0
[dhcp.@dnsmasq[0].tachyon_server]
127.0.0.42#53
[dhcp.@dnsmasq[0].tachyon_noresolv]
0
[dhcp.@dnsmasq[0].tachyon_cachesize]
1500
[dhcp.@dnsmasq[0].tachyon_rebind_protection]
0
[dhcp.@dnsmasq[0].tachyon_localuse]
1
[dhcp.tachyon.present]
1
EOF_DNSMASQ_SIG
+12
View File
@@ -162,6 +162,13 @@ assert_plan_value "$plan" changed_dnsmasq 1
assert_plan_value "$plan" needs_dnsmasq_configure 1
assert_plan_value "$plan" needs_dnsmasq_restore 0
args=("${base_args[@]}")
args[31]=0
plan="$(run_case dnsmasq_repair_incomplete "${args[@]}")"
assert_plan_value "$plan" changed_dnsmasq 0
assert_plan_value "$plan" needs_dnsmasq_configure 1
assert_plan_value "$plan" needs_dnsmasq_restore 0
args=("${base_args[@]}")
args[14]=dns2
args[25]=1
@@ -204,6 +211,11 @@ plan="$(run_state_case state_unchanged "$previous_state" "$current_state" 0 0 0
assert_plan_value "$plan" has_work 0
assert_plan_value "$plan" changed_sing_box 0
plan="$(run_state_case state_repair_incomplete "$previous_state" "$current_state" 0 0 0 0 0 0)"
assert_plan_value "$plan" has_work 1
assert_plan_value "$plan" changed_dnsmasq 0
assert_plan_value "$plan" needs_dnsmasq_configure 1
write_state "$current_state" service_trigger_signature svc dns sb nft zq zr z2q z2r br list cron "alpha beta gamma" 0
plan="$(run_state_case state_urltest_new "$previous_state" "$current_state" 0 0 0 0 0)"
assert_plan_value "$plan" urltest_new_enabled_sections "gamma"