From 3fe39b989ce4cb17ab2586e6c94bba4f0b1a98da Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 20 Nov 2026 03:23:11 +0000 Subject: fc-egress log: URIs, as rules take them So a log line's destination can be copied into fc-egress allow: HTTPS connections now log https://SERVER, decrypted requests METHOD https://HOST/URI, and fc-egress log adds tcp://DST:PORT (or udp://) after the tap to the kernel's lines for other connections. --- modules/host/egress.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/host/egress.lua') diff --git a/modules/host/egress.lua b/modules/host/egress.lua index 37411df..172805a 100644 --- a/modules/host/egress.lua +++ b/modules/host/egress.lua @@ -102,11 +102,11 @@ function _M.preread() who = who or "- - -" if p == "pass" then ngx.var.egress_upstream = sni:lower() .. ":443" - ngx.var.egress_log = "ALLOW " .. who .. " " .. sni:lower() + ngx.var.egress_log = "ALLOW " .. who .. " https://" .. sni:lower() elseif p then ngx.var.egress_upstream = "unix:" .. RUN .. "/decrypt-" .. guest.tap .. ".sock" else - ngx.var.egress_log = "DENY " .. who .. " " .. (sni ~= "" and sni or "-") + ngx.var.egress_log = "DENY " .. who .. " " .. (sni ~= "" and "https://" .. sni or "-") return ngx.exit(403) end end -- cgit v1.3.1