Policy profiles¶
Summary¶
A policy matches connection metadata and attaches reusable profiles. Profiles change processing after the policy decision; they do not change which policy matches. Keep profiles narrow and name them by behavior, not by environment.
Policy-to-profile flow¶
connection
→ first matching policy
→ action / NAT / routing
→ TLS profile
→ detection profile
→ content profile
→ DNS ALG profile
→ feature list
A missing or unknown referenced profile is reported during configuration load. Check events after every reload.
TLS profiles¶
Minimal interception profile:
tls_profiles = {
inspect_strict = {
inspect = TRUE;
allow_untrusted_issuers = FALSE;
allow_invalid_certs = FALSE;
allow_self_signed = FALSE;
ct_enable = TRUE;
sslkeylog = FALSE;
};
};
Important behavior groups:
| Group | Fields |
|---|---|
| Interception | inspect, no_fallback_bypass |
| Upstream validation | allow_untrusted_issuers, allow_invalid_certs, allow_self_signed |
| Browser warning/override | failed_certcheck_replacement, failed_certcheck_override, timeout and timeout type |
| Key exchange/reuse | use_pfs, left_use_pfs, right_use_pfs, left_disable_reuse, right_disable_reuse |
| Revocation | ocsp_mode, ocsp_stapling, ocsp_stapling_mode |
| CT and ALPN | ct_enable, alpn_block |
| Custom certificates | SNI/IP lookup switches and searched-only mode |
| SNI bypass | bypass list plus DNS-cache/domain-tree lookup switches |
| Observability | sslkeylog, TLS-alert suppression controls |
ocsp_mode values are 0 disabled, 1 end certificate and 2 full chain. Stapling mode is independent: loose, strict or required according to the selected value in the running schema.
Allowing invalid, self-signed or untrusted upstream certificates weakens the proxy's verification role. Use a dedicated policy/profile for a specific target rather than changing the default profile.
Content profiles¶
content_profiles = {
metadata_only = {
write_payload = FALSE;
ja4_tls_ch = TRUE;
ja4_tls_sh = TRUE;
ja4_http = TRUE;
webhook_enable = FALSE;
};
};
Content profiles control:
- capture enablement, format and per-direction limits;
- JA4/JA4S/JA4H collection;
- synchronous content webhooks;
- regex-based content replacement rules;
- optional session filtering for rules.
Content rules contain match, replace, optional fill_length and optional replace_each_nth. They operate on proxied application buffers, not a reconstructed full file. Regexes can cross neither arbitrary buffer boundaries nor protocol encryption that was not intercepted. Test rules with fragmented input.
webhook_lock_traffic serializes synchronous content processing and can amplify receiver latency. Leave it off unless ordering requirements justify the throughput impact.
Detection profiles¶
Detection profiles select whether signature and application engines run for the connection. Current schema exposes mode, engine enablement and knowledge-base enablement. Supported mode values and their exact read/peek timing are build-specific; use CLI completion and shipped defaults rather than importing numeric values from historical documentation.
Diagnostics:
diag sig list
diag proxy session list 7
execute kb print
DNS ALG profiles¶
DNS profiles have three runtime controls:
| Field | Meaning |
|---|---|
match_request_id |
require response transaction ID to match a request |
randomize_id |
replace the transaction ID on the upstream query |
cached_responses |
allow responses from the DNS cache |
See DNS and DoH for packet flow and cache diagnostics.
Features¶
Policy feature tags add behaviors such as traffic sinks, statistics emission and external access requests. Sink features consume one or both directions after capture writers have had an opportunity to record traffic. An access-request feature depends on the webhook receiver and currently fails open on an unusable response; see Webhook payload reference.
Review checklist¶
For each policy, answer explicitly:
- Is TLS intercepted or bypassed?
- Which upstream validation exceptions apply?
- Is payload written or sent externally?
- Which fingerprints and engines run?
- Can an external webhook block, replace or authorize traffic?
- Does routing change address, port or SNI?
If the answer cannot be derived from show config plus the named profile, the configuration is too indirect for reliable operation.