From 4597530db3e931f6c3bca41251a6c350f89739f6 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Thu, 12 Mar 2026 15:27:52 +0100 Subject: Add --no-network option to disable TCP/HTTPS listeners Allow zenserver to run with only a Unix domain socket for communication by skipping TCP and HTTPS acceptor creation when --no-network is set. Useful for sandboxed builds and security-sensitive environments. Includes CLI option, Lua config binding, validation (requires --unix-socket, forces asio backend), and integration test. Suppresses the misleading frontend link log line when no TCP listener is active. --- src/zenhttp/httpserver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/zenhttp/httpserver.cpp') diff --git a/src/zenhttp/httpserver.cpp b/src/zenhttp/httpserver.cpp index 1a0018908..6ba0ca563 100644 --- a/src/zenhttp/httpserver.cpp +++ b/src/zenhttp/httpserver.cpp @@ -1157,7 +1157,7 @@ CreateHttpServerClass(const std::string_view ServerClass, const HttpServerConfig ZEN_INFO("using asio HTTP server implementation") return CreateHttpAsioServer(AsioConfig { .ThreadCount = Config.ThreadCount, .ForceLoopback = Config.ForceLoopback, .IsDedicatedServer = Config.IsDedicatedServer, - .UnixSocketPath = Config.UnixSocketPath, + .NoNetwork = Config.NoNetwork, .UnixSocketPath = Config.UnixSocketPath, #if ZEN_USE_OPENSSL .HttpsPort = Config.HttpsPort, .CertFile = Config.CertFile, .KeyFile = Config.KeyFile, #endif -- cgit v1.2.3