code wiki / (root) / nx_lib_fetch_cookie.nx

nx_lib_fetch_cookie.nx

buildroot/runtime/nx_lib_fetch_cookie.nx

7557 B134 linesdepth 19pulls 123 transitivereach 1 importersview sourcekind librarytopic lib
docsdependenciesstructsconstsfunctions

about

nx_lib_fetch_cookie.nx -- sovereign HTTPS GET with a browser UA + Cookie header, for sources gated behind a cookie (e.g. a solved proof-of-work). Same TLS-1.3 connect+handshake as nx_lib_fetch; request builder + round-trip modeled on nx_https_get_spoof's sp_build/sp_get_complete (which lives in a main-bearing organ, so cannot be imported). license_tier: ORIGINAL

dependencies 10 imports · 1 importers

nx_syscalls.nx nx_csprng.nx nx_x509_trust_store.nx nx_tls13_client_session_run.nx nx_tls13_client_session.nx nx_tls13_record.nx nx_tls13_read_record_from_fd.nx nx_https_url_for_fetch.nx nx_https_url_connect.nx nx_https_get_complete.nx nx_lib_fetch_cookie.nx nx_lib_pmc_pow.nx

imports: nx_syscalls.nxnx_csprng.nxnx_x509_trust_store.nxnx_tls13_client_session_run.nxnx_tls13_client_session.nxnx_tls13_record.nxnx_tls13_read_record_from_fd.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_https_get_complete.nx

imported by: nx_lib_pmc_pow.nx

structs

none

consts

16const K_MAGIC_8192: i64 = 8192

functions

18func lfc_puts(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i }
called by 1: lfc_build
20func lfc_write_n(fd: i64, buf: *u8, n: i64) -> i64
called by 1: lfc_get_complete calls 1: sys_write
27func lfc_build(path: *u8, plen: i64, host: *u8, hlen: i64, cookie: *u8, clen: i64, out: *u8) -> i64
called by 1: lfc_get_complete calls 1: lfc_puts
42func lfc_get_complete(s: *Tls13ClientSession, fd: i64, path: *u8, path_len: i64, host: *u8, host_len: i64, cookie: *u8, clen: i64, out_buf: *u8, out_cap: i64) -> i64