
Research
/Security News
Shai Hulud Strikes Again (v2)
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.
@xiaobaidadada/node-tuntap2-wintun
Advanced tools
The fork supporting WinTun for node-tuntap2.
a opensource, asynchronized, napi-based, business friendly tuntap device driver addon for nodejs.
npm install @xiaobaidadada/node-tuntap2-wintun
// widnwos Only one adapter is currently supported
const {Wintun} = require("@xiaobaidadada/node-tuntap2-wintun")
const p2 = Wintun.get_wintun_dll_path(); // dll downloaded from https://www.wintun.net/
Wintun.set_dll_path(p2);
Wintun.init();
Wintun.set_ipv4("tuntap2","10.6.7.7",24);
Wintun.on_data((buf)=>{
// č§Łć IP 头é¨
const version = buf[0] >> 4;
const headerLength = (buf[0] & 0x0f) * 4;
const protocol = buf[9];
if (version !== 4) {
console.log('not ipv4');
return;
}
const sourceIP = buf.slice(12, 16).join('.');
const destIP = buf.slice(16, 20).join('.');
console.log(`Source IP: ${sourceIP}`);
console.log(`Destination IP: ${destIP}`);
});
// Wintun.send_data(buffer);
// linux
const {Tun, Tap} = require('@xiaobaidadada/node-tuntap2-wintun');
try {
const tun = new Tun();
tun.mtu = 1400;
tun.ipv4 = '10.0.0.100/24';
tun.ipv6 = 'abcd:1:2:3::/64';
tun.on('data', (buf) => {
console.log('received:', buf);
})
tun.isUp = true;
console.log(`created tun: ${tun.name}, ip: ${tun.ipv4}, ${tun.ipv6}, mtu: ${tun.mtu}`);
tun.release();
}
catch(e) {
console.log('error: ', e);
process.exit(0);
}
Note: windows requires wintun.dll If you do not trust this project Wintun.get_wintun_dll_path() provided dll can be downloaded to https://www.wintun.net/
FAQs
create tun in linux or windows
We found that @xiaobaidadada/node-tuntap2-wintun demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Another wave of Shai-Hulud campaign has hit npm with more than 500 packages and 700+ versions affected.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.