Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hyperswarm

Package Overview
Dependencies
Maintainers
4
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hyperswarm - npm Package Compare versions

Comparing version 4.6.1 to 4.7.0

16

index.js

@@ -25,2 +25,3 @@ const { EventEmitter } = require('events')

seed,
relayThrough,
keyPair = DHT.keyPair(seed),

@@ -40,3 +41,4 @@ maxPeers = MAX_PEERS,

this.server = this.dht.createServer({
firewall: this._handleFirewall.bind(this)
firewall: this._handleFirewall.bind(this),
relayThrough: this._maybeRelayConnection.bind(this)
}, this._handleServerConnection.bind(this))

@@ -50,2 +52,4 @@

this.maxParallel = maxParallel
this.relayThrough = relayThrough || null
this.connecting = 0

@@ -76,2 +80,7 @@ this.connections = new Set()

_maybeRelayConnection () {
if (!this.relayThrough) return null
return this.relayThrough()
}
_enqueue (peerInfo) {

@@ -155,7 +164,10 @@ if (peerInfo.queued) return

const relayThrough = this._maybeRelayConnection()
const conn = this.dht.connect(peerInfo.publicKey, {
relayAddresses: peerInfo.relayAddresses,
keyPair: this.keyPair
keyPair: this.keyPair,
relayThrough
})
this._allConnections.add(conn)
this.connecting++

@@ -162,0 +174,0 @@ this._clientConnections++

4

package.json
{
"name": "hyperswarm",
"version": "4.6.1",
"version": "4.7.0",
"description": "A distributed networking stack for connecting peers",

@@ -12,3 +12,3 @@ "files": [

"events": "^3.3.0",
"hyperdht": "^6.6.0",
"hyperdht": "^6.7.0",
"safety-catch": "^1.0.2",

@@ -15,0 +15,0 @@ "shuffled-priority-queue": "^2.1.0"

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