- Add PacketBufferSize field to api.Config struct - Add DefaultPacketBuffer constant (1000 packets) - Add JA4SENTINEL_PACKET_BUFFER_SIZE environment variable support - Update mergeConfigs to handle PacketBufferSize override - Update main.go to use configurable buffer size with fallback - Update config.yml.example with packet_buffer_size option Allows tuning for high-traffic environments by increasing buffer size via config file or environment variable Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
39 lines
936 B
Plaintext
39 lines
936 B
Plaintext
# Sample configuration file for ja4sentinel
|
|
# Copy to config.yml and adjust as needed
|
|
|
|
core:
|
|
# Network interface to capture traffic from
|
|
interface: eth0
|
|
|
|
# TCP ports to monitor for TLS handshakes
|
|
listen_ports:
|
|
- 443
|
|
- 8443
|
|
|
|
# Optional BPF filter (leave empty for auto-generated filter based on listen_ports)
|
|
bpf_filter: ""
|
|
|
|
# Timeout in seconds for TLS handshake extraction (default: 30)
|
|
flow_timeout_sec: 30
|
|
|
|
# Buffer size for packet channel (default: 1000, increase for high-traffic environments)
|
|
packet_buffer_size: 1000
|
|
|
|
outputs:
|
|
# Output to stdout (JSON lines)
|
|
- type: stdout
|
|
enabled: true
|
|
params: {}
|
|
|
|
# Output to file
|
|
# - type: file
|
|
# enabled: false
|
|
# params:
|
|
# path: /var/log/ja4sentinel/ja4.log
|
|
|
|
# Output to UNIX socket (for systemd/journald or other consumers)
|
|
# - type: unix_socket
|
|
# enabled: false
|
|
# params:
|
|
# socket_path: /var/run/ja4sentinel.sock
|