shashank17singh/dpi-engine ? reverse-engineered prompt

Reverse engineered prompt

Build me a C++17 tool that can read a PCAP file, inspect the packets, and write out a new filtered PCAP. It should understand Ethernet, IPv4, TCP, and UDP, keep track of connections so it can follow flows correctly, and look at TLS handshakes and HTTP headers to figure out what app or site the traffic belongs to. I want to be able to set simple blocking rules from the command line, like blocking an app, a domain, or a source IP, and have the tool either drop or forward matching traffic.

Please make it work in both a simple single threaded mode and a faster multithreaded mode that can split work across several worker threads without mixing up packets from the same connection. If needed, look up current libpcap and CMake docs online. Also add a small way to generate test PCAPs so I can try it out easily.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab