nx_archive_server.nx
buildroot/runtime/nx_archive_server.nx
about
nx_archive_server.nx -- sovereign localhost HTTP server for the time machine (R5 serve side). Binds 0.0.0.0:8080,
serves files under web_assets/ (path-traversal rejected), Content-Type by extension. "/" -> a landing page. Also
hosts the SUPERVISED do-not-recover blocklist: GET /blocklist renders it live from seg_store (justification +
per-entry action), GET /blocklist/approve?id=N and /blocklist/retract?id=N are the operator ACTIONS (flip status on
seg_store, then 303 back to /blocklist). Pending entries never block until approved here. Fetch stack. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_blocklist_view.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
| 8 | const K_MAGIC_8080: i64 = 8080 |
| 9 | const K_MAGIC_8192: i64 = 8192 |
| 10 | const K_MAGIC_2048: i64 = 2048 |
| 11 | const K_MAGIC_2097152: i64 = 2097152 |
functions
| 13 | func sw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 14 | func ap(buf: *u8, off: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8) { buf[off+i]=s[i]; i=i+1 } return off+i } |
| 15 | func apn(buf: *u8, off: i64, v: i64) -> i64 { if v==0 { buf[off]=0x30 as u8; return off+1 } var m: i64=v; let t: *u8=sys_mmap(24); var k: i64=0; while m>0 { t[k]=(48+(m%10)) as u8; m=m/10; k=k+1 } var o: i64=off; var q: i64=k-1; while q>=0 { buf[o]=t[q]; o=o+1; q=q-1 } return o } calls 1: sys_mmap |
| 16 | func endswith(path: *u8, plen: i64, ext: *u8, elen: i64) -> i64 { if plen<elen { return 0 } var i: i64=0; while i<elen { if (path[plen-elen+i] as i64) != (ext[i] as i64) { return 0 } i=i+1 } return 1 } called by 1: ctype |
| 17 | func ctype(path: *u8, plen: i64) -> *u8 calls 1: endswith |
| 26 | func has_dotdot(buf: *u8, off: i64, len: i64) -> i64 { var i: i64=off; while i+1<off+len { if (buf[i] as i64)==0x2e { if (buf[i+1] as i64)==0x2e { return 1 } } i=i+1 } return 0 } |
| 28 | func path_eq(req: *u8, pst: i64, plen: i64, lit: *u8, litlen: i64) -> i64 { if plen!=litlen { return 0 } var i: i64=0; while i<litlen { if (req[pst+i] as i64)!=(lit[i] as i64) { return 0 } i=i+1 } return 1 } |
| 29 | func path_starts(req: *u8, pst: i64, plen: i64, lit: *u8, litlen: i64) -> i64 { if plen<litlen { return 0 } var i: i64=0; while i<litlen { if (req[pst+i] as i64)!=(lit[i] as i64) { return 0 } i=i+1 } return 1 } |
| 31 | func qid(req: *u8, qst: i64, qen: i64, idbuf: *u8) -> i64 |
| 43 | func main() -> i64 |