Huge News!Announcing our $40M Series B led by Abstract Ventures.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 8.0.2 to 8.0.3

2

package.json
{
"name": "bittorrent-relay",
"description": "Uses the mainline dht to relay requests to other trackers in a swarm",
"version": "8.0.2",
"version": "8.0.3",
"bin": {

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

@@ -1034,3 +1034,4 @@ import Debug from 'debug'

peer_id: hex2bin(params.peer_id),
info_hash: hex2bin(params.info_hash)
info_hash: hex2bin(params.info_hash),
public_key: params.public_key
}), peer.socket.onSend)

@@ -1068,3 +1069,4 @@ debug('sent offer to %s from %s', peer.peerId, params.peer_id)

peer_id: hex2bin(params.peer_id),
info_hash: hex2bin(params.info_hash)
info_hash: hex2bin(params.info_hash),
public_key: params.public_key
}), toPeer.socket.onSend)

@@ -1071,0 +1073,0 @@ debug('sent answer to %s from %s', toPeer.peerId, params.peer_id)

import { bin2hex } from 'uint8-util'
import crypto from 'crypto'

@@ -24,2 +25,8 @@ import common from '../lib/common.js'

if(params.public_key){
if(crypto.createHash('sha1').update(params.public_key).digest('hex') !== params.peer_id){
throw new Error('public_key must be SHA1 hash of peer_id')
}
}
if (params.answer) {

@@ -26,0 +33,0 @@ if (typeof params.to_peer_id !== 'string' || params.to_peer_id.length !== 20) {

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