Mirror: Best-effort discovery of the machine's local network using just Node.js dgram sockets

Patch logs

Changed files
+1 -2
src
+1 -1
package.json
···
{
"name": "lan-network",
-
"version": "0.1.3",
"description": "Best-effort discovery of the machine's default gateway and local network IP exclusively with UDP sockets.",
"author": "Phil Pluckthun <phil@kitten.sh>",
"source": "./src/index.ts",
···
{
"name": "lan-network",
+
"version": "0.1.4",
"description": "Best-effort discovery of the machine's default gateway and local network IP exclusively with UDP sockets.",
"author": "Phil Pluckthun <phil@kitten.sh>",
"source": "./src/index.ts",
-1
src/cli.ts
···
return dhcpDiscover(assignment);
})
);
-
console.log(discoveries);
let assignment: GatewayAssignment | null = null;
for (const discovery of discoveries) {
// The first discovered gateway is returned, if it matches an assignment
···
return dhcpDiscover(assignment);
})
);
let assignment: GatewayAssignment | null = null;
for (const discovery of discoveries) {
// The first discovered gateway is returned, if it matches an assignment