code wiki / _hdl_build / nx_anon_transport.nx
nx_anon_transport.nx
buildroot/runtime/_hdl_build/nx_anon_transport.nx
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
imports: nx_syscalls.nxnx_connect.nxnx_socks5_client.nx
imported by: nx_socks5_client_gate.nx
structs
| none |
consts
| 20 | const ANON_DIRECT: i64 = 0 // plain TCP to a caller-supplied IPv4 (NO anonymity; allowlisted/hash-addressed use only) |
| 21 | const ANON_SOCKS5: i64 = 1 // via a SOCKS5 proxy (anonymity ONLY if that proxy is a Tor SOCKS port) |
| 22 | const ANON_TOR: i64 = 2 // native Tor client (ROADMAP -- not yet implemented) |
| 25 | const ANON_E_BACKEND: i64 = 0 - 20 // unknown backend id |
| 26 | const ANON_E_NOTIMPL: i64 = 0 - 21 // backend not implemented yet (Tor) |
| 27 | const ANON_E_SOCKET: i64 = 0 - 22 // direct socket / connect failed |
functions
| 32 | func anon_is_anonymizing(backend: i64) -> i64 called by 1: part_a |
| 38 | func anon_backend_name(backend: i64) -> *u8 |
| 47 | func anon_connect_direct(ip: *u8, port: i64) -> i64 |
| 65 | func anon_connect(backend: i64, route_ip: *u8, route_port: i64, host: *u8, hlen: i64, port: i64) -> i64 |
| 74 | func anon_send(fd: i64, buf: *u8, n: i64) -> i64 { return sys_write(fd, buf, n) } |
| 75 | func anon_recv(fd: i64, buf: *u8, cap: i64) -> i64 { return sys_read(fd, buf, cap) } calls 1: sys_read |
| 76 | func anon_close(fd: i64) -> i64 { return sys_close(fd) } |