Commit Graph

132 Commits

Author SHA1 Message Date
Feross Aboukhadijeh
f2786cde96 Fixes for PR #170 2016-08-09 21:39:30 -07:00
Alex
ebf117242c Check if peer is undefined 2016-08-09 13:30:40 +02:00
Yoann Ciabaud
f76b27c12a Merge pull request #160 from yciabaud/lru-pruning
Limit peers in tracker server with LRU based cache fixes #4
2016-07-19 19:50:25 +02:00
Yoann Ciabaud
2ac65725a1 Merge pull request #158 from yciabaud/stats-clients
Add stats on clients based on peerIds
2016-06-23 15:08:23 +02:00
Yoann Ciabaud
29fcf30cb4 Use correct HTTP header to work with JSON on GET 2016-06-13 00:34:26 +02:00
Yoann Ciabaud
d51a77b028 Update lru package to 3.0.0 and set peersCacheLength to 1K as default 2016-06-10 10:00:19 +02:00
Yoann Ciabaud
ca522c0c4b Prune old peers in server with lru based cache. Issue #4 2016-06-08 23:57:01 +02:00
Yoann Ciabaud
f8c7de5213 Add stats on clients based on peerIds 2016-06-07 14:34:38 +02:00
Yoann Ciabaud
d7a651f360 Fixes for PR #155 2016-06-07 10:49:27 +02:00
jakefb
7906848037 Add json to tracker stats 2016-06-02 14:27:14 +12:00
Feross Aboukhadijeh
2959c2cea6 Use safe-buffer
Use the new Buffer APIs from Node v6 for added security. For example,
`Buffer.from()` will throw if passed a number, unlike `Buffer()` which
allocated UNINITIALIZED memory in that case.

Use the `safe-buffer` package for compatibility with previous versions
of
Node.js, including v4.x, v0.12, and v0.10.

https://github.com/feross/safe-buffer
2016-05-29 23:12:23 -07:00
Feross Aboukhadijeh
fafbb25367 Fix "Error: listener must be a function"
The websocket can error and close before the "connection" event has
fired. In that situation, socket.onMessageBound, etc. will be undefined.

Closes #148
2016-04-22 16:34:41 -07:00
Feross Aboukhadijeh
3cd84411fb Fixes for PR #142 2016-03-30 00:31:51 -07:00
Diego Rodríguez
035994ccea Web-based tracker statistics 2016-03-29 19:03:24 -03:00
Feross Aboukhadijeh
c92b1714db Remove all Function.bind calls
For https://github.com/feross/webtorrent-desktop/issues/256
2016-03-28 23:38:23 -07:00
Feross Aboukhadijeh
721a7bea7c make server and client always send { action: 'announce' } 2016-03-23 22:04:07 -07:00
Feross Aboukhadijeh
14ef5dc4b0 ensure that params.offers is type Array 2016-03-18 22:49:13 -07:00
Feross Aboukhadijeh
efb81c29cc fix: cleanup websocket connections
Removed by accident here:
https://github.com/feross/bittorrent-tracker/commit/d079171044e0c1f84f9e
431b110358ad1ff2b20f#diff-78c12f5adc1848d13b1c6f07055d996eL602
2016-03-18 22:48:59 -07:00
Feross Aboukhadijeh
4902a99260 ws server: ignore all future socket errors after socket close 2016-03-18 22:35:01 -07:00
Feross Aboukhadijeh
5020b538ce fix: announces only have one info_hash 2016-03-18 15:57:18 -07:00
Feross Aboukhadijeh
36a4c2208a null out bound functions 2016-03-18 15:55:12 -07:00
Feross Aboukhadijeh
bd92a827e1 fix: reference error 2016-03-18 15:55:07 -07:00
Feross Aboukhadijeh
0740f92d7c server: more thorough socket cleanup 2016-03-18 15:06:05 -07:00
Feross Aboukhadijeh
5ee3f22e2b Fixes for PR #134 2016-03-18 15:02:12 -07:00
Diego Rodríguez Baquero
5138d5c5a9 Standard fix 2016-03-17 16:52:48 -03:00
Diego Rodríguez Baquero
f70d0d2f07 Fix #113 2016-03-17 16:49:27 -03:00
Feross Aboukhadijeh
d079171044 Fixes for PR #129 2016-03-16 17:58:47 -07:00
Yoann Ciabaud
35e6eeaef2 Close the websocket only when no one is using it 2016-03-16 17:33:06 -07:00
Feross Aboukhadijeh
7a7ed575e1 check for params.offers to determine if offers were received 2016-03-15 20:06:53 -07:00
Feross Aboukhadijeh
ba4a52d2d1 Fixes for PR #125 2016-03-15 20:06:39 -07:00
Yoann Ciabaud
39507bf8be Scrape implementation for websocket. Issue #116 2016-03-14 00:36:51 +01:00
Yoann Ciabaud
60f03b9529 Provide IP and HTTP headers in both HTTP and Websocket server 2016-03-03 11:10:54 +01:00
Alex
4142e8cf20 Remove info_hash from failure reason 2016-03-01 19:22:31 +01:00
Feross Aboukhadijeh
5dcdf9c4c1 ws tracker: don't crash with filter function 2016-02-29 17:35:04 -08:00
Feross Aboukhadijeh
0150982b9e :: is already the default for node's http 2016-02-23 12:51:28 -08:00
Feross Aboukhadijeh
b5096e91c3 Support async createSwarm() and getSwarm()
Fix #95.

Make server.getSwarm() and server.createSwarm() into async functions
that take a callback.
2016-01-03 19:50:23 +01:00
Feross Aboukhadijeh
b5de10156d http server: fix bug in how peer ids are returned 2016-01-02 23:36:10 +01:00
Feross Aboukhadijeh
4816eb7a41 send 404 response when req headers are not sent 2015-12-17 00:41:07 +13:00
Feross Aboukhadijeh
5953841466 allow user to intercept 'request' event for http tracker 2015-12-17 00:40:46 +13:00
Feross Aboukhadijeh
714e876777 Give user chance to specify their own default http request handler 2015-12-16 12:37:53 +13:00
Feross Aboukhadijeh
c0555f4e1d style 2015-12-16 12:19:44 +13:00
Feross Aboukhadijeh
f56ca3031b WebSocket tracker should have a shorter interval – default: 2 minutes 2015-12-05 00:18:52 -08:00
Feross Aboukhadijeh
b4ec6fcbc4 fix huge websocket tracker interval 2015-12-05 00:02:57 -08:00
Feross Aboukhadijeh
d29367a4a0 if server.close() is called, end http response object 2015-08-24 00:11:21 +02:00
Linus Unnebäck
4ef0426b90 adhere to padded-blocks 2015-08-14 22:31:22 +02:00
Feross Aboukhadijeh
6935841d56 better debug log 2015-07-29 05:19:57 -07:00
Feross Aboukhadijeh
9db28c2fad massive cleanup 2015-07-29 01:47:09 -07:00
Feross Aboukhadijeh
3746c05d79 restructure folders 2015-07-29 00:26:44 -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
82aea33dfa add server.ws.address() function 2015-07-16 18:31:13 -07:00