code wiki / (root) / nx_torrent_live_probe.nx

nx_torrent_live_probe.nx

buildroot/runtime/nx_torrent_live_probe.nx

6714 B118 linesdepth 19pulls 121 transitivereach 0 importersview sourcekind probetopic torrent
docsdependenciesstructsconstsfunctions

about

nx_torrent_live_probe.nx -- sovereign machine-proof that /torrent is LIVE on nishifamily.com. Connects over real TLS 1.3 to the production web server (192.168.8.240:8443) presenting SNI "nishifamily.com", VALIDATES the server cert against the Mozilla CA trust store (the real Let's Encrypt chain), then GETs /torrent with NO session header. The expected response is the OPAQUE gateway's no-cookie BOOTSTRAP -- which proves the full external relay end-to-end: TLS :8443 (sites.elf) -> /torrent route -> gateway :18793 (loopback) -> bootstrap A real session lives only in the browser's sessionStorage, so an unauthenticated probe MUST see the bootstrap (contains "Nishi Media" + "X-Nishi-Session" + "sessionStorage"), NOT the 13KB daemon UI (that would mean the gateway was bypassed) and NOT a /login 302 (that would mean an invalid token). usage: nx_torrent_live_probe (no args; target + CA bundle are fixed) license_tier: ORIGINAL

dependencies 9 imports · 0 importers

nx_syscalls.nx nx_csprng.nx nx_connect.nx nx_x509_trust_store.nx nx_trust_store_load_from_certdata. nx_tls13_client_validate_certifica nx_tls13_client_session_run.nx nx_https_get_complete.nx nx_http_response_parse.nx nx_torrent_live_probe.nx

imports: nx_syscalls.nxnx_csprng.nxnx_connect.nxnx_x509_trust_store.nxnx_trust_store_load_from_certdata.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session_run.nxnx_https_get_complete.nxnx_http_response_parse.nx

imported by: nobody (leaf or entry point)

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

main nx_trust_store_load_from_c sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read 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 ↻ _is_space _decode_octal_escape _is_octal trust_store_alloc sys_mmap ↻ nx_x509_trust_store_load sys_mmap ↻ x509_parse sys_mmap ↻ asn1_cursor_init asn1_expect_tag sys_mmap ↻ asn1_read_tlv_header asn1_read_tag asn1_read_length asn1_read_length ↻ x509_read_tlv sys_mmap ↻ asn1_expect_tag ↻ x509_read_alg_id sys_mmap ↻ asn1_expect_tag ↻

structs

none

consts

22const K_MAGIC_4194304: i64 = 4194304
23const K_MAGIC_8443: i64 = 8443
24const K_MAGIC_131072: i64 = 131072
25const K_MAGIC_2000: i64 = 2000

functions

27func pw(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return sys_write(1, s, n) }
called by 1: main calls 1: sys_write
28func pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
36func contains(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: main
49func main(argc: i64, argv: *i64) -> i64