code wiki / _hdl_build / nx_edge_probe.nx

nx_edge_probe.nx

buildroot/runtime/_hdl_build/nx_edge_probe.nx

13523 B251 linesdepth 20pulls 123 transitivereach 0 importersview sourcekind probetopic edge
docsdependenciesstructsconstsfunctions

about

nx_edge_probe.nx -- SOVEREIGN edge-chain probe: connect to an EXPLICIT ip:port, present a chosen SNI, and GET a path with that Host -- so a capability SUBDOMAIN's full public edge chain (iptables:443->sni_router:7443 -> SNI route -> sites.elf cert-select -> proxy_routes -> daemon) can be verified from the LAN by targeting the edge IP directly, WITHOUT depending on public DNS or NAT hairpin (the reason admin.andelinwest.com looked dead from inside the network). This is the honest test the earlier `curl --resolve` cheated at: it drives the REAL sni_router + real cert + real proxy. usage: nx_edge_probe <ip> <port> <sni_host> <path> [expect-substring] e.g.: nx_edge_probe 192.168.8.240 443 admin.andelinwest.com / "Nishi document portal" Prints the served leaf cert acceptance + HTTP status + whether expect is present. license_tier: ORIGINAL

dependencies 13 imports · 0 importers

nx_syscalls.nx nx_connect.nx nx_csprng.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_tls13_client_validate_certifica nx_tls13_client_session.nx nx_tls13_client_session_run.nx nx_tls13_chrome_session.nx nx_x509_san.nx nx_edge_probe.nx

diagram shows first 10 each side; +3 more imports, +0 more importers in the complete lists below.

imports: nx_syscalls.nxnx_connect.nxnx_csprng.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session.nxnx_tls13_client_session_run.nxnx_tls13_chrome_session.nxnx_x509_san.nxnx_x509_validity.nxnx_https_get_complete.nxnx_https_post_complete.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main ep_puts sys_write ep_atoi ep_slen ep_putn sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_write ↻ nx_trust_store_load_from_c sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close nx_nss_certdata_parse sys_mmap ↻ _pat_class_cert _pat_value_octal _pat_end _find_newline _starts_with _parse_octal_line sys_mmap ↻

structs

none

consts

23const K_MAGIC_1000000000: i64 = 1000000000
24const K_MAGIC_1024: i64 = 1024
25const K_MAGIC_86400: i64 = 86400
26const K_MAGIC_4194304: i64 = 4194304
27const K_MAGIC_32768: i64 = 32768
28const K_MAGIC_262144: i64 = 262144

functions

30func ep_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 3: ep_dump_sanep_autopsymain calls 1: sys_write
31func ep_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: ep_containsmain
32func ep_putn(v: i64) -> i64 { let b: *u8=sys_mmap(24); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(24); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{b[i]=t[k-1-i];i=i+1} sys_write(1,b,k); return 0 }
33func ep_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8){ let c: i64=s[i] as i64; if c>=48 { if c<=57 { v=v*10+(c-48) } } i=i+1 } return v }
called by 1: main
34func ep_contains(hay: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: ep_slen
41func ep_ip(s: *u8) -> i64
called by 1: main
58func ep_count_chain(cm: *u8, cmlen: i64) -> i64
called by 1: main
83func ep_dump_san(der: *u8, derlen: i64) -> i64
111func ep_autopsy(cm: *u8, cmlen: i64, now: i64) -> i64
144func main(argc: i64, argv: *i64) -> i64