Commit Graph

21 Commits

Author SHA1 Message Date
Feross Aboukhadijeh
55eda0ed93 Run all tests 2016-08-05 18:41:25 -07:00
Feross Aboukhadijeh
59bba81c5a Fix Client.scrape returns no error on invalid URL
Fix #167.
2016-08-05 18:23:43 -07: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
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
e336f1a070 test: use webtorrent-fixtures 2016-03-16 12:22:33 -07:00
Feross Aboukhadijeh
4207d80f28 test/scrape: use common.createServer 2016-02-29 17:55:31 -08:00
Feross Aboukhadijeh
1e919c44cb changes for simple-get 2.0.0 2016-02-14 00:31:44 -08:00
Feross Aboukhadijeh
87d3189420 standard 6 prep 2016-02-05 14:08:46 -08:00
Feross Aboukhadijeh
38a80093a1 Fix UDP scrape returning invalid info hashes (Fix #97) 2015-12-02 15:35:42 -08:00
Feross Aboukhadijeh
9db28c2fad massive cleanup 2015-07-29 01:47:09 -07:00
Feross Aboukhadijeh
f285c9dd3c client.stop() no longer calls client.destroy()
You must call client.destroy() manually to clean up resources
2015-05-16 23:24:20 -07:00
Feross Aboukhadijeh
1cc5a511bd udp server: support multiple info_hash scrape
Fixes #33
2015-05-01 17:36:07 -07: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
ebb86f728f JavaScript Standard Style
https://github.com/feross/standard
2015-01-26 18:16:01 -08:00
Feross Aboukhadijeh
94feea69e2 Support http tracker redirects, gzip/deflate 2015-01-22 14:23:53 -08:00
Feross Aboukhadijeh
32b622aa51 cleanup tests 2014-11-26 20:18:56 +08:00
Feross Aboukhadijeh
e6de7a2f54 add tests for scraping a udp tracker (fix #34) 2014-07-21 22:58:13 -07:00
Feross Aboukhadijeh
be875c40af Fix serious client+server encoding error (fix #32) 2014-07-12 18:44:41 -07:00
Feross Aboukhadijeh
b4928f001a Server perf: Use binary info_hash strings (fix #29) 2014-07-10 22:05:56 -07:00
Feross Aboukhadijeh
539f1bf65d add single scrape, multi scrape, all scrape tests 2014-07-10 21:30:30 -07:00