nx_wiki_https_daemon_mv.nx
buildroot/runtime/wiki/nx_wiki_https_daemon_mv.nx
about
nx_wiki_https_daemon_mv.nx -- V-HOST-2.5: multi-vhost wiki HTTPS daemon.
One substrate process serves N sovereign wiki sites
(e.g., nishifamily.com + andelinwest.com + jasonewest.com).
Composes:
wiki/nx_wiki_vhost_table -- per-host wiki state registry
wiki/nx_wiki_https_daemon -- single-vhost reference for per-conn pattern
All existing TLS / wiki / search / archive / artifact primitives
Per Cardinal 19 (API stability): NEW file parallel to single-vhost
daemon. Existing nx_wiki_https_daemon unchanged. Operator picks which
to boot based on site count.
V-HOST-2.5 SCOPE:
- Multi-SAN cert (one cert covering all hosted domains; SAN list
per V-HOST-4d nx_cert_gen)
- Per-Host-header dispatch via NxWikiVHostTable
- Per-site doc_store + archive_store + artifact_store
- Shared admin_cfg + search_flow (V+1: per-site)
- Fallback vhost on no match (or 404)
V-HOST-2.5 NON-SCOPE (queued):
- SNI-aware cert selection during TLS handshake (V-HOST-2.5.5)
- Per-site cert (V-HOST-2.5.5)
- Per-site admin auth (V-HOST-2.5.7)
- Hot-reload vhost table (V-PROV-3)
Status: V-HOST-2.5. 2026-05-27.
dependencies 19 imports · 0 importers
diagram shows first 10 each side; +9 more imports, +0 more importers in the complete lists below.
imports: nx_syscalls.nxnx_csprng.nxnx_http_server.nxnx_http_io.nxnx_http_header_find.nxnx_tls13_server_session.nxnx_tls13_server_session_run.nxnx_tls13_server_session_app_data.nxnx_modern_auth_flow.nxnx_user_account_store.nxnx_search_handler_flow.nxnx_kv_store.nxnx_search_inverted.nxnx_wiki_routes.nxnx_wiki_index_builder.nxnx_wiki_archive_router.nxnx_artifact_store.nxnx_wiki_vhost_table.nxnx_wiki_content_loader.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
| 52 | const NX_MV_OK: i64 = 0 |
| 53 | const NX_MV_BAD_INPUT: i64 = 3830 |
| 54 | const NX_MV_CERT_LOAD_FAILED: i64 = 3831 |
| 55 | const NX_MV_BIND_FAILED: i64 = 3832 |
| 56 | const NX_MV_HS_FAILED: i64 = 3833 |
| 57 | const NX_MV_RECV_FAILED: i64 = 3834 |
| 58 | const NX_MV_PARSE_FAILED: i64 = 3835 |
| 59 | const NX_MV_NO_VHOST: i64 = 3836 |
| 60 | const NX_MV_DISPATCH_FAILED: i64 = 3837 |
| 61 | const NX_MV_SEND_FAILED: i64 = 3838 |
| 64 | const NX_MV_LISTEN_PORT: i64 = 8443 |
| 65 | const NX_MV_BACKLOG: i64 = 32 |
| 66 | const NX_MV_REQ_REC_CAP: i64 = 16384 |
| 67 | const NX_MV_PLAIN_CAP: i64 = 16384 |
| 68 | const NX_MV_RESP_CAP: i64 = 1048576 |
| 69 | const NX_MV_OUT_REC_CAP: i64 = 1048768 |
| 70 | const NX_MV_REQUEST_BUDGET: i64 = 100000 |
| 75 | const NX_MV_DEFAULT_CERT_PATH: *u8 = "/volume1/homes/elderwesto/nishihost/certs/multi_san_cert.der" as *u8 |
| 76 | const NX_MV_DEFAULT_PRIV_PATH: *u8 = "/volume1/homes/elderwesto/nishihost/certs/multi_san_priv.bin" as *u8 |
| 79 | const NX_MV_AUTH_DIR: *u8 = "/volume1/homes/elderwesto/nishihost/auth" as *u8 |
| 80 | const NX_MV_AUTH_KEYS_PATH: *u8 = "/volume1/homes/elderwesto/nishihost/auth/nishi_auth.keys.v1" as *u8 |
| 81 | const NX_MV_AUTH_STORE_PATH: *u8 = "/volume1/homes/elderwesto/nishihost/auth/nishi_auth_accounts.v1.log" as *u8 |
| 83 | const NX_MV_REALM: *u8 = "Nishi Wiki" as *u8 |
| 84 | const NX_MV_REALM_N: i64 = 10 |
| 85 | const NX_MV_ADMIN_USER: *u8 = "elderwesto" as *u8 |
| 86 | const NX_MV_ADMIN_USER_N: i64 = 10 |
| 91 | const NX_MV_CONTENT_MINIMAL: i64 = 0 // landing only (placeholder sites) |
| 92 | const NX_MV_CONTENT_FULL: i64 = 1 // every charter (nishifamily.com) |
| 93 | const NX_MV_CONTENT_PORTFOLIO: i64 = 2 // curated 6-charter subset (jasonewest.com) |
functions
| 97 | func _nx_mv_emit_404_response(out: *u8, out_n: *i64, cap: i64) -> i64 called by 1: nx_mv_handle_one |
| 123 | func nx_mv_handle_one( |
| 215 | func nx_mv_setup_site( |
| 269 | func main() -> i64 |