Commit Graph

760 Commits

Author SHA1 Message Date
Feross Aboukhadijeh
04112fb976 5.3.0 2015-07-27 15:20:09 -07:00
Feross Aboukhadijeh
c3abef72ce tracker should not modify opts object, it's passed to all trackers 2015-07-27 15:19:18 -07:00
Feross Aboukhadijeh
53c973b4ae 5.2.1 2015-07-22 16:31:39 -07:00
Feross Aboukhadijeh
c4ee7aae36 fix thrown exception when websocket connection is aborted
alternative to https://github.com/feross/bittorrent-tracker/pull/89
2015-07-22 16:30:52 -07:00
Feross Aboukhadijeh
e6f9989310 5.2.0 2015-07-16 18:34:50 -07:00
Feross Aboukhadijeh
c42335af43 unref timer 2015-07-16 18:33:54 -07:00
Feross Aboukhadijeh
5b79d42dcd client: destroy callback isn't called until after cleanup 2015-07-16 18:33:50 -07:00
Feross Aboukhadijeh
82aea33dfa add server.ws.address() function 2015-07-16 18:31:13 -07:00
Feross Aboukhadijeh
907691b914 jsdoc 2015-07-09 15:39:40 -07:00
Feross Aboukhadijeh
81c323da2d readme 2015-07-08 10:32:41 -07:00
Feross Aboukhadijeh
43a425ee57 5.1.0 2015-07-08 10:14:59 -07:00
Feross Aboukhadijeh
0b75c1ef26 client.destroy takes a callback 2015-07-08 10:14:11 -07:00
Feross Aboukhadijeh
53a8390a74 bn.js@3 2015-07-08 10:14:01 -07:00
Feross Aboukhadijeh
89b3fb3086 support custom filter error messages
In addition to returning a boolean (`true` for allowed, `false` for
disallowed), you can return an `Error` object to disallow and provide a
custom reason.

Fixes #85
2015-07-08 10:13:52 -07:00
Feross Aboukhadijeh
f13accfc42 server: Enable WebSocket server by default 2015-07-08 09:44:00 -07:00
Feross Aboukhadijeh
834bf1db5e server: http reqs 404 when only ws server is used 2015-07-08 09:43:47 -07:00
Feross Aboukhadijeh
0b88a7a552 5.0.1 2015-07-06 17:49:23 -07:00
Feross Aboukhadijeh
b5d8748db4 fix crash on invalid udp tracker response 2015-07-06 17:48:39 -07:00
Feross Aboukhadijeh
7ea2a138d3 cmd: better help 2015-07-06 16:56:36 -07:00
Feross Aboukhadijeh
422db58a4e 5.0.0 2015-07-04 17:15:53 -07:00
Feross Aboukhadijeh
687f580ed8 readme 2015-07-04 17:15:07 -07:00
Feross Aboukhadijeh
bf5b9f289a BREAKING: opts.filter function is async; add createSwarm
- The expected signature for opts.filter is now:

function myFilterFn (infoHash, params, cb) {
  cb(infoHash === 'blah)
}

This allows interfacing with a database and fixes #80.

Also, swarm.getSwarm() is no longer responsible for creating a Swarm
instance, only returning an instance if there is already one. Creating
a swarm happens in swarm.createSwarm(). This change only affects users
who were override swarm.getSwarm().
2015-07-04 17:13:07 -07:00
Feross Aboukhadijeh
37f95b4b54 small cleanup 2015-07-04 17:10:41 -07:00
Feross Aboukhadijeh
3abb687b89 4.5.1 2015-07-02 16:33:51 -07:00
Feross Aboukhadijeh
8532426a87 Use anonymous functions
- allows overriding `onHttpRequest` on the tracker instance, instead of
only on the prototype
- plus, better perf (in theory)
2015-07-02 16:24:03 -07:00
Feross Aboukhadijeh
8d9da24cb5 4.5.0 2015-06-24 01:49:41 -07:00
Feross Aboukhadijeh
67291edfb3 server: emit full params object on server events
Fixes #81
2015-06-24 01:48:59 -07:00
Feross Aboukhadijeh
ac17ed7d24 standard@4 2015-06-24 01:45:24 -07:00
Feross Aboukhadijeh
69c27bf415 4.4.5 2015-06-09 22:32:45 -07:00
Feross Aboukhadijeh
4816796fda throw when listen is called twice in a row 2015-06-09 22:32:04 -07:00
Feross Aboukhadijeh
5be05f2794 Don't return if not listening (in onXXXXRequest)
Fixes #79
2015-06-09 22:25:25 -07:00
Feross Aboukhadijeh
711da3d28e 4.4.4 2015-06-06 13:11:25 -07:00
Feross Aboukhadijeh
96f6fce1ab only return correct peer type from swarm 2015-06-06 13:10:49 -07:00
Feross Aboukhadijeh
ad0cd4edab 4.4.3 2015-05-30 14:28:01 -07:00
Feross Aboukhadijeh
da5036424b fix exception in websocket tracker 2015-05-30 14:20:42 -07:00
Feross Aboukhadijeh
fdb94e98d7 4.4.2 2015-05-29 21:06:34 -07:00
Feross Aboukhadijeh
ae9a99a6dc add node 0.10 support back after PR 2015-05-29 21:05:00 -07:00
Feross Aboukhadijeh
d23565155d Merge branch 'gmbuell-master' 2015-05-29 20:56:59 -07:00
Feross Aboukhadijeh
c862af6af0 Merge branch 'master' of https://github.com/gmbuell/bittorrent-tracker into gmbuell-master 2015-05-29 20:56:50 -07:00
Feross Aboukhadijeh
50c676727c 4.4.1 2015-05-29 14:24:58 -07:00
Feross Aboukhadijeh
8e29227003 emit 'warning' for unsupported tracker protocol 2015-05-29 14:24:28 -07:00
Garret Buell
e5531a315f reuseAddr for dgram.CreateSocket
Creating a udp4 and udp6 socket on the same port can result in "ERROR: bind EADDRINUSE". Passing reuseAddr: true fixes this.
2015-05-29 10:43:35 -07:00
Feross Aboukhadijeh
68f0d7e46d 4.4.0 2015-05-27 17:50:44 -07:00
Feross Aboukhadijeh
0f4c0ab74d parse-torrent@5 2015-05-27 17:50:12 -07:00
Feross Aboukhadijeh
59052cba0c magnet-uri@5 2015-05-27 17:50:05 -07:00
Feross Aboukhadijeh
ac2c3d06d8 client: Re-use WebSocket connections
Use a socket pool, so tracker clients share WebSocket objects for the
same server.

In practice, WebSockets are pretty slow to establish, so this gives a
nice performance boost, and saves browser resources.
2015-05-27 13:09:15 +02:00
Feross Aboukhadijeh
340b3faff2 server: always send binary ids 2015-05-27 12:59:12 +02:00
Feross Aboukhadijeh
749cee1465 server command line: log peer_id for web peers 2015-05-27 12:58:50 +02:00
Feross Aboukhadijeh
31db779337 4.3.7 2015-05-24 16:44:13 +02:00
Feross Aboukhadijeh
e4d413d83b fix regression: convert buffer to string 2015-05-24 16:43:30 +02:00