code wiki / (root) / nx_cam_chaturbate_probe.nx

nx_cam_chaturbate_probe.nx

buildroot/runtime/nx_cam_chaturbate_probe.nx

13796 B283 linesdepth 21pulls 151 transitivereach 0 importersview sourcekind probetopic cam
docsdependenciesstructsconstsfunctions

about

nx_cam_chaturbate_probe.nx -- the NETWORK DRIVER for nx_cam_chaturbate (/compare/mediaingest R9). SPLIT ON PURPOSE, following the R1 precedent in this same lane (nx_source_health.nx pure lib + nx_source_health_probe.nx driver): the decision core stays import-light so its gate can prove every state with no network and no TLS closure, and only THIS organ carries the fetch stack. The lane has already paid for ignoring that split once -- nx_media_grab still cannot take its pacing import because the added closure tipped it past the nx_cc module limit. VERBS nx_cam_chaturbate_probe bulk [user] GET /affiliates/api/onlinerooms/?format=json -- ONE request that carries EVERY online room. With no user it prints the record count; with a user it prints that room's state. THIS IS THE RATE-LIMIT-SAFE PATH and the default way to watch a fleet: N performers cost one call, not N. Paying one ajax per performer is what flags an exit IP into a site-wide 403. nx_cam_chaturbate_probe resolve <user> POST /get_edge_hls_url_ajax/ -- the per-room URL resolve. Costs Cloudflare exposure, so it is for the moment a recording actually starts, never for polling. *** THE RESOLVED URL IS NEVER FETCHED BY THIS ORGAN. *** The edge token it carries is single-use / connection-bound: any fetch of the tokenised playlist -- including a "just checking it works" GET -- consumes it and the real consumer then gets 403. This organ prints the URL and stops. cb_capture_contract() states that rule in a return value so a gate can assert it from outside, rather than in a comment no caller can see. Both verbs go through the R0 pacer, so this cannot itself become the thing that gets us throttled. Egress is sovereign-owned only: no residential proxy pool, ever (standing bound, R12). license_tier: ORIGINAL

dependencies 14 imports · 0 importers

nx_syscalls.nx nx_cam_chaturbate.nx nx_source_health.nx nx_x509_trust_store.nx nx_tls13_client_validate_certifica nx_tls13_client_session_run.nx nx_tls13_chrome_session.nx nx_https_url_for_fetch.nx nx_https_url_connect.nx nx_https_post_complete.nx nx_cam_chaturbate_probe.nx

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

imports: nx_syscalls.nxnx_cam_chaturbate.nxnx_source_health.nxnx_x509_trust_store.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_post_complete.nxnx_https_fetch_follow.nxnx_http_response_parse.nxnx_csprng.nxnx_paced_fetch.nx

imported by: nobody (leaf or entry point)

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

main p_w sys_write p_slen sys_exit cb_ieq cb_slen cb_lc p_slen ↻ nx_trust_store_load_from_c sys_mmap nxa_die sys_write ↻ sys_exit ↻ nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close nx_nss_certdata_parse sys_mmap ↻ _pat_class_cert _pat_value_octal _pat_end _find_newline _starts_with _parse_octal_line

structs

none

consts

44const P_OUT_CAP: i64 = 8388608 // 8 MiB: the online-rooms feed is large and must not be truncated
45const P_URL_CAP: i64 = 4096
46const P_BODY_CAP: i64 = 1024
47const P_RAND_BYTES: i64 = 32
48const P_VC_BYTES: i64 = 128
49const P_TARGET_BYTES: i64 = 64
50const P_FDP_BYTES: i64 = 16
51const P_SOCK_TMO_S: i64 = 20
52const P_MAX_HOPS: i64 = 4
53const P_TRUST_CERTS: i64 = 300
54const P_TRUST_CAP: i64 = 4194304
55const P_OFF_BYTES: i64 = 16
56const P_RESP_FIELDS_BYTES: i64 = 128 // nx_http_response_parse writes its parsed fields into this array
57const P_HOST: *u8 = "chaturbate.com"
59const P_CERTDATA: *u8 = "data/mozilla_certdata.txt"
60const P_AJAX_URL: *u8 = "https://chaturbate.com/get_edge_hls_url_ajax/"
61const P_AJAX_PATH: *u8 = "/get_edge_hls_url_ajax/"
62const P_BULK_URL: *u8 = "https://chaturbate.com/affiliates/api/onlinerooms/?format=json"
63const P_CT_FORM: *u8 = "application/x-www-form-urlencoded"
64const P_XHDR: *u8 = "X-Requested-With: XMLHttpRequest\r\n"
66const P_EXIT_USAGE: i64 = 2
67const P_EXIT_TRUST: i64 = 3
68const P_EXIT_CONNECT: i64 = 4
69const P_EXIT_TLS: i64 = 5
70const P_EXIT_HTTP: i64 = 6

functions

72func p_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: main calls 1: sys_write
73func p_w(s: *u8) -> i64 { sys_write(1, s, p_slen(s)); return 0 }
called by 1: main calls 1: cb_wn
74func p_wb(b: *u8, n: i64) -> i64 { sys_write(1, b, n); return 0 }
75func p_wn(v: i64) -> i64 { cb_wn(v); return 0 }
78func p_body_off(buf: *u8, n: i64) -> i64
93func p_post_ajax(user: *u8, out: *u8, out_cap: i64, status_out: *i64) -> i64
164func p_preflight_skip(now_ms: i64) -> i64
179func p_record(connect_ok: i64, status: i64, elapsed_ms: i64, now_ms: i64) -> i64
183func main(argc: i64, argv: *i64) -> i64