+1
-1
@@ -16,3 +16,3 @@ import { SSBConfig } from './types'; | ||
| private writeBoth; | ||
| private getBroadcastIP; | ||
| private getBroadcastIPs; | ||
| start: () => void; | ||
@@ -19,0 +19,0 @@ stop: () => void; |
+5
-5
@@ -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 @@ }; |
+1
-1
| { | ||
| "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", |
11738
-0.27%