<commit_before># Listen on TCP.
$ModLoad imtcp

# Server side SSL.
$DefaultNetstreamDriver gtls

# Self-signed, CA == Cert.
$DefaultNetstreamDriverCAFile <%= @cert_file %>
$DefaultNetstreamDriverCertFile <%= @cert_file %>
$DefaultNetstreamDriverKeyFile <%= @key_file %>

# Verify server, not client.
$InputTCPServerStreamDriverMode 1
$InputTCPServerStreamDriverAuthMode anon

# Temporarily disable message de-dupe.
$RepeatedMsgReduction off

# Switch to remote ruleset
$RuleSet cdn

# Record raw message content without leading space.
$template NoFormat,"%msg:2:$:%\n"

# Use the same max-line-length as Fastly
$MaxMessageSize 16k

# Log everything from this source.
*.* -<%= @log_dir -%>/bouncer_and_redirector.log;NoFormat

# Switch back to default ruleset
$RuleSet RSYSLOG_DefaultRuleset

$InputTCPServerBindRuleset cdn
$InputTCPServerRun <%= @port %>

# Restore message de-dupe.
$RepeatedMsgReduction on
<commit_msg>MaxMessageSize must come before net declaration<commit_after># Use the same max-line-length as Fastly
$MaxMessageSize 16k

# Listen on TCP.
$ModLoad imtcp

# Server side SSL.
$DefaultNetstreamDriver gtls

# Self-signed, CA == Cert.
$DefaultNetstreamDriverCAFile <%= @cert_file %>
$DefaultNetstreamDriverCertFile <%= @cert_file %>
$DefaultNetstreamDriverKeyFile <%= @key_file %>

# Verify server, not client.
$InputTCPServerStreamDriverMode 1
$InputTCPServerStreamDriverAuthMode anon

# Temporarily disable message de-dupe.
$RepeatedMsgReduction off

# Switch to remote ruleset
$RuleSet cdn

# Record raw message content without leading space.
$template NoFormat,"%msg:2:$:%\n"

# Log everything from this source.
*.* -<%= @log_dir -%>/bouncer_and_redirector.log;NoFormat

# Switch back to default ruleset
$RuleSet RSYSLOG_DefaultRuleset

$InputTCPServerBindRuleset cdn
$InputTCPServerRun <%= @port %>

# Restore message de-dupe.
$RepeatedMsgReduction on

{'fraction_non_alphanumeric': 0.10032017075773746, 'fraction_numerical': 0.004268943436499467, 'mean_word_length': 5.996268656716418, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5526585', 'n_tokens_mistral': 630, 'n_tokens_neox': 603, 'n_words': 165}