
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
dhcpd.js is a Node.js implementation of a DHCP server. It provides a simple and efficient way to handle DHCP events in your network.
You can install dhcpd.js using npm:
npm install dhcpd.js
const { Server } = require('dhcpd.js');
const s = new Server('192.168.1.1');
s.on("dhcp", (e) => {
console.log(e.packet.debug());
});
s.bind();
const { BOOTMessageType, Server } = require('dhcpd.js');
const s = new Server({
serverId: "192.168.1.1",
gateways: ["192.168.1.1"],
domainServer: ["192.168.1.1"]
});
s.on("listening", () => {
console.log("Server start", s.address);
});
const ips = {};
s.on("discover", (e) => {
const { packet } = e;
console.log(packet.log());
let ip = "0.0.0.0";
if (Object.keys(ips).includes(packet.chaddr)) {
ip = ips[packet.chaddr];
} else {
ip = `192.168.1.${Object.keys(ips).length + 2}`;
}
ips[packet.chaddr] = ip;
const offer = s.createOffer(packet);
offer.yiaddr = ip;
console.log(offer.log());
s.send(offer);
});
s.on("request", (e) => {
const { packet } = e;
console.log(packet.log());
const ack = s.createAck(packet);
ack.yiaddr = ips[packet.chaddr];
console.log(ack.log());
s.send(ack);
});
s.on("release", (e) => {
const { packet } = e;
console.log(packet.log());
delete ips[packet.chaddr];
});
s.bind();
For more information about DHCP, you can refer to the following RFCs:
FAQs
NodeJS implementation of a DHCP server
The npm package dhcpd.js receives a total of 14 weekly downloads. As such, dhcpd.js popularity was classified as not popular.
We found that dhcpd.js demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.