nx_pages_https_daemon.nx
buildroot/runtime/nx_pages_https_daemon.nx
about
nx_pages_https_daemon.nx -- D1.3 of NISHI_DEPLOY_ROADMAP. Composes
nx_edge_daemon's TLS 1.3 handshake stones with nx_pages_vhost +
nx_pages_static for full HTTPS hosting of nishifamily.com (and any
vhost configured in the table).
Pre-existing pieces (no changes needed):
nx_edge_daemon -- handshake driver (recv_ch, emit_sh,
derive_hs, derive_traffic, emit_ee,
emit_certificate, emit_cv, emit_sf,
recv_cf) + TCP socket setup
nx_tls13_server_session_app_recv / app_send -- AEAD record I/O
nx_pages_vhost -- Host-header dispatch (D1.1)
nx_pages_static -- file serve with mime + 200/404/405
nx_http.nx http_parse -- full HTTP/1.1 request parse (FIXED
earlier in NISHI_DEPLOY_ROADMAP)
D1.3 work in this file:
- Replace nx_edge_handle_connection's "read encrypted, ignore it,
send a single static HTML" with "decrypt, parse, vhost-dispatch,
serve, encrypt".
- Mount a multi-vhost configuration suitable for nishifamily.com.
Per [[NISHI_DEPLOY_ROADMAP]] D1.3. D1.4 (HTTP->HTTPS on :80) and
D1.5 (ACME auto-renew loop) layer on top of this.
dependencies 20 imports · 0 importers
diagram shows first 10 each side; +10 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_x25519_ephemeral.nxnx_tls13.nxnx_tls13_record.nxnx_tls13_server_session.nxnx_tls13_server_session_recv_ch.nxnx_tls13_server_session_emit_sh.nxnx_tls13_server_session_derive_hs.nxnx_tls13_server_session_derive_traffic.nxnx_tls13_server_session_emit_ee.nxnx_tls13_server_session_emit_certificate.nxnx_tls13_server_session_emit_cv.nxnx_tls13_server_session_emit_sf.nxnx_tls13_server_session_recv_cf.nxnx_tls13_server_session_app_data.nxnx_http.nxnx_http_server.nxnx_pages_vhost.nxnx_pages_static.nxnx_pages_config.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
| 46 | const NX_MAGIC_2048: i64 = 2048 |
| 47 | const NX_MAGIC_4096: i64 = 4096 |
| 49 | const NX_PHTTPS_OK: i64 = 0 |
| 50 | const NX_PHTTPS_ERR_HANDSHAKE: i64 = 1 |
| 51 | const NX_PHTTPS_ERR_APP_RECV: i64 = 2 |
| 52 | const NX_PHTTPS_ERR_PARSE: i64 = 3 |
| 53 | const NX_PHTTPS_ERR_APP_SEND: i64 = 4 |
| 54 | const NX_PHTTPS_ERR_SOCKET_WRITE: i64 = 5 |
| 56 | const NX_PHTTPS_PORT: i64 = 8443 |
| 57 | const NX_PHTTPS_REQ_REC_CAP: i64 = 16384 |
| 58 | const NX_PHTTPS_PLAIN_CAP: i64 = 16384 |
| 59 | const NX_PHTTPS_RESP_CAP: i64 = 1048576 // 1 MB max response body |
| 60 | const NX_PHTTPS_OUT_REC_CAP: i64 = 1048768 // resp + TLS record overhead |
| 61 | const NX_PHTTPS_BACKLOG: i64 = 64 |
functions
| 70 | func _phttps_handshake( |
| 151 | func nx_pages_https_handle_connection( |
| 241 | func _phttps_setup_vhosts_hardcoded(t: *NxVHostTable, cursor: *i64) -> i64 |
| 253 | func _phttps_setup_vhosts(t: *NxVHostTable, cursor: *i64) -> i64 |
| 260 | func nx_pages_https_daemon_run( |
| 324 | func main() -> i64 |