Hasty Briefsbeta

CLI tool to convert OpenBSD Packet Filter config files to JSON and vice versa

3 days ago
  • #OpenBSD
  • #JSON
  • #CLI
  • CLI tool for bidirectional conversion between OpenBSD Packet Filter (pf.conf) and JSON formats.
  • Preserves comments, formatting, and includes checksum verification (SHA256, SHA512) for data integrity.
  • Features file metadata tracking, overwrite protection, stdin/stdout support, and syntax validation.
  • Supports full parsing of pf.conf elements: macros, tables, filter rules, NAT/RDR rules, scrub rules, options, and comments.
  • Includes compile instructions, usage examples, and command-line options for encoding, decoding, and validation.
  • Provides structured JSON output with metadata for automation and scripting, including error handling and checksum verification.
  • Example scenarios demonstrate conversion, syntax checking, dry-run mode, and integration with tools like jq.