Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: webtorrent/bittorrent-tracker
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v9.7.0
Choose a base ref
...
head repository: webtorrent/bittorrent-tracker
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v9.7.1
Choose a head ref
  • 6 commits
  • 4 files changed
  • 4 contributors

Commits on Mar 21, 2018

  1. Replace new Buffer with Buffer.from

    Code is already using safe-buffer, just replace the constructor API
    jasnell authored Mar 21, 2018
    Copy the full SHA
    fcf28cb View commit details

Commits on Mar 22, 2018

  1. Merge pull request #267 from jasnell/patch-1

    Replace new Buffer with Buffer.from
    DiegoRBaquero authored Mar 22, 2018
    Copy the full SHA
    6ce0d51 View commit details

Commits on Mar 27, 2018

  1. add missing comma

    crapthings authored Mar 27, 2018
    Copy the full SHA
    194b62a View commit details
  2. Merge pull request #268 from crapthings/patch-1

    add missing comma
    DiegoRBaquero authored Mar 27, 2018
    Copy the full SHA
    e782ff3 View commit details

Commits on Apr 21, 2018

  1. Ensure infoHash is lowercase

    feross committed Apr 21, 2018
    Copy the full SHA
    3ec7aac View commit details
  2. 9.7.1

    feross committed Apr 21, 2018
    Copy the full SHA
    e2ad747 View commit details
Showing with 4 additions and 4 deletions.
  1. +1 −1 README.md
  2. +1 −1 client.js
  3. +1 −1 package.json
  4. +1 −1 server.js
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ var optionalOpts = {
left: 0,
customParam: 'blah' // custom parameters supported
}
}
},
// RTCPeerConnection config object (only used in browser)
rtcConfig: {},
// User-Agent header for http requests
2 changes: 1 addition & 1 deletion client.js
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@ function Client (opts) {
self._peerIdBinary = self._peerIdBuffer.toString('binary')

self.infoHash = typeof opts.infoHash === 'string'
? opts.infoHash
? opts.infoHash.toLowerCase()
: opts.infoHash.toString('hex')
self._infoHashBuffer = Buffer.from(self.infoHash, 'hex')
self._infoHashBinary = self._infoHashBuffer.toString('binary')
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bittorrent-tracker",
"description": "Simple, robust, BitTorrent tracker (client & server) implementation",
"version": "9.7.0",
"version": "9.7.1",
"author": {
"name": "WebTorrent, LLC",
"email": "feross@webtorrent.io",
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
@@ -174,7 +174,7 @@ function Server (opts) {
}
var client = clients[peer.client.client]
// If the client is not known show 8 chars from peerId as version
var version = peer.client.version || new Buffer(peer.peerId, 'hex').toString().substring(0, 8)
var version = peer.client.version || Buffer.from(peer.peerId, 'hex').toString().substring(0, 8)
if (!client[version]) {
client[version] = 0
}