New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

bittorrent-relay

Package Overview
Dependencies
Maintainers
1
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bittorrent-relay - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

47

index.js

@@ -544,30 +544,31 @@ import Debug from 'debug'

socket.terminate()
}
self.trackers[socket.id] = socket
socket.id = message.id
socket.domain = message.domain
socket.tracker = message.tracker
socket.port = message.port
socket.host = message.host
socket.web = message.web
socket.dht = message.dht
socket.relay = message.web + '/relay'
socket.announce = message.web + '/announce'
for(const messageRelay of message.relays){
if(self.relays.includes(messageRelay)){
if(!socket.relays.includes(messageRelay)){
socket.relays.push(messageRelay)
} else {
self.trackers[socket.id] = socket
socket.id = message.id
socket.domain = message.domain
socket.tracker = message.tracker
socket.port = message.port
socket.host = message.host
socket.web = message.web
socket.dht = message.dht
socket.relay = message.web + '/relay'
socket.announce = message.web + '/announce'
for(const messageRelay of message.relays){
if(self.relays.includes(messageRelay)){
if(!socket.relays.includes(messageRelay)){
socket.relays.push(messageRelay)
}
}
}
}
for(const messageHash of message.hashes){
if(self.hashes.includes(messageHash)){
if(!socket.hashes.includes(messageHash)){
socket.hashes.push(messageHash)
for(const messageHash of message.hashes){
if(self.hashes.includes(messageHash)){
if(!socket.hashes.includes(messageHash)){
socket.hashes.push(messageHash)
}
}
}
if(socket.server){
socket.send(JSON.stringify({id: self.id, tracker: self.tracker, web: self.web, host: self.host, port: self.port, dht: self.dht, domain: self.domain, relays: self.relays, hashes: self.hashes, action: 'session'}))
}
}
if(socket.server){
socket.send(JSON.stringify({id: self.id, tracker: self.tracker, web: self.web, host: self.host, port: self.port, dht: self.dht, domain: self.domain, relays: self.relays, hashes: self.hashes, action: 'session'}))
}
}

@@ -574,0 +575,0 @@ if(message.action === 'web'){

{
"name": "bittorrent-relay",
"description": "Uses the mainline dht to relay requests to other trackers in a swarm",
"version": "4.0.1",
"version": "4.0.2",
"bin": {

@@ -6,0 +6,0 @@ "bittorrent-relay": "./bin/cmd.js"

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