[1.10.0] - 2026-12-02 (tagged v20260407)
Added
- Privilege Separation, AF_UNIX Transport & Per-Boot HMAC Accessors (
include/ttypt/axil.h,include/ttypt/axil-xy.h,src/axil-posix.c,src/axil-http.c,src/axil-query.c,src/axil.c,src/libaxil.c,snap/usage.txt,test.sh): - Added
-u USERpermanent post-bind privilege drop (axil_config.user),-U PATHAF_UNIXlistener (axil_config.unix_sock,DF_UNIX),unix:/pathreverse-proxy target support inaxil_proxy_prefix()/-P, kernel-verifiedaxil_peer_cred()forAF_UNIXclients, and theon_axil_post_bindXylem hook (5566090). - Added
axil_privsep_key(unsigned char out[32])(per-boot 32-byte HMAC key readable only insideon_axil_post_chroot()whilegeteuid() == 0and cleansed beforesetuid()) andaxil_drop_ids(uid_t *uid, gid_t *gid)for jailed worker modules (6995e34).
Fixed
- NPM Header Mirror (
npm/include/): - Populated
npm/include/from canonicalinclude/to matchnpm/package.jsonfiles.
[1.9.1] - 2026-12-02
Changed
- OpenBSD Wildcard Dependency Packaging:
- Repackaged with wildcard OpenBSD
@dependspecifications (libstele-*,libcorm-*,libxylem-*) viatty-pt/ciso downstream OpenBSD packages resolvelibcorm 2.5.2+andlibxylem 1.9.2+cleanly without exact-version pin conflicts.
[1.9.0] - 2026-12-01
Added
- Mobile Static Libraries (
android-lib+ios-lib) (.github/workflows/ci.yml): - Enabled Android (
arm64-v8a,x86_64) and iOS (arm64device/simulator +libaxil.xcframework.zip) static library packaging and publishing (899e360,70ca0db). - Runtime
stele:ws_*Capability Registration (htdocs/axil-cap.js,npm/dist/axil-cap.js): - Registered
stele:ws_*main-thread and worker-thread capability handlers directly vialibstele's runtime handler hooks (registerSteleMainHandler/registerSteleWorkerHandler), decouplingaxilWebSocket transport from Layer-0libstele(838768f). - Embedded Server & Mobile (Android / iOS) Support (
src/,include/ttypt/axil.h,Makefile): - Added loopback bind, ephemeral port writeback,
axil_post_bind, andaxil_stopfor embedded usage (2a4ffee). - Added
OPTIONSmethod,axil_deny_prefix, andaxil_proxy_prefixrouting (4a0d5d7). - Added Android/iOS POSIX backend rules, mobile UTF-8 slugify fallback (
12b4abb), and iOS SDK guards forchroot/daemon/fork+ unused telnet/pty header removal (47aff61). - Cross-Platform Service Definitions (
Makefile,services/): - Added systemd (
services/systemd/axil.service), OpenBSDrc.d(services/rc.d/axil), FreeBSD/NetBSD/DragonFlyrc.d(services/freebsd/axil), OpenRC (services/openrc/axil), macOSlaunchd(services/launchd/pt.tty.axil.plist), and Windows (services/windows/axil.xml,services/windows/install-service.ps1) service definitions with aninstall-servicesMakefile target (3c37fc6,f9105b5). - Native WebSocket Host Declarations (
include/ttypt/axil-ws.h): - Added
#elif defined(AXIL_WS_NATIVE)function declarations (ws_connect,ws_send,ws_send_channel,ws_status,ws_close,term_write) so native builds can link host implementations instead of falling back to no-op inline stubs (9721195).
Changed
- Delegated JSON Escaping to
<ttypt/iso_json.h>(src/axil-encode.c): - Delegated
axil_json_escape()tolibstele's header-onlyiso_json_escape()(bde2793). - Portable
libstele/mkBuild Modernization (Makefile,Doxyfile,.github/workflows/ci.yml): - Migrated to
include ttypt/include.mkvia Make search paths, dropped legacy../mkfallback, adoptedCFLAGS-LIB/CFLAGS-BIN, eliminated duplicate$(shell)/!=forks, and alignedDoxyfileand CI build dependencies withlibstele(30acf4e,8eef4e1,a4b9899,a55d0d5,53d3a1b,32de8d6). - Modularized
libaxilSource Split (src/,Makefile,objects-set.mk): - Split
src/libaxil.cinto dedicated compilation units:src/axil-http.c(HTTP request/response and routing),src/axil-query.c(environment, query, and header helpers), andsrc/axil-tls.c(OpenSSL/TLS lifecycle), coordinated throughsrc/axil-internal.h(09db345). - Standardized npm Metadata (
npm/package.json,npm/README.md): - Standardized author,
BSD-2-Clauselicense, and npmREADME.mddocumentation (bfb12c9).
Removed
- Redundant Browser Bridge Files (
htdocs/): - Removed duplicate
htdocs/axil-bridge.jsandhtdocs/axil-ws-cap.js, consolidating browser WebSocket/WASM capability transport onhtdocs/axil-cap.js(09db345).
Fixed
- Large Static & Deferred Response Connection Closing (
src/axil-http.c,src/libaxil.c,test.sh): - Deferred
DF_TO_CLOSEacrossstatic_write()'s read loop so large static responses cannot close mid-transfer whenremaining_lentransiently drains to 0, stopping reads ifd->fdcloses (eac57c9). - Cleared
DF_TO_CLOSEand setDF_DEFERREDbefore header writes inaxil_respond_defer(), guardedaxil_write_remaining()against closing whileDF_DEFERREDis active, and added a 32 MiB paced-reader regression test (eac57c9). - HTTP Deferred Response Framing (
src/libaxil.c/src/axil-http.c): - Drained incoming bytes on
DF_DEFERREDdescriptors to detect client disconnects without dispatching overlapping requests, and defaultedConnection: closeinaxil_respond_defer()(26e0aaf).
[1.8.4] - 2026-11-16
Fixed
- Xylem Module Resolution Priority (
npm/dist/index.js): - Updated
resolveModulePath()to prioritizelibaxil-<shortName>and@tty-pt/axil-<shortName>over base@tty-pt/<shortName>packages so-m hyle/-m axil-hyleand-m auth/-m axil-authresolve tolibaxil-hyleandlibaxil-authrather thanlibhyle.
[1.8.3] - 2026-11-16
Fixed
- Dynamic Directory Autoindex Buffer &
Content-LengthFraming (src/libaxil.c): - Replaced the fixed 8 KB stack buffer in
request_handle_autoindex()with a dynamically growing heap buffer (calloc/realloc) so directories with many entries never silently drop trailing links. - Fixed the 2-byte
Content-Lengthovercount (body_len += 24instead of26for"</pre><hr></body></html>") that caused HTTP clients to hang waiting for 2 unreceived bytes on autoindex responses. - OpenBSD Packaging Dependencies (
.github/workflows/ci.yml): - Added
libsteletodeps_openbsd(libstele,libcorm,libxylem) and rebuilt OpenBSD package againstlibxylem1.8.1andlibstele1.7.1.
[1.8.2] - 2026-11-16
Changed
- Arch Linux (
pacman) Packaging (.github/workflows/ci.yml): - Added
pacmantopublish_toandlibsteletodeps_pacman(libstele,libcorm,libxylem, omittingopensslto avoid container partial-upgradelibssl.so.3mismatches) soaxilpublishes across all 7 OS targets (deb,apk,rpm,pacman,brew,openbsd,winget).
[1.8.1] - 2026-11-15
Added
- N-API Daemon Host & CLI Wrapper (
src/axil.c,npm/native/,npm/bin/axil.js,npm/dist/): - Extracted reusable
axil_cli(int argc, char *argv[])entry point insrc/axil.c(withoptind = 1reset and#ifndef AXIL_NO_MAINguard onmain()), preserving weak default hooks inlibaxil.sowhile allowing bothbin/axiland the Node-API addon to embed the full CLI and strongaxil_*host callbacks. - Added Node-API native addon (
npm/native/axil_napi.c,npm/native/LIBS) exposingcli(args),statusText,urlEncode,urlDecode,jsonEscape, andslugify, loaded via@tty-pt/stelewithRTLD_NOW | RTLD_GLOBALso dynamically loaded Xylem modules (xy_load) resolvelibaxil,libxylem,libcorm,libstele, andstruct xy_ctx xy. - Added CLI executable wrapper (
npm/bin/axil.js) and Xylem module resolver (resolveModulePath,normalizeCliArgs,runCliinnpm/dist/index.js) that resolves-m <mod>across installed@tty-pt/*prebuilds/<platform>-<arch>/directories and spawns detached background daemons cleanly before V8/native thread pools initialize. - Per-Descriptor Event Loop Tick Hook (
include/ttypt/axil.h,include/ttypt/axil-xy.h,src/axil.c,src/libaxil.c): - Added
axil_fd_tick(socket_t fd)/on_axil_fd_tickhook dispatched per active descriptor during event loop ticks.
[1.8.0] - 2026-11-14
Added
- NPM Package
@tty-pt/axil& Web HAL Capability Modules (npm/dist/,htdocs/axil-cap.js,htdocs/axil-ws-cap.js,npm/tests/axil.test.mjs): - Packaged
AxilClientwith standardized Web HAL capability bridges (createAxilBridge,htdocs/axil-cap.js,htdocs/axil-ws-cap.js), TypeScript declarations (bridge.d.ts,index.d.ts), and Node.js test suite (npm/tests/axil.test.mjs).
Fixed
- TLS (
src/): enable automatic DH parameters and the P-521 curve, retry automatically, and unify the SNI callbacks.
Changed
- Libstele Substrate Integration:
- Replaced legacy references with libstele
stl_*interfaces across POSIX, server, and test harness code.
[1.7.0]
- Canonical Browser WebSocket Bridge (
htdocs/axil-bridge.js): - Shipped single-source, zero-dependency browser WebSocket bus with auto-reconnect, exponential backoff, port-scoped channel routing, and telemetry logging.
- WebSocket Channel Multiplexing (
include/ttypt/axil-ws.h): - Standardized channel multiplexing definitions: Stream 0 (Text/ANSI TTY), Stream 1 (Binary BCP
#b), Stream 2 (JSON/RPC). - Capability Allowlist & Dynamic Module Imports:
- Updated WASM allowed imports (
wasm-allowed-imports.lst) ensuring strict guest/host boundaries.
[1.5.0]
- Framed responses:
Content-Length+Connection: closeon everyaxil_respond(). Responses previously carried no body framing, so a client could only delimit the body by connection close -- over TLS that requiresclose_notify, which was never sent either. Strict clients (OpenSSL 3.5+, modern browsers) discarded such responses as truncated, droppingSet-Cookiewith them. 1xx/204/304 stay length-free per RFC 9110, and 101 upgrade paths bypassaxil_respond()untouched. Explicitly set lengths are respected, never duplicated. - Best-effort TLS
close_notifyon teardown.axil_ssl_drop()now runs up to two non-blockingSSL_shutdown()calls beforeSSL_free(), ensuring clean TLS connection termination. - Teardown is ungated: unauthenticated connection cleanup (SECURITY S5.4).
axil_disconnect()no longer requiresDF_AUTHENTICATEDandaxil_close()no longer requiresDF_CONNECTED. Resolves socket and PTY leakage vulnerabilities where unauthenticated descriptors outlived their TCP connection. - Per-connection generation tracking: Generational tracking on connection descriptors to eliminate stale hook dispatch and race conditions during rapid reconnects.
- Fixed 303 Redirect Connection Teardown: Fixed connection closing and cookie persistence issues on HTTP 303 See Other redirects.
- Post-Chroot Module Loading: Improved path canonicalization and search mechanics for dynamic modules running post-chroot.
kept as a regression: an AUTHENTICATED PTY connection killed abruptly must still leave no live child, no PTY master, and clean HTTP on recycled fds.
- Per-connection generation:
axil_generation().struct descrgrows a
monotonic generation bumped on every accept, so fd-keyed module state can reject stale entries. axil-tty's mux_state and NAWS entry carry it and mux_get()/mux_wsz_get() refuse a mismatch โ even a leaked entry is inert on a recycled descriptor, which closes the whole class rather than the one instance above.
- **
DF_AUTH_AUTO(flag 4096):-Apublishes an identity, it does not prove
one.** AXIL_AUTOAUTH authenticates every connection as the server's own account, so under -A a name comparison cannot tell an asserted identity from a published one. The flag is set only by AXIL_AUTOAUTH (so it cannot survive descriptor reuse), drop_priviledges() refuses to spawn a child under it โ a child would otherwise run as the operator while the request proved nothing โ and any downstream authorization that trusts REMOTE_USER must refuse a descriptor carrying it (SECURITY.md S5.8).
FD_VALID(fd)before any[FD_SETSIZE]table. One macro, checked
before the first index rather than after the frame has already been touched, covering descr_map, io, frame_map and ws_flags; on Windows socket_t is the unsigned SOCKET, so >= 0 would be a tautology and INVALID_SOCKET (~0) is rejected by the < FD_SETSIZE half. Accept now spells the sentinel out (fd == INVALID_SOCKET || fd == 0) instead of the fd <= 0 test that never fires for an unsigned ~0, and every teardown path closes with axil_sock_close() (closesocket() on Winsock) instead of close() on a CRT fd.
- Tests:
test-auth,test.shandtest-ws.pygain the teardown,
recycled-fd, DF_AUTH_AUTO and FD_VALID assertions; SECURITY.md records S5.4 and S5.5.
[1.4.0]
- Renamed
libndcโaxil: thendc_*API andinclude/ttypt/ndc.hbecameaxil_*/include/ttypt/axil.h(ndc.pcโaxil.pc, lib renamed accordingly). XY hooks are nowaxil_*(on_axil_exit,on_axil_vim,on_axil_command,on_axil_connect,on_axil_disconnect,on_axil_tick,on_axil_parseininclude/ttypt/axil-xy.h). - Unified request-parameter API:
axil_req_param(fd, body, name, buf, len)plus_int/_boolvariants read a parameter from a URL-encoded form body or the query string in a single call (handles quoted values);axil_param/axil_param_int/axil_param_boolcover the query-string path, with support for special characters in the URL. - PUT, DELETE and HEAD support: new
AXIL_PUT/AXIL_DELETE/AXIL_HEADrequest flags,do_PUT/do_DELETE/do_HEADhandlers, andDF_HEADto suppress the response body. - Encoding helpers:
axil_url_encode/axil_url_decode(percent-encoding,%XXand+),axil_json_escape, andaxil_slugifyfor URL/filesystem-safe slugs. - Static-file serving:
axil_respond_file/axil_sendfilewith auto-detected MIME type, ETag validator headers derived from the file stat, and an mmap-backedcache.allowcaching policy (OpenBSD-compatible). - Response conveniences:
axil_respond_plain/axil_respond_json/axil_respond_json_ok/axil_respond_no_content,axil_redirect(303). - Deferred responses:
axil_respond_defer(fd, code)sends status + headers now; the body is completed later from the event loop viaaxil_respond_defer_finish/_done/_abort(streaming and long-poll style responses). - Performance: optimised header conversion, cached HTTP date strings,
TCP_NODELAY, single-write responses. - Hardening: audit fixes, expanded test suite, OpenBSD (
iconv) build fix,bmakecompatibility, and thelibqmapโlibcormrename in the build. - TLS & HTTP/2 hardening: teardown no longer calls
SSL_shutdown(noclose_notifyon a dead peer); the HTTP/2 prior-knowledge preface (PRI * HTTP/2.0) is dropped, not treated as a GET; ALPN advertiseshttp/1.1only (not a protocol freeze โ addh2when HTTP/2 exists).
[v1.4.1] - 2026-09-27
- Non-blocking I/O correctness: accepted sockets are non-blocking, but several paths still assumed a blocking read. A request head split across TCP segments is now held in per-descriptor state and resumed when the rest arrives, instead of being dispatched truncated and losing headers (
usleep()is gone from the request path);EAGAINis no longer confused with end-of-stream in the WebSocket proxy wait, the raw tunnel, or POST-body buffering, all three of which used to drop a healthy connection. - WebSocket frame layer: payloads are heap-allocated to the length the frame declares rather than overflowing a fixed
BUFSIZbuffer into neighbouring connections' state; extended 16/32/64-bit lengths are byte-swapped in both directions (the 64-bit write path usedhtonl, so a 2^33 frame encoded as length 0); a frame split across reads resumes instead of being discarded; peer-declared lengths are capped at 64 MB;ws_write()sends the header and payload separately instead of sizing a stack VLA from the caller's length;frame_mapshrank from 8.4 MB to under 100 KB. - Request head: any blank-line-terminated head is parsed instead of only GET/POST/HEAD/PUT/DELETE, so a registered
OPTIONS(or any other) handler runs again; a head that grows past 64 KiB without a terminator is answered with431 Request Header Fields Too Largeand the descriptor is freed, instead of being stashed on the connection indefinitely. - POST body: buffering retries
EAGAINon the non-blocking socket (20 attempts, 500 us apart) instead of treating a short read as a disconnect, and only stalls count against that budget, so a body larger than 20 reads arrives whole instead of being silently truncated. - Handler body: the body handed to an
axil_handler_tis NUL-terminated at the declaredContent-Length, at the end of the body rather than the end of the last read.axil_handler_tpasses only achar *and axil exposes no content-length accessor, sostrlen(body)was the only length a handler could get โ and it returned the length of whatever the previous request had left in the shared buffer, or ran past the allocation when the tail held no NUL. A request without aContent-Lengthgets an empty body. - TLS accept:
ssl_accept()retriesSSL_ERROR_WANT_WRITEas well asSSL_ERROR_WANT_READ; sockets are made non-blocking with the platform's own call (ioctlsocket/ioctl/fcntl) and without clobbering existing status flags. - WebSocket writes:
ws_write()sends the frame payload throughaxil_low_write(), so a partially written payload is buffered and retried like every other write. - Tests:
proof.shreports T1-T8 individually (19 checks) and both runners refuse to run against a port another process already owns, kill every server they started on the way out, and check request bodies against a per-run token and the length a handler sees. - Static files:
axil_respond_file()now queues its body betweenaxil_respond_defer()andaxil_respond_defer_done()likeaxil_sendfile(), so it delivers the whole file instead of headers promisingContent-Lengthwith a 0-byte body. - Auth: an unknown user now inherits the
axil_pwidentity deliberately rather than being resolved to uid 0, andaxil_disconnect()fires for authenticated connections. - Docs:
axil_auth()returns 0 for a name the system knows and 1 for an unknown one. That return is advisory โ nothing in-tree enforces it, since the platform auth hook returnsvoidโ so a caller wanting to reject an unknown name must check for itself. The unknown-user fallback to theaxil_pwidentity, the 8191-byte truncation of over-long names, and theEBADFdescriptor bound are documented. - Security:
axil_auth()no longer leaves itsusernamefield unterminated when given a name at or pastBUFSIZ; the over-read into adjacent descriptor state (including theremainingpointer) is gone.axil_ws_read/write/printf/closeandaxil_authnow reject descriptors outside[0, FD_SETSIZE).
[v1.1.0] - 2026-04-18
- Breaking:
ndc_handler_treturn type changed fromvoidtoint. - Breaking:
on_ndc_initXY hook removed. - Breaking: XY hooks
on_ndc_vim,on_ndc_command,on_ndc_connect,on_ndc_disconnect:fdparameter type changed frominttosocket_t. - Breaking:
DF_RESERVED = 64renamed toDF_TUNNEL = 64. - Breaking:
ndc_header(fd, key, value)renamed tondc_header_set(fd, key, value). - Breaking:
ndc_head(fd, code)andndc_body(fd, body)replaced byndc_respond(fd, code, body). PassingNULLbody sends only the status line and headers, leaving the connection open for streaming. - Breaking:
do_shremoved from exportedndc_cb_tsymbols. - Breaking:
ndc_pty()removed from public API. - New:
ndc_ws_upstream_ttypedef andndc_ws_handler()for registering WebSocket tunnel handlers. - New:
ndc_ws_upgrade(),ndc_ws_write(),ndc_ws_read(),ndc_ws_close(),ndc_ws_printf()โ WebSocket I/O API. - New:
ndc_header_get(fd, key, buf, buf_len)โ read an incoming request header by name. - New:
ndc_query_parse(body)/ndc_query_param(name, buf, buf_len)โ URL-encoded form body parsing. - New:
ndc_respond(fd, code, body)โ send HTTP status, accumulated headers, and optional body. - New:
ndc_sendfile(fd, path)โ serve a static file with auto-detected MIME type. - New:
ndc_status_text(code)โ get HTTP status text for a code. - New:
ndc_config.max_body_sizefield (0 = default 10 MB); configurable via-BCLI flag. - New:
AXIL_AUTOAUTH = 32server flag โ auto-authenticate all WebSocket connections (dev/testing only). - New:
DF_EXTERN = 512,DF_WS_WAITING = 128,DF_WS_PROXY_PENDING = 256descriptor flags. - New weak hooks:
ndc_fd_tick(fd),ndc_parse(fd, input, nread). - New XY hooks:
on_ndc_tick,on_ndc_parse. - New (POSIX-only):
ndc_fd_watch(),ndc_fd_unwatch(),ndc_fork_child_reset(),ndc_get_pw(),ndc_send_telnet_cmd()/TELNET_CMD()macro. - New:
ndc_clear_active(). - New:
ndc_register_handler()now supports:parampath patterns (e.g./items/:id), exposing matched segments asPATTERN_PARAM_<NAME>environment variables. - Breaking: Public headers moved to
ttypt/subdirectory (e.g.#include <ttypt/axil.h>). - New: Plugin modules can declare dependencies via
xy_deps[]for the libxylem loader.