nx_https_get_cli2.nx
buildroot/runtime/nx_https_get_cli2.nx
about
nx_https_get_cli2.nx -- CANARY of the sovereign HTTPS fetch with HELLO AUTO-FALLBACK (seq759 design, finally real).
nx_https_get <url> [connect-host:port]
WHY THIS EXISTS (measured 2026-07-25): the live chrome-ONLY build regressed every host that rejects the
Chrome-mimic hello but accepts our plain minimal hello (api.nhtsa.gov proven 200 on 07-23, verdict=5 now;
same class: www.sec.gov, efts.sec.gov, www.justice.gov). Cloudflare-walled hosts (api.worldbank.org) still
NEED the chrome hello. No single hello serves both sets, so: attempt 1 = chrome-JA3 (identical to live
behavior for every currently-working feed), on handshake failure reconnect and attempt 2 = plain hello.
Fallback is LEGIBLE (stderr nishi-hello line, never a silently-different code path). license_tier: ORIGINAL
dependencies 14 imports · 0 importers
diagram shows first 10 each side; +4 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_run.nxnx_tls13_chrome_session.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_https_get_complete.nxnx_tls_cert_cache.nxnx_gzip_wrap.nxnx_zlib_wrap.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 HGC_MAGIC_1950: i64 = 1950 |
| 24 | const HGC_MAGIC_4194304: i64 = 4194304 |
| 25 | const HGC_MAGIC_65535: i64 = 65535 |
| 27 | const HGC_CERTDATA: *u8 = "data/mozilla_certdata.txt" as *u8 |
| 28 | const HGC_OUTCAP: i64 = 33554432 // 32 MiB response cap (4 MiB refused a 5MB Koikatsu card 2026-08-04 -- code=8 overflow; real assets are routinely >4MiB) |
functions
| 30 | func hgc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 31 | func hgc_put(s: *u8) -> i64 { sys_write(1, s, hgc_slen(s)); return 0 } |
| 32 | func hgc_putn(v: i64) -> i64 |
| 46 | func hgc_put2(s: *u8) -> i64 { sys_write(2, s, hgc_slen(s)); return 0 } |
| 47 | func hgc_putn2(v: i64) -> i64 |
| 79 | func hgc_streq(a: *u8, b: *u8) -> i64 |
| 86 | func hgc_hexval(c: i64) -> i64 called by 1: hgc_dechunk |
| 93 | func hgc_hdr_end(b: *u8, n: i64) -> i64 called by 1: main |
| 105 | func hgc_hdr_chunked(b: *u8, n: i64, he: i64) -> i64 called by 1: main |
| 125 | func hgc_dechunk(src: *u8, n: i64, out: *u8) -> i64 |
| 160 | func hgc_hdr_enc(b: *u8, n: i64, he: i64) -> i64 |
| 211 | func main(argc: i64, argv: *i64) -> i64 |
| 373 | func hgc_parse_ipport(s: *u8, ip_out: *i64, port_out: *i64) -> i64 called by 1: main |