code wiki / _hdl_build / nx_anon_transport.nx

nx_anon_transport.nx

buildroot/runtime/_hdl_build/nx_anon_transport.nx

4832 B76 linesdepth 6pulls 6 transitivereach 1 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_anon_transport.nx -- the ANONYMIZING TRANSPORT INTERFACE: the single seam the privacy no-leak guard's nx_private_fetch calls INSTEAD of a raw socket (guard design: knowledge/store/media-inventory/privacy_noleak_guard.DESIGN.txt). A pluggable BACKEND decides HOW the external connection is carried. This is the common foundation every anonymity path (SOCKS5->Tor, native Tor, mixnet) plugs into: the guard codes against anon_* and never against a concrete transport, so the anonymizer can be strengthened underneath it without touching the guard. HONESTY, ENCODED IN CODE: anon_is_anonymizing() returns 1 ONLY for a backend that actually hides the origin from the destination. A bare SOCKS5 proxy does NOT (the proxy sees origin+dest+timing) -- it anonymizes only when it is a Tor client's SOCKS port, which is the ANON_TOR backend (still a roadmap stub, so TODAY every IMPLEMENTED backend returns 0). The guard MUST consult this before any private-category external fetch, so a plain proxy can never be silently mistaken for anonymity. Sovereign: nx_syscalls + nx_socks5_client. No libc, no shell. license_tier: ORIGINAL expect_exit: 0

dependencies 3 imports · 1 importers

nx_syscalls.nx nx_connect.nx nx_socks5_client.nx nx_anon_transport.nx nx_socks5_client_gate.nx

imports: nx_syscalls.nxnx_connect.nxnx_socks5_client.nx

imported by: nx_socks5_client_gate.nx

structs

none

consts

20const ANON_DIRECT: i64 = 0 // plain TCP to a caller-supplied IPv4 (NO anonymity; allowlisted/hash-addressed use only)
21const ANON_SOCKS5: i64 = 1 // via a SOCKS5 proxy (anonymity ONLY if that proxy is a Tor SOCKS port)
22const ANON_TOR: i64 = 2 // native Tor client (ROADMAP -- not yet implemented)
25const ANON_E_BACKEND: i64 = 0 - 20 // unknown backend id
26const ANON_E_NOTIMPL: i64 = 0 - 21 // backend not implemented yet (Tor)
27const ANON_E_SOCKET: i64 = 0 - 22 // direct socket / connect failed

functions

32func anon_is_anonymizing(backend: i64) -> i64
called by 1: part_a
38func anon_backend_name(backend: i64) -> *u8
47func anon_connect_direct(ip: *u8, port: i64) -> i64
65func anon_connect(backend: i64, route_ip: *u8, route_port: i64, host: *u8, hlen: i64, port: i64) -> i64
74func anon_send(fd: i64, buf: *u8, n: i64) -> i64 { return sys_write(fd, buf, n) }
called by 1: main calls 1: sys_write
75func anon_recv(fd: i64, buf: *u8, cap: i64) -> i64 { return sys_read(fd, buf, cap) }
calls 1: sys_read
76func anon_close(fd: i64) -> i64 { return sys_close(fd) }
called by 1: main calls 1: sys_close