nx_https_get_cli.nx
buildroot/runtime/nx_https_get_cli.nx
about
nx_https_get_cli.nx -- the OPERATOR/MCP-facing sovereign HTTPS fetch (replaces WebFetch + curl).
nx_https_get <url> [connect-host:port]
<url> fetched over OUR TLS 1.3 + Mozilla trust store; raw response (status+headers+body) to stdout.
[connect-host:port] OPTIONAL connect override (curl --connect-to): open the TCP+TLS to THIS endpoint while
keeping SNI + Host + cert-name = the URL's host. Lets us fetch our OWN vhosts straight
from the sovereign edge (sites.elf 127.0.0.1:8443), bypassing the DSM nginx that also
squats :443 for unclaimed SNIs (andelinwest.com internally hit DSM's self-signed cert).
The tools daemon fork-execs this on a GREEN tool_allowlist.conf row, cap-gated to nx_https_get, and returns
stdout as the tools/call result. Uses PRODUCTION entropy (nx_csprng_fill from /dev/urandom). license_tier: ORIGINAL
dependencies 12 imports · 0 importers
diagram shows first 10 each side; +2 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.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_https_fetch_lib.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
| 22 | const HGC_MAGIC_4194304: i64 = 4194304 |
| 23 | const HGC_MAGIC_65535: i64 = 65535 |
| 25 | const HGC_CERTDATA: *u8 = "data/mozilla_certdata.txt" as *u8 |
| 26 | const HGC_OUTCAP: i64 = 4194304 // 4 MiB response cap |
functions
| 28 | func hgc_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: hgc_put |
| 29 | func hgc_put(s: *u8) -> i64 { sys_write(1, s, hgc_slen(s)); return 0 } |
| 30 | func hgc_putn(v: i64) -> i64 |
| 44 | func main(argc: i64, argv: *i64) -> i64 |
| 78 | func hgc_parse_ipport(s: *u8, ip_out: *i64, port_out: *i64) -> i64 called by 1: main |