diff options
Diffstat (limited to 'modules/host/egress.lua')
| -rw-r--r-- | modules/host/egress.lua | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/host/egress.lua b/modules/host/egress.lua index c4c92eb..37411df 100644 --- a/modules/host/egress.lua +++ b/modules/host/egress.lua @@ -4,10 +4,11 @@ -- address (which the bridge makes sure of, see default.nix). VMS/TAP has -- the name of the VM's list, RULES/USER/LIST its rules, one per line, both -- read on every connection and request: --- example.com example.com and its subdomains, passed through --- without decrypting --- example.com/foo/ only requests whose path starts with /foo/, --- decrypted to check that +-- https://example.com example.com and its subdomains, passed +-- through without decrypting +-- https://example.com/foo/ only requests whose path starts with /foo/, +-- decrypted to check that +-- (tcp:// and udp:// rules are for nftables, see default.nix.) -- A domain with any whole-domain rule is passed through, whatever path -- rules it has. Everything else gets denied. -- @@ -53,7 +54,7 @@ local function rules(guest, name) local text = f:read(65536) or "" f:close() for line in text:gmatch("[^\n]+") do - local domain, path = line:match("^%s*([^/%s]+)(/?%S*)%s*$") + local domain, path = line:match("^%s*https://([^/%s]+)(/?%S*)%s*$") if valid_name(domain) then if path == "" then domains[domain] = true |
