search

Home  >  Q&A  >  body text

node.js - 如何用nodejs监听ip里面的数据包


想做一个流量监听的桌面应用
想监听本机ip流过的所有数据报
或者只是获取一个进程的数据包也可以
例如:chrome里面的network

PHP中文网PHP中文网2809 days ago739

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 11:38:14

    Native Node does not provide this function, but there is a corresponding module Raw-Socket on NPM

    reply
    0
  • 迷茫

    迷茫2017-04-17 11:38:14

    Nodejs cannot reach such a low level. You said you want it to capture web page data, which is fine.

    You have to implement this through the system API or even lower-level hooks and drivers.

    reply
    0
  • Cancelreply