code wiki / _hdl_build / nx_edge_probe.nx
nx_edge_probe.nx
buildroot/runtime/_hdl_build/nx_edge_probe.nx
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
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
structs
| none |
consts
| 23 | const K_MAGIC_1000000000: i64 = 1000000000 |
| 24 | const K_MAGIC_1024: i64 = 1024 |
| 25 | const K_MAGIC_86400: i64 = 86400 |
| 26 | const K_MAGIC_4194304: i64 = 4194304 |
| 27 | const K_MAGIC_32768: i64 = 32768 |
| 28 | const K_MAGIC_262144: i64 = 262144 |
functions
| 30 | func 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 } |
| 31 | func ep_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 32 | func 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 } |
| 33 | func 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 |
| 34 | func ep_contains(hay: *u8, n: i64, needle: *u8) -> i64 |
| 41 | func ep_ip(s: *u8) -> i64 called by 1: main |
| 58 | func ep_count_chain(cm: *u8, cmlen: i64) -> i64 called by 1: main |
| 83 | func ep_dump_san(der: *u8, derlen: i64) -> i64 |
| 111 | func ep_autopsy(cm: *u8, cmlen: i64, now: i64) -> i64 |
| 144 | func main(argc: i64, argv: *i64) -> i64 |