1import{o as e,t,u as n}from"./jsx-runtime-BTgOCYyl.js";import{a as r,f as i,l as a,o,s}from"./src-Ch68KD4x.js";import{t as c}from"./site-MYsyMqoc.js";import{t as l}from"./seo-DRHdbsX5.js";import{t as u}from"./map-page-shell-NWDZ7VKf.js";import{a as d,i as f,n as p,o as m,t as h}from"./src-QrWBhADY.js";var g=i(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),_={ourAsn:209990,ourAsnLabel:`via AS209990`,ourNetShortLabel:`our net`,enabledProbes:[`route`,`ping`,`traceroute`],examples:[{q:`1.1.1.1`,label:`1.1.1.1`},{q:`2606:4700:4700::1111`,label:`2606:4700:4700::1111`},{q:`cloudflare.com`,label:`cloudflare.com`}]};[...({}.TOOLS_EXTRA_TOKEN_HOSTS??``).split(`,`).map(e=>e.trim()).filter(Boolean)];var v=t(),y={fullBleedMap:!0},b=()=>l({title:`Looking glass | ${c.name} (${c.asn})`,description:`A public looking glass for ${c.name} (${c.asn}). BGP routing, ping and traceroute from our edge - no login.`,path:`/looking-glass`}),x=e(function(){let{clientIp:e,q:t}=n(),{formRef:i,query:c,onQueryChange:l,family:y,setFamily:b,traceProtocol:x,setTraceProtocol:S,detected:C,disabledReason:w,canSubmit:T,showFamily:E,showProtocol:D,anyAdvanced:O,run:k,shown:A,state:j,intel:M,hops:N,onSubmit:P,onStop:F,runExample:I,statusFor:L,examples:R}=d({config:_,challengeUrl:`/api/tools/challenge`,initialQuery:t,defaultCount:6,focusOnLoad:!0});return(0,v.jsxs)(u,{children:[(0,v.jsx)(`section`,{className:`relative`,children:(0,v.jsxs)(`div`,{className:`relative z-10 max-w-[640px]`,children:[(0,v.jsx)(`p`,{className:`eyebrow`,children:`Looking glass`}),(0,v.jsx)(`h1`,{className:`mt-2 font-display text-[var(--fs-h1)] font-extrabold tracking-tight text-foreground`,children:`Network diagnostics`}),(0,v.jsx)(`p`,{className:`mt-3 text-[var(--fs-lead)] text-muted-foreground`,children:`BGP routing, ping and traceroute from our edge - one query, every angle.`}),e.ip&&(0,v.jsxs)(`div`,{className:`mt-5 flex max-w-full flex-wrap items-center gap-2 font-mono text-sm`,children:[(0,v.jsx)(`span`,{className:`text-[var(--text-dim)]`,children:`you`}),(0,v.jsx)(`span`,{className:`min-w-0 break-all text-foreground`,children:e.ip}),(0,v.jsx)(s,{tone:`accent`,children:e.family})]}),(0,v.jsxs)(o,{pad:`lg`,className:`mt-6`,children:[(0,v.jsxs)(`form`,{ref:i,onSubmit:P,className:`flex flex-col gap-3 sm:flex-row sm:items-end`,children:[(0,v.jsx)(a,{label:`Target`,mono:!0,value:c,onChange:e=>l(e.currentTarget.value),placeholder:`host, IP, prefix, or ASN`,autoComplete:`off`,spellCheck:!1,maxLength:253,"aria-invalid":!!w||void 0,style:{flex:1}}),j.running?(0,v.jsxs)(r,{type:`button`,variant:`ghost`,onClick:F,style:{height:44},children:[(0,v.jsx)(g,{className:`h-4 w-4 animate-spin`}),` Stop`]}):(0,v.jsx)(r,{type:`submit`,disabled:!T,style:{height:44},children:`Check â`})]}),O&&(0,v.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-x-6 gap-y-3 font-mono text-xs`,children:[E&&(0,v.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,v.jsx)(`span`,{className:`text-[var(--text-dim)]`,children:`family`}),[{v:``,l:`auto`},{v:`4`,l:`v4`},{v:`6`,l:`v6`}].map(({v:e,l:t})=>(0,v.jsx)(`button`,{type:`button`,onClick:()=>b(e),"aria-pressed":y===e,className:`rounded px-2 py-0.5 transition-colors`,style:y===e?{background:`var(--tint-brand)`,color:`var(--brand)`}:{color:`var(--text-muted)`},children:t},e))]}),D&&(0,v.jsxs)(`span`,{className:`inline-flex items-center gap-2`,children:[(0,v.jsx)(`span`,{className:`text-[var(--text-dim)]`,children:`trace`}),[`icmp`,`udp`,`tcp`].map(e=>(0,v.jsx)(`button`,{type:`button`,onClick:()=>S(e),"aria-pressed":x===e,className:`rounded px-2 py-0.5 uppercase transition-colors`,style:x===e?{background:`var(--tint-brand)`,color:`var(--brand)`}:{color:`var(--text-muted)`},children:e},e))]})]}),c.trim()&&C.kind===`invalid`&&(0,v.jsx)(`div`,{className:`mt-4 font-mono text-xs`,"aria-live":`polite`,children:(0,v.jsx)(`span`,{className:`text-[var(--state-down)]`,children:w})}),!k&&(0,v.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-2 font-mono text-xs`,children:[(0,v.jsx)(`span`,{className:`text-[var(--text-dim)]`,children:`try`}),R.map(e=>(0,v.jsx)(`button`,{type:`button`,onClick:()=>
1I(e.q),children:(0,v.jsx)(s,{tone:`neutral`,children:e.label})},e.q))]})]})]})}),k&&(0,v.jsx)(m,{value:_,children:(0,v.jsx)(`div`,{className:`mt-8`,children:(0,v.jsxs)(`div`,{className:`space-y-6`,children:[(0,v.jsx)(h,{state:j,intel:M,showRir:!0}),(0,v.jsxs)(`div`,{className:`gap-5 [&>*]:mb-5 [&>*]:break-inside-avoid sm:columns-2`,children:[A.includes(`traceroute`)&&(0,v.jsx)(f,{hops:N,asPath:M.asPath,bottleneck:M.bottleneck,running:j.running,trace:j.traceDone,...L(`traceroute`)}),A.includes(`ping`)&&(0,v.jsx)(p,{packets:j.pings,summary:j.pingSummary,running:j.running,...L(`ping`)})]})]})})})]})});export{x as default,y as handle,b as meta};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.