🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

ssb-lan

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssb-lan - npm Package Compare versions

Comparing version
1.2.0
to
1.2.1
+1
-1
lib/index.d.ts

@@ -16,3 +16,3 @@ import { SSBConfig } from './types';

private writeBoth;
private getBroadcastIP;
private getBroadcastIPs;
start: () => void;

@@ -19,0 +19,0 @@ stop: () => void;

@@ -61,4 +61,3 @@ "use strict";

var _a, _b;
const broadcastIP = this.getBroadcastIP();
const destinations = [broadcastIP, '255.255.255.255'].filter((x) => !!x);
const destinations = this.getBroadcastIPs();
try {

@@ -130,7 +129,8 @@ this.normalBroadcast = broadcast(NORMAL_PORT, true, destinations);

}
getBroadcastIP() {
getBroadcastIPs() {
const details = nonPrivateIP(null, IP.isPrivate, true);
if (!details)
return undefined;
return IP.subnet(details.address, details.netmask).broadcastAddress;
return ['255.255.255.255'];
const { broadcastAddress } = IP.subnet(details.address, details.netmask);
return [broadcastAddress];
}

@@ -137,0 +137,0 @@ };

{
"name": "ssb-lan",
"description": "SSB plugin for discovery of other peers in the same LAN",
"version": "1.2.0",
"version": "1.2.1",
"homepage": "https://github.com/staltz/ssb-lan",

@@ -6,0 +6,0 @@ "main": "lib/index.js",