Skip to content

pcapworker

Purpose

pcapworker is an asynq worker daemon that processes pcap:process tasks — extracting TLS handshakes from PCAP files that users have uploaded through the dashboard (POST /api/upload/pcap) and writing the results to ClickHouse, the same way live capture traffic would be stored. It notifies progress back over Redis pub/sub so the dashboard can show upload processing status.

Usage

pcapworker [-c <config.yaml>] [options]
FlagDefaultDescription
-cPath to config file
-debugEnable debug logging
-concurrency10Number of concurrent workers
-uploadpath/tmpPath where uploaded PCAP files are stored
-ports443Comma-separated list of ports to filter for TLS
-redis-hostlocalhostRedis host
-redis-port6379Redis port
-ch-hostlocalhostClickHouse host
-ch-port9000ClickHouse port
-ch-dbinsightsClickHouse database
-ch-userdefaultClickHouse username
-ch-passClickHouse password

CLI flags override the config file where both are given; the config file is optional and a built-in default config is used if -c is omitted.

Configuration

name: pcapworker
uploadpath: ~/tmp
ports:
  - 443
concurrency: 10
debug: false

redis:
  host: localhost
  port: 6379
  password: ""
  db: 0

clickhouse:
  host: localhost
  port: 19000
  database: insights
  username: insights
  password: "secret"

Example

pcapworker -c configs/pcapworker.yaml -debug