Bjorn Stromberg
50ab830a75
Stop receiving data after cancel
2019-05-28 23:14:41 +09:00
Jimmy Wärting
4539a41dad
modernize test files
2018-08-28 19:34:08 +02:00
Jimmy Wärting
f84070f89a
modernize index.js
2018-08-28 11:41:44 +02:00
Feross Aboukhadijeh
aa3f1459de
remove safe-buffer
2018-07-26 21:26:04 -07:00
Feross Aboukhadijeh
9a1ddf367d
add missing requires
2016-05-30 01:42:05 -07:00
Feross Aboukhadijeh
9e9c187bf3
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-30 00:56:47 -07:00
Feross Aboukhadijeh
934517cfe6
standard
2016-04-24 01:03:02 -07:00
Feross Aboukhadijeh
0734f4b4e0
add debug log
2016-02-09 22:09:48 -08:00
Feross Aboukhadijeh
32f5c04b00
standard
2015-12-02 18:17:31 -08:00
Feross Aboukhadijeh
f77090a35c
Changes for bittorrent-protocol@2
2015-12-02 18:17:15 -08:00
Feross Aboukhadijeh
633f2ad531
use simple-sha1
2015-01-04 21:54:47 -08:00
Feross Aboukhadijeh
cc6c738538
update comment for clarity
2014-12-17 22:17:08 -08:00
Feross Aboukhadijeh
19c4543e44
use git-sha1 (for smaller bundle size)
2014-09-15 09:10:50 -07:00
Feross Aboukhadijeh
9c7f5da432
ignore peers who report maliciously large metadata
2014-08-17 03:06:45 -07:00
Feross Aboukhadijeh
30b5380ce3
remove rusha dep
2014-07-02 15:23:48 -07:00
Feross Aboukhadijeh
b1e28a04a5
bncode -> bencode
2014-06-11 17:56:20 -07:00
Feross Aboukhadijeh
b55e0c306c
support IE
2014-06-03 23:43:05 -07:00
Feross Aboukhadijeh
7b4a888157
setMetadata handles info dict or full torrent dict
2014-06-03 23:11:04 -07:00
Feross Aboukhadijeh
47237ba54a
expose `setMetadata` method
2014-06-03 21:17:25 -07:00
Feross Aboukhadijeh
9562a84c5a
send reject message when we don't have piece
2014-06-03 21:17:16 -07:00
fisch0920
6857b65d0b
Merge remote-tracking branch 'upstream/master'
2014-05-15 06:31:58 -04:00
fisch0920
677e4522ea
bugfix for issue where peer may not have any extensions as advertised
2014-05-15 06:31:42 -04:00
Feross Aboukhadijeh
82a02fd81a
throw exception when metadata is bad
2014-05-11 14:23:19 -07:00
fisch0920
bc3d1ea668
fixed buggy metadata vs metadata.info
2014-05-09 07:11:14 -04:00
Feross Aboukhadijeh
2b60a6bde6
simplify metadata done check
2014-05-07 12:09:39 -07:00
fisch0920
4f002d7a76
fixed issue where ut_metadata thought it should have the whole torrent metadata whereas it actually only has the info dictionary part of the metadata
2014-05-07 02:00:17 -04:00
Feross Aboukhadijeh
57b57522bb
style
2014-04-23 15:38:50 +02:00
Feross Aboukhadijeh
05abd138cd
reduce max bitfield size by 100x
2014-04-19 18:26:19 -07:00
Feross Aboukhadijeh
03798c1c0d
no infinite bitfield grow from malicious peers
2014-04-19 18:12:44 -07:00
Feross Aboukhadijeh
c28d792a8a
expect metadata to be a Buffer
2014-03-27 23:36:07 -07:00
Feross Aboukhadijeh
7298e9bde7
get rid of weird spaces
2014-03-22 22:36:12 -07:00
Feross Aboukhadijeh
0dda562ba9
add metadata verification
2014-03-22 22:15:57 -07:00
Feross Aboukhadijeh
f8a6d99ae2
fix bitfield module name
...
os x masked this b/c case insensitive filesystem
2014-03-22 21:44:18 -07:00
Feross Aboukhadijeh
3ab3dd5efd
emit more warnings
2014-03-22 21:10:23 -07:00
Feross Aboukhadijeh
289b7c3e06
dont expose gotMetadata
2014-03-22 21:09:55 -07:00
Feross Aboukhadijeh
bda3920643
working implementation with tests
2014-03-22 20:34:50 -07:00