feat: add dlp: false passthrough option for egress routes

Routes with `dlp: false` skip all DLP scanning (including CRLF injection,
which cannot be disabled via `dlp.outbound_detectors: false`) and tunnel
HTTPS connections without TLS interception so the client sees the server's
real certificate. Fixes Docker image pulls, which fail when the proxy MITM's
the TLS handshake and the container doesn't trust the per-bottle CA.

Closes #462
This commit is contained in:
2026-07-22 22:37:43 +00:00
committed by codex
parent 6fea44067f
commit 83aa6768fc
8 changed files with 259 additions and 29 deletions
+20
View File
@@ -173,6 +173,18 @@ class TestRouteValidAccepts(unittest.TestCase):
r = _route({"host": "h", "dlp": {"outbound_detectors": False}})
self.assertEqual((), r.outbound_detectors)
def test_dlp_false_sets_passthrough(self) -> None:
r = _route({"host": "h", "dlp": False})
self.assertTrue(r.dlp_passthrough)
def test_dlp_false_passthrough_default_is_false(self) -> None:
r = _route({"host": "h"})
self.assertFalse(r.dlp_passthrough)
def test_dlp_not_a_dict_or_false_rejected(self) -> None:
with self.assertRaises(ValueError):
_route({"host": "h", "dlp": "no"})
class TestParseConfig(unittest.TestCase):
def test_log_must_be_valid_level(self) -> None:
@@ -221,6 +233,14 @@ class TestRouteToYamlDict(unittest.TestCase):
d["dlp"],
)
def test_dlp_passthrough_serializes_as_false(self) -> None:
d = route_to_yaml_dict(Route(host="h", dlp_passthrough=True))
self.assertIs(False, d["dlp"])
def test_dlp_passthrough_roundtrip(self) -> None:
r = _route({"host": "h", "dlp": False})
self.assertIs(False, route_to_yaml_dict(r)["dlp"])
def test_matches_serialization_omits_defaults(self) -> None:
route = Route(host="h", matches=(MatchEntry(
paths=(