Commit Graph

58 Commits

Author SHA1 Message Date
Feross Aboukhadijeh
5eeb819002 standard 2017-03-20 19:28:34 -07:00
Feross Aboukhadijeh
40202a00b7 BREAKING: change how the filter function works
It's non-standard for a callback function to take a non-error argument
in the first position.

So instead of the filter callback accepting three types of arguments:

cb(true) // allowed
cb(false) // disallowed
cb(new Error('custom message')) // disallowed with custom message

It now accepts two forms:

cb(new Error('custom message')) // disallowed with custom message
cb(null) // allowed
2017-03-01 22:54:40 -08:00
Feross Aboukhadijeh
c4f4f012dd Add fixes and tests for PR #179 2017-01-16 15:43:47 -08:00
vijayanand nandam
cde079c419 fixes documentation in readme for multiscrape api 2017-01-08 16:08:11 +05:30
Nick Frost
410ed96e56 Fix typo 2016-07-05 19:13:30 -07:00
Yoann Ciabaud
d7a651f360 Fixes for PR #155 2016-06-07 10:49:27 +02:00
Philipp Henkel
ce10f2c4dd Fix typo in readme 2016-04-08 22:02:49 +02:00
Feross Aboukhadijeh
2966165a8f BREAKING: Client() takes single opts object now
To use the client, you used to pass in four arguments:

`new Client(peerId, port, parsedTorrent, opts)`

Now, passing in the torrent is no longer required, just the `announce`
and `infoHash` properties. This decouples this package from
`parse-torrent`.

All options get passed in together now:

new Client({
infoHash: '', // hex string or Buffer
peerId: '', // hex string or Buffer
announce: [], // list of tracker server urls
port: 6881 // torrent client port, (in browser, optional)
})

All the normal optional arguments (rtcConfig, wrtc, etc.) can still be
passed in with the rest of these options.

Fixes #118. Fixes #115.

Added ws tests for scrape.
2016-03-31 21:37:51 -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
e336f1a070 test: use webtorrent-fixtures 2016-03-16 12:22:33 -07:00
Feross Aboukhadijeh
00e84cb669 readme 2016-02-29 20:17:51 -08:00
Feross Aboukhadijeh
3485f2275b update documentation for #107 2016-02-29 18:16:08 -08:00
Harsh Vakharia
46a54fe6a3 Update README.md
Fix server's example code
2016-02-12 16:07:22 +05:30
Feross Aboukhadijeh
192bbcbf58 readme: document multi tracker scrape (for #106) 2016-02-10 18:47:05 -08:00
Feross Aboukhadijeh
702a1591a2 badge 2016-01-13 23:35:00 +01:00
Feross Aboukhadijeh
812b794610 badge 2016-01-03 18:41:48 +01:00
Gustavo Rodrigues
d134e983a2 fix wrong property in example 2015-12-18 13:02:52 -02:00
Feross Aboukhadijeh
0037062d07 typo 2015-11-30 22:27:59 -08:00
Feross Aboukhadijeh
da760b08f2 readme 2015-11-21 18:23:45 -08:00
Feross Aboukhadijeh
ffb93ea3e8 swarm 2015-11-21 18:22:48 -08:00
Feross Aboukhadijeh
55fe501d5a update readme 2015-11-21 18:00:55 -08:00
Feross Aboukhadijeh
9db28c2fad massive cleanup 2015-07-29 01:47:09 -07:00
Feross Aboukhadijeh
81c323da2d readme 2015-07-08 10:32:41 -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
687f580ed8 readme 2015-07-04 17:15:07 -07:00
Michael Williams
3167197588 add --ws boolean to command line script 2015-04-09 22:56:33 +12:00
Feross Aboukhadijeh
604880b87b server: support binding to specific hostname
Fixes #68
2015-04-02 11:42:13 +13:00
Feross Aboukhadijeh
d991983f5f readme 2015-03-20 03:02:43 -07:00
Feross Aboukhadijeh
f144cf2423 readme: document command line usage 2015-03-20 03:01:44 -07:00
Feross Aboukhadijeh
bdc7edea70 preserve backwards compatibility 2015-02-19 12:56:09 -08:00
Nick Rafter
de19b61c52 Exposed full http request to filter function for more configurable filtering 2015-02-19 12:01:46 -05:00
Feross Aboukhadijeh
82e6792a6b BREAKING CHANGES
Breaking changes:
- 'listening' event no longer emits with `port` param
- `server.port` property removed (instead, use
`server.http.address().port`)

Added features:
- expose http server as `server.http`
- expose udp server as `server.udp`
- client.destroy() - ungracefully leave the swarm
- server: added `filter` option to black/whitelist torrents

Bugfixes:
- client considers udp tracker errors to be warnings
- emit 'start', 'stop', 'update', etc. AFTER response sent
- fix udp error response action and message being `undefined`

Internal:
- remove `portfinder` dep
- add complete test for `filter` functionality
2015-01-29 14:59:08 -08:00
Sidd Sridharan
55079798c5 white/blacklist implemented (#44) + docs/tests updated 2015-01-29 12:24:17 -08:00
Feross Aboukhadijeh
556f672028 Update README.md 2015-01-25 19:17:51 -08:00
Feross Aboukhadijeh
26c5f43783 update feature list 2015-01-25 19:16:46 -08:00
Feross Aboukhadijeh
1e9195f5b1 badges 2015-01-22 14:28:06 -08:00
Feross Aboukhadijeh
61cfe0afa6 don't emit 'error' for non-fatal errors 2014-08-18 01:40:30 -07:00
Feross Aboukhadijeh
ddbd10e552 readme: fix server example, no params object 2014-07-12 18:41:08 -07:00
Feross Aboukhadijeh
d35807f5a3 emit port with 'listening' event 2014-07-03 20:05:02 -07:00
Feross Aboukhadijeh
4704774265 Update README.md 2014-06-07 15:41:06 -07:00
Feross Aboukhadijeh
15a6f3c715 require('bittorrent-tracker') returns Client 2014-06-07 15:15:00 -07:00
hicom150
f6703254a2 Fix small typos in the readme example 2014-06-06 10:21:01 +02:00
Feross Aboukhadijeh
9c8e3ab62a add udp/http option docs 2014-05-23 18:06:29 -07:00
Feross Aboukhadijeh
0176c3d09b add 'warning' event to docs 2014-05-23 18:05:18 -07:00
Feross Aboukhadijeh
fec4e0dc3d add readme for scrape feature 2014-05-11 17:29:12 -07:00
Feross Aboukhadijeh
44bb19c8c9 readme 2014-04-19 01:38:36 -07:00
Feross Aboukhadijeh
89bc8e8189 badges 2014-04-09 22:15:18 -07:00
Feross Aboukhadijeh
61c386f7bc readme 2014-03-27 21:45:53 -07:00
Feross Aboukhadijeh
4b6a3b8cf9 add feature list to readme 2014-03-27 21:08:20 -07:00