feat(dns): add intelligent DNS Benchmark, Auto-Tuner & clean defaults
- Implement ucode module dns/benchmark.uc:
* Probes major DNS servers (Yandex, Cloudflare, Google, Quad9, AdGuard, Comss, Mullvad, Control D) across UDP 53 and DoH.
* Measures latency, packet loss, and detects ISP DNS poisoning/hijacking.
* Intelligent recommendation engine computes optimal primary DNS (prefers encrypted DoH if fast), bootstrap plain UDP, fallback plain UDP from independent provider, and upstream mode (sequential/parallel).
* Supports CLI execution (tachyon dns_benchmark, tachyon dns_autotune --apply) and background async worker mode for LuCI UI.
- LuCI Web UI modal (renderDnsBenchmarkModal.ts):
* Real-time progress bar, responsive results table with latency rating badges.
* Recommendation summary card with one-click 'Apply Recommended DNS' action.
* Added '⚡ Auto-Tune & Benchmark DNS' button in Settings -> DNS tab.
- Added comprehensive unit tests in vitest (538/538 passed) and tests/dns_benchmark.sh.
- Added Russian PO translations.
This commit is contained in:
@@ -1326,6 +1326,23 @@ function createSettingsContent(section, capabilities) {
|
||||
|
||||
// ── DNS Settings ────────────────────────────────────────────────────────
|
||||
|
||||
const dnsBenchmarkBtn = section.taboption(
|
||||
"dns",
|
||||
form.Button,
|
||||
"_dns_benchmark_btn",
|
||||
_("DNS Auto-Tuner & Benchmark"),
|
||||
_(
|
||||
"Automatically benchmark latency, packet loss, and anti-censorship reliability of major DNS servers (UDP/DoH) from this router to find and apply the optimal configuration.",
|
||||
),
|
||||
);
|
||||
dnsBenchmarkBtn.inputtitle = "⚡ " + _("Auto-Tune & Benchmark DNS");
|
||||
dnsBenchmarkBtn.inputstyle = "action important";
|
||||
dnsBenchmarkBtn.onclick = function () {
|
||||
if (main && typeof main.renderDnsBenchmarkModal === "function") {
|
||||
main.renderDnsBenchmarkModal();
|
||||
}
|
||||
};
|
||||
|
||||
settingsDnsDynamicState.dnsType =
|
||||
uci.get(UCI_PACKAGE, "settings", "dns_type") || "udp";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user