diff --git a/pkg/service/handlers/web/index.html b/pkg/service/handlers/web/index.html index b687048..a8e3c34 100644 --- a/pkg/service/handlers/web/index.html +++ b/pkg/service/handlers/web/index.html @@ -673,54 +673,6 @@ > -
- Preliminary /etc/hosts Test:
- Verify the device's /etc/hosts mechanism before - full migration. -
- Domain: custom-test-api.bose.fake -
-
- -
-
-
-
testConnection(deviceId, true); document.getElementById("test-connection-trusted-btn").onclick = () => testConnection(deviceId, false); - document.getElementById("test-hosts-btn").onclick = () => testHostsRedirection(deviceId); document.getElementById("test-dns-btn").onclick = () => testDNSRedirection(deviceId); renderCustomizeForm(summary); @@ -2404,34 +2403,6 @@ async function testConnection(deviceId, useExplicitCA) { } } -async function testHostsRedirection(deviceId) { - const targetUrl = document.getElementById("target-domain").value; - const testResultDiv = document.getElementById("hosts-test-result"); - const display = getDeviceDisplayName(deviceId); - - testResultDiv.style.display = "block"; - testResultDiv.style.backgroundColor = "#f0f0f0"; - testResultDiv.style.color = "black"; - testResultDiv.innerText = "Running hosts redirection test from " + display + "...\n(This may take a few seconds)"; - - try { - const query = `?target_url=${encodeURIComponent(targetUrl)}`; - const response = await fetch(`/setup/test-hosts/${encodeURIComponent(deviceId)}${query}`, {method: "POST"},); - const result = await response.json(); - - if (result.ok) { - testResultDiv.style.backgroundColor = "#ccffcc"; - testResultDiv.innerText = "✅ " + result.message + "\n\nOutput:\n" + result.output; - } else { - testResultDiv.style.backgroundColor = "#ffcccc"; - testResultDiv.innerText = "❌ Test failed: " + result.message + "\n\nOutput:\n" + result.output; - } - } catch (error) { - testResultDiv.style.backgroundColor = "#ffcccc"; - testResultDiv.innerText = "❌ Error triggering test: " + error; - } -} - async function testDNSRedirection(deviceId) { const targetUrl = document.getElementById("target-domain").value; const testResultDiv = document.getElementById("dns-test-result"); @@ -3662,7 +3633,6 @@ function onCustomizeChange() { show("resolv-diff-row", dns === "resolv"); show("telnet-method-pane", flip === "telnet"); show("dns-redirection-test", dns === "resolv"); - show("hosts-redirection-test", false); // Validate the combination and toggle the Apply button. const errors = [];