bittorrent-protocol
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -10,2 +10,4 @@ module.exports = Wire | ||
var BITFIELD_GROW = 400000 | ||
var MESSAGE_PROTOCOL = new Buffer('\u0013BitTorrent protocol') | ||
@@ -40,3 +42,7 @@ var MESSAGE_KEEP_ALIVE = new Buffer([0x00,0x00,0x00,0x00]) | ||
this.peerPieces = new BitField(0) | ||
// The largest torrent that I know of (the Geocities archive) is ~641 GB and has | ||
// ~41,000 pieces. Therefore, cap bitfield to 10x larger (400,000 bits) to support all | ||
// possible torrents but prevent malicious peers from growing bitfield to fill memory. | ||
this.peerPieces = new BitField(0, { grow: BITFIELD_GROW }) | ||
this.peerExtensions = {} | ||
@@ -43,0 +49,0 @@ |
{ | ||
"name": "bittorrent-protocol", | ||
"description": "Simple, robust, BitTorrent peer wire protocol implementation", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"author": { | ||
@@ -14,10 +14,10 @@ "name": "Feross Aboukhadijeh", | ||
"dependencies": { | ||
"bitfield": "^0.2.0", | ||
"bncode": "^0.5.0", | ||
"bitfield": "^1.0.1", | ||
"bncode": "^0.5.3", | ||
"inherits": "^2.0.1", | ||
"speedometer": "^0.1.2", | ||
"extend.js": "0.0.1" | ||
"extend.js": "^0.0.1" | ||
}, | ||
"devDependencies": { | ||
"tape": "2.x" | ||
"tape": "^2.12.3" | ||
}, | ||
@@ -24,0 +24,0 @@ "homepage": "http://webtorrent.io", |
@@ -1,2 +0,2 @@ | ||
# bittorrent-protocol [![build](http://img.shields.io/travis/feross/bittorrent-protocol.svg)](https://travis-ci.org/feross/bittorrent-protocol) [![npm](http://img.shields.io/npm/v/bittorrent-protocol.svg)](https://npmjs.org/package/bittorrent-protocol) [![gittip](http://img.shields.io/gittip/feross.svg)](https://www.gittip.com/feross/) | ||
# bittorrent-protocol [![build](https://img.shields.io/travis/feross/bittorrent-protocol.svg)](https://travis-ci.org/feross/bittorrent-protocol) [![npm](https://img.shields.io/npm/v/bittorrent-protocol.svg)](https://npmjs.org/package/bittorrent-protocol) [![gittip](https://img.shields.io/gittip/feross.svg)](https://www.gittip.com/feross/) | ||
@@ -3,0 +3,0 @@ ### Simple, robust, BitTorrent wire protocol implementation |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34577
755
+ Addedbitfield@1.1.2(transitive)
- Removedbitfield@0.2.0(transitive)
Updatedbitfield@^1.0.1
Updatedbncode@^0.5.3
Updatedextend.js@^0.0.1