code wiki / (root) / nx_https_fetch_follow.nx

nx_https_fetch_follow.nx

buildroot/runtime/nx_https_fetch_follow.nx

30365 B555 linesdepth 20pulls 145 transitivereach 324 importersview sourcekind librarytopic https
docsdependenciesstructsconstsfunctions

about

nx_https_fetch_follow.nx -- Fetcher upgrade F-2: LIVE redirect-following fetch. Composes the proven sovereign TLS-1.3 fetch sequence (url_for_fetch -> connect -> client_session_run -> get_complete -> response_parse) with F-1's redirect logic (nx_https_redirect) in a bounded loop: on a 3xx with Location, re-fetch the new URL up to max_hops. 100% sovereign (nx_cc->nxasm, own TLS); the only non-Nishi inputs are the CA-root DATA + the fetched pages. API: nx_https_fetch_follow(url, store, out, out_cap, max_hops, out_status) -> POSITIVE body_bytes (final non-redirect response, dechunked into out) | NEGATIVE -code on failure. out_status[0] = final HTTP status. nx_safety_envelope: intended_use: sovereign web fetcher (live network) sil_target: SIL1 verdict: NOT_YET_EVALUATED genealogy_id: ietf/rfc_9110+9112 lineage_id: nx_https_fetch_follow_v1

dependencies 15 imports · 221 importers

nx_syscalls.nx nx_x509_trust_store.nx nx_tls13_client_validate_certifica nx_tls13_client_session_run.nx nx_https_url_for_fetch.nx nx_https_url_connect.nx nx_https_get_complete.nx nx_tls13_chrome_session.nx nx_http_response_parse.nx nx_https_redirect.nx nx_https_fetch_follow.nx nx_access_research_fetch.nx nx_adnet_research_fetch.nx nx_agentcap_sota_fetch.nx nx_apertus_mirror_nas.nx nx_apertus_shards_pull.nx nx_apertus_smallfiles.nx nx_apertus_tree_fetch.nx nx_api_sota_fetch.nx nx_apimcp_research_fetch.nx nx_archive_capture_demo.nx

diagram shows first 10 each side; +5 more imports, +211 more importers in the complete lists below.

imports: nx_syscalls.nxnx_x509_trust_store.nxnx_tls13_client_validate_certificate.nxnx_tls13_client_session_run.nxnx_https_url_for_fetch.nxnx_https_url_connect.nxnx_https_get_complete.nxnx_tls13_chrome_session.nxnx_http_response_parse.nxnx_https_redirect.nxnx_http_range_req.nxnx_tls12_req.nxnx_tls12_client_session.nxnx_csprng.nxnx_gzip_wrap.nx

imported by: nx_access_research_fetch.nxnx_adnet_research_fetch.nxnx_agentcap_sota_fetch.nxnx_apertus_mirror_nas.nxnx_apertus_shards_pull.nxnx_apertus_smallfiles.nxnx_apertus_tree_fetch.nxnx_api_sota_fetch.nxnx_apimcp_research_fetch.nxnx_archive_capture_demo.nxnx_archive_live.nxnx_archive_media_fetch.nxnx_archive_site_viewer.nxnx_archive_viewer.nxnx_archive_xcapture_fetch.nxnx_asr_research_fetch.nxnx_award_ui_research_fetch.nxnx_barcheck.nxnx_battery_research_fetch.nxnx_bench_fetch.nxnx_brand_exceed_research_fetch.nxnx_brand_research_fetch.nxnx_bulk_index.nxnx_cadtwin_research.nxnx_cadtwin_research2.nxnx_cc_datahost_probe.nxnx_cc_ingest.nxnx_cc_record_fetch.nxnx_cc_warc_fetch.nxnx_cdnaccess_research_fetch.nxnx_cf_access_probe.nxnx_claim_verify.nxnx_clean_serve_daemon.nxnx_cleanview.nxnx_cleanwatch_serve.nxnx_codec_research_fetch.nxnx_commoncrawl_probe.nxnx_commoncrawl_query.nxnx_compare_instrument_verify.nxnx_compare_registry_assemble.nxnx_connect_research_fetch.nxnx_corpus_fetch.nxnx_crawl_web.nxnx_dev_api_live_check.nxnx_dist_verify.nxnx_dlperf_research_fetch.nxnx_dm_research_fetch.nxnx_dmn_research_fetch.nxnx_doc_research_fetch.nxnx_docpub_research_fetch.nxnx_doctor_research_fetch.nxnx_doh_probe.nxnx_download_research_fetch.nxnx_dr_research_fetch.nxnx_eco_research_fetch.nxnx_eda_tooling_research_fetch.nxnx_edge_watchdog.nxnx_effbench_research_fetch.nxnx_elara_ref_fetch.nxnx_emit_sota_fetch.nxnx_entity_card.nxnx_ereader_sota_fetch.nxnx_erotica_research_fetch.nxnx_evidence_research_fetch.nxnx_fabric_research_fetch.nxnx_feedfetch.nxnx_fetch.nxnx_fetch_any.nxnx_fetch_to_file.nxnx_fetchprobea.nxnx_fetchprobeb.nxnx_fetchprobec.nxnx_fetchprobed.nxnx_fetchprobew.nxnx_fin_edgar_fetch.nxnx_fin_fund_research_fetch.nxnx_fin_marketdata_fetch.nxnx_fin_md_probe.nxnx_fin_research_fetch.nxnx_font_gen_research_fetch.nxnx_font_legib_research_fetch.nxnx_font_research_fetch.nxnx_food_research_fetch.nxnx_foodsci2_research_fetch.nxnx_foodsci3_research_fetch.nxnx_foodsci_research_fetch.nxnx_forge_model_fetch.nxnx_game_asset_research_fetch.nxnx_game_ingest.nxnx_game_research_fetch.nxnx_gamechar_sota_fetch.nxnx_games_url_check.nxnx_ge_research_fetch.nxnx_gen3d_sota_fetch.nxnx_genui_sota_fetch.nxnx_gmmlu_research_fetch.nxnx_hf_enumerate_probe.nxnx_hf_file_fetch.nxnx_hifigan_fetch.nxnx_hifigan_weights_fetch.nx +121 more (shown cap 100 declared)

structs

none

consts

44const NX_FF_GZ_MAX_OUT: i64 = 33554432 // declared: 32MB inflate ceiling, so a zip-bomb cannot take the host
63const NX_MAGIC_4096: i64 = 4096
64const NX_MAGIC_2048: i64 = 2048
65const NX_MAGIC_65536: i64 = 65536
66const NX_MAGIC_20000: i64 = 20000
67const NX_MAGIC_8192: i64 = 8192
69const NX_FF_BAD_URL: i64 = 1
70const NX_FF_CONNECT: i64 = 2
71const NX_FF_HANDSHAKE: i64 = 3
72const NX_FF_GET: i64 = 4
73const NX_FF_PARSE: i64 = 5
74const NX_FF_NO_LOCATION: i64 = 6
75const NX_FF_TOO_MANY: i64 = 7
82const NX_FF_FETCH_TIMEOUT_SECS: i64 = 8
166const NX_FF_JAR_BYTES: i64 = 3072

functions

45func ff_gunzip(out: *u8, n: i64, out_cap: i64) -> i64
calls 1: nx_gzip_inflate
86func ff_path(urlbuf: *u8, target: *NxHttpsTarget, path_out: *u8) -> i64
111func ff_apps(dst: *u8, k0: i64, src: *u8) -> i64 { // append NUL-term src
called by 1: ff_resolve_location
116func ff_appn(dst: *u8, k0: i64, src: *u8, n: i64) -> i64 { // append n bytes
121func ff_appi(dst: *u8, k0: i64, v: i64) -> i64 { // append decimal int
calls 1: sys_mmap
130func ff_starts(s: *u8, p: *u8) -> i64 { // s starts with prefix p?
called by 1: ff_resolve_location
138func ff_resolve_location(loc: *u8, cur_urlbuf: *u8, cur: *NxHttpsTarget, outp: *u8) -> i64
169func ff_hdr_match(buf: *u8, pos: i64, n: i64, pat: *u8, patlen: i64) -> i64
183func ff_jar_set(jar: *u8, jl: *i64, cap: i64, name: *u8, name_len: i64, val: *u8, val_len: i64) -> i64
219func ff_collect_cookies(buf: *u8, n: i64, jar: *u8, jl: *i64, cap: i64) -> i64
245func ff_is_gate_url(url: *u8) -> i64
259func ff_core(url0: *u8, store: *TrustStore, out: *u8, out_cap: i64,
377func nx_https_fetch_follow_13only(url0: *u8, store: *TrustStore, out: *u8, out_cap: i64,
383func nx_https_fetch_follow_chrome(url0: *u8, store: *TrustStore, out: *u8, out_cap: i64,
392func nx_https_fetch_range(url0: *u8, store: *TrustStore, out: *u8, out_cap: i64,
460func nx_https_fetch_follow_12(url0: *u8, store: *TrustStore, out: *u8, out_cap: i64, out_status: *i64) -> i64
524func nx_https_fetch_follow_best(url0: *u8, store: *TrustStore, out: *u8, out_cap: i64,
552func nx_https_fetch_follow(url0: *u8, store: *TrustStore, out: *u8, out_cap: i64,