AristoChen/usb-proxy ? reverse-engineered prompt

Reverse engineered prompt

Build me a USB proxy app that can sit between a USB device and a host computer, so I can forward traffic through it and inspect or change what goes across.

I want it to work on a Raspberry Pi with USB OTG, or with a virtual USB setup if that’s easier for testing. It should let me choose a specific device by vendor and product ID, or just pick the first one it finds. Add a simple way to turn on packet injection rules from a JSON file, so I can modify, ignore, or block control, interrupt, and bulk transfers. If it makes sense, include support for scripted transformations too.

Please make it easy to run from the command line, with a help message and a few useful flags for verbose logging, device selection, and endpoint remapping if the host needs it. Keep the build straightforward and include clear setup notes for the kernel module and dependencies. If you need to check current docs online for raw gadget or libusb details, go ahead.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab