Socket
Socket
Sign inDemoInstall

dht-rpc

Package Overview
Dependencies
Maintainers
0
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dht-rpc - npm Package Compare versions

Comparing version 6.13.0 to 6.14.0

34

index.js

@@ -664,14 +664,30 @@ const { EventEmitter } = require('events')

async * _resolveBootstrapNodes () {
for (const node of this.bootstrapNodes) {
let address
try {
address = await this.udx.lookup(node.host, { family: 4 })
} catch {
continue
for (let { host, port } of this.bootstrapNodes) {
let doLookup = false
if (host.indexOf('@') === -1) {
doLookup = true
} else {
const [suggestedIP, fallbackHost] = host.split('@')
try {
await this.ping({ host: suggestedIP, port })
host = suggestedIP
} catch {
host = fallbackHost
doLookup = true
}
}
if (doLookup) {
try {
host = UDX.isIPv4(host) ? host : (await this.udx.lookup(host, { family: 4 })).host
} catch {
continue
}
}
yield {
id: peer.id(address.host, node.port),
host: address.host,
port: node.port
id: peer.id(host, port),
host,
port
}

@@ -678,0 +694,0 @@ }

{
"name": "dht-rpc",
"version": "6.13.0",
"version": "6.14.0",
"description": "Make RPC calls over a Kademlia based DHT",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -113,3 +113,3 @@ # dht-rpc

{
// A list of bootstrap nodes
// A list of bootstrap nodes. Optionally prefix a suggested-IP, i.e. '192.168.1.10@bootstrap-node.com:24242'
bootstrap: [ 'bootstrap-node.com:24242', ... ],

@@ -116,0 +116,0 @@ // Optionally pass in array of { host, port } to add to the routing table if you know any peers

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc