Iridium
Iridium copied to clipboard
Add network packet capture feature
Use windivert to capture packet, make capture data more easy.
Why specifically windivert and not libpcap? Just curious.
I didn't delve into it. but windivert seems have more easy API, and doesn't need install another soft.
Fair enough. Would you be up to add a button to start/stop it (same as the proxy) instead of the config option and running all the time?
Use node-pcap instead seems to be more general.
Like this https://github.com/Escheee/Iridium/blob/222928ffc762a3be99e8532252e0b71690e3b2da/backend/sniffer.js#L483
But you need to add a button to select the captured network card. 😭
Agree on node-pcap as it's not as platform-dependent it seems. I can do the UI stuff if needed, just need the backend to spit out the list of current interfaces to the frontend via websocket on connect.
Have added a start button to UI, and added pcap capture implement(enabled default). now both pcap and windivert mode can work, but windivert mode will cause an unexcepted exit when trying to stop the capture, maybe the windivert node-lib has a bug.