nx_net_diag.nx
buildroot/runtime/nx_net_diag.nx
about
nx_net_diag.nx -- IN-PLACE network troubleshooter (operator 2026-07-04: "we need a tracert/ping type
capability so the smart fallback can troubleshoot + resolve in place"). Layers the failure so we know WHICH
layer breaks instead of guessing: DNS resolve -> TCP connect -> send a BROAD browser-like TLS 1.2 ClientHello
and READ exactly what the server returns (ServerHello=answered / Alert=negotiation-refused-with-reason /
nothing=silent fingerprint drop). This is what cracked "ukdevilz fails but Waterfox works from the same IP":
it distinguishes a network block (never happens -- DNS+TCP fine) from a TLS-fingerprint/cipher issue.
usage: nx_net_diag <host>
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_connect.nxnx_dns_resolve_a_record.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 12 | const ND_MAGIC_1024: i64 = 1024 |
| 13 | const ND_MAGIC_16384: i64 = 16384 |
| 15 | const ND_AF_INET: i64 = 2 |
| 16 | const ND_SOCK_STREAM: i64 = 1 |
functions
| 18 | func dw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 19 | func dn(v: i64) -> i64 { if v==0 { sys_write(1,"0" as *u8,1); return 0 } var m: i64=v; if m<0 { sys_write(1,"-" as *u8,1); m=0-m } let t: *u8=sys_mmap(24); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } let o: *u8=sys_mmap(24); var q: i64=k-1; var x: i64=0; while q>=0 { o[x]=t[q]; x=x+1; q=q-1 } sys_write(1,o,x); return 0 } |
| 20 | func dhx(v: i64) -> i64 { let h: *u8="0123456789abcdef" as *u8; let o: *u8=sys_mmap(6); o[0]=48 as u8; o[1]=120 as u8; o[2]=h[(v>>12)&0xF] as u8; o[3]=h[(v>>8)&0xF] as u8; o[4]=h[(v>>4)&0xF] as u8; o[5]=h[v&0xF] as u8; sys_write(1,o,6); return 0 } |
| 21 | func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: main |
| 22 | func sockaddr(out: *u8, ip: i64, port: i64) -> i64 called by 1: main |
| 28 | func ap(out: *u8, o: i64, b: i64) -> i64 { out[o]=b as u8; return o+1 } called by 1: mkhello |
| 30 | func mkhello(host: *u8, hl: i64, out: *u8) -> i64 |
| 72 | func main(argc: i64, argv: *i64) -> i64 |