// The probe's one DIRECT request (lane network-exits): the operator's // address-echo URL fetched without a proxy, so `get network --probe` shows the // home address beside each exit's. Made only when network.echoUrl is set. export async function directEcho(url: string): Promise<{ ok: true; body: string } | { ok: false; reason: string }> { try { const res = await fetch(url, { signal: AbortSignal.timeout(8_000), headers: { accept: "text/plain, */*" } }); const body = (await res.text()).slice(0, 4096); return res.ok ? { ok: true, body } : { ok: false, reason: `HTTP ${res.status}` }; } catch (e) { return { ok: false, reason: (e as Error).message }; } }