Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
webtorrent/bittorrent-dht
01BTC10/bittorrent-dht
Aaron1011/bittorrent-dht
Arkotek/bittorrent-dht
AschPlatform/bittorrent-dht
CNXTEoEorg/bittorrent-dht
DINKIN/bittorrent-dht
DalavanCloud/bittorrent-dht
DistributedWeb/dwdht
Dunkel85/bittorrent-dht
EtienneV/bittorrent-dht
FREENERY/bittorrent-dht
HGldJ1966/bittorrent-dht
Ivshti/bittorrent-dht
JacopoDaeli/bittorrent-dht
JeffSpies/bittorrent-dht
Jiago/bittorrent-dht
LFYG/bittorrent-dht
LeeRisk/bittorrent-dht
LoveIsGrief/generic-dht
MONDOWO/bittorrent-dht
MedusaLeee/bittorrent-dht
NANDAWEN/bittorrent-dht
NickMinnellaCS96/bittorrent-dht
Nicotu/bittorrent-dht
No9/bittorrent-dht
OpenSourceInternetV2/bittorrent-dht
RdeWilde/bittorrent-dht
SEVERSAS/bittorrent-dht
SuriyaRaj/bittorrent-dht
Trippnology/bittorrent-dht
VardaIO/varda-dht
WIZARD-CXY/bittorrent-dht
WeBest/bittorrent-dht
Zanadar/bittorrent-dht
aidanharris/bittorrent-dht
akaustel/bittorrent-dht
alawnchen/bittorrent-dht
alevohin/bittorrent-dht
alexanderGugel/bittorrent-dht
alfathdirk/bittorrent-dht
allenday/bittorrent-dht
allouis/bittorrent-dht
amilajack/bittorrent-dht
amissine/bittorrent-dht
anupam0601/bittorrent-dht
arestov/bittorrent-dht
bashkirtsevich/bittorrent-dht
bitfinexcom/bittorrent-dht
break123/bittorrent-dht
charlescharles/bittorrent-dht
cheebo/bittorrent-dht
chr15m/bittorrent-dht
chriscoffee/bittorrent-dht
chyroi/bittorrent-dht
cjb/bittorrent-dht
crazyevent/bittorrent-dht
cybort/bittorrent-dht
d3vgru/bittorrent-dht
davidanjon/bittorrent-dht
dcharbonnier/bittorrent-dht
digital-dojo/bittorrent-dht
dreamfly281/bittorrent-dht
dysenre/bittorrent-dht
emilbayes/bittorrent-dht
erlgo/bittorrent-dht
eugenesavenko/bittorrent-dht
galeksandrp/bittorrent-dht
goofwear/bittorrent-dht
gvsurenderreddy/bittorrent-dht
hackerkid/bittorrent-dht
hakt0r/bittorrent-dht
halprez/bittorrent-dht
hongkongkiwi/bittorrent-dht
huawis/bittorrent-dht
hyuni/bittorrent-dht
iafine/bittorrent-dht
icaas/bittorrent-dht
icebob/bittorrent-dht
im1477/bittorrent-dht
imsnif/bittorrent-dht
iojaeuian/bittorrent-dht
is00hcw/bittorrent-dht
jimmywarting/bittorrent-dht
jordanrancie/bittorrent-dht
joshterrill/bittorrent-dht
jpospychala/bittorrent-dht
kamyu104/bittorrent-dht
khubo/bittorrent-dht
kronicd/bittorrent-dht
kuggaa/bittorrent-dht
kustomzone/bittorrent-dht
kyonetca/bittorrent-dht
ladykiller/bittorrent-dht
larryaubstore/bittorrent-dht
learn-alex/bittorrent-dht
lemonhall/bittorrent-dht
liuqixing/bittorrent-dht
lmatteis/bittorrent-dht
luccascm/bittorrent-dht
mafintosh/bittorrent-dht
maitysubhasis/bittorrent-dht
marcus7777/bittorrent-dht
marmolejo/bittorrent-dht
martinheidegger/bittorrent-dht
mdrnio/bittorrent-dht
mihv/bittorrent-dht
minhnhut0602/bittorrent-dht
mistakia/bittorrent-dht
mmathys/bittorrent-dht
mmpmm/bittorrent-dht
mnaamani/bittorrent-dht
mosaic101/bittorrent-dht
myl142857/bittorrent-dht
nazar-pc/bittorrent-dht
nettan20/generic-dht
nettr/bittorrent-dht
networld-to/bittorrent-dht
neuroradiology/bittorrent-dht
newBird01/bittorrent-dht
nkresge/bittorrent-dht
ofsahin/bittorrent-dht
oleiba/bittorrent-dht
paulkernfeld/bittorrent-dht
peterjerry/bittorrent-dht
phnz/bittorrent-dht
piratesreturn/bittorrent-dht
pldubouilh/bittorrent-dht
prdn/bittorrent-dht
qqueue/bittorrent-dht
rabidaudio/bittorrent-dht
ramosem/bittorrent-dht
rebaser/bittorrent-dht
rectius/bittorrent-dht
rg3l3dr/bittorrent-dht
robertkowalski/bittorrent-dht
rtc-alex/bittorrent-dht
ruzyna/bittorrent-dht
semtle/bittorrent-dht
shangma/bittorrent-dht
shime/bittorrent-dht
simudream/bittorrent-dht
skerit/bittorrent-dht
socjs/bittorrent-dht
sportsbitenews/bittorrent-dht
substack/bittorrent-dht
techtronics/bittorrent-dht
tectronics/bittorrent-dht
teotikalki/bittorrent-dht
thomasyuan/bittorrent-dht
tiger-BeA/bittorrent-dht
timanthynot/bittorrent-dht
tradle/bittorrent-dht
transitive-bullshit/bittorrent-dht
trentlarson/bittorrent-dht
vcvc001/bittorrent-dht
volth/bittorrent-dht
wangrupeng2017/bittorrent-dht
waningese/bittorrent-dht
wasinsandiego/bittorrent-dht
wjianwei126/bittorrent-dht
xaiki/bittorrent-dht
xemasiv/bittorrent-dht
zhanglyni/bittorrent-dht
zhenhappy/bittorrent-dht
zhiqinghuang/bittorrent-dht
zing123com456pho789/bittorrent-dht
Nothing to show
Choose a Head Repository
webtorrent/bittorrent-dht
01BTC10/bittorrent-dht
Aaron1011/bittorrent-dht
Arkotek/bittorrent-dht
AschPlatform/bittorrent-dht
CNXTEoEorg/bittorrent-dht
DINKIN/bittorrent-dht
DalavanCloud/bittorrent-dht
DistributedWeb/dwdht
Dunkel85/bittorrent-dht
EtienneV/bittorrent-dht
FREENERY/bittorrent-dht
HGldJ1966/bittorrent-dht
Ivshti/bittorrent-dht
JacopoDaeli/bittorrent-dht
JeffSpies/bittorrent-dht
Jiago/bittorrent-dht
LFYG/bittorrent-dht
LeeRisk/bittorrent-dht
LoveIsGrief/generic-dht
MONDOWO/bittorrent-dht
MedusaLeee/bittorrent-dht
NANDAWEN/bittorrent-dht
NickMinnellaCS96/bittorrent-dht
Nicotu/bittorrent-dht
No9/bittorrent-dht
OpenSourceInternetV2/bittorrent-dht
RdeWilde/bittorrent-dht
SEVERSAS/bittorrent-dht
SuriyaRaj/bittorrent-dht
Trippnology/bittorrent-dht
VardaIO/varda-dht
WIZARD-CXY/bittorrent-dht
WeBest/bittorrent-dht
Zanadar/bittorrent-dht
aidanharris/bittorrent-dht
akaustel/bittorrent-dht
alawnchen/bittorrent-dht
alevohin/bittorrent-dht
alexanderGugel/bittorrent-dht
alfathdirk/bittorrent-dht
allenday/bittorrent-dht
allouis/bittorrent-dht
amilajack/bittorrent-dht
amissine/bittorrent-dht
anupam0601/bittorrent-dht
arestov/bittorrent-dht
bashkirtsevich/bittorrent-dht
bitfinexcom/bittorrent-dht
break123/bittorrent-dht
charlescharles/bittorrent-dht
cheebo/bittorrent-dht
chr15m/bittorrent-dht
chriscoffee/bittorrent-dht
chyroi/bittorrent-dht
cjb/bittorrent-dht
crazyevent/bittorrent-dht
cybort/bittorrent-dht
d3vgru/bittorrent-dht
davidanjon/bittorrent-dht
dcharbonnier/bittorrent-dht
digital-dojo/bittorrent-dht
dreamfly281/bittorrent-dht
dysenre/bittorrent-dht
emilbayes/bittorrent-dht
erlgo/bittorrent-dht
eugenesavenko/bittorrent-dht
galeksandrp/bittorrent-dht
goofwear/bittorrent-dht
gvsurenderreddy/bittorrent-dht
hackerkid/bittorrent-dht
hakt0r/bittorrent-dht
halprez/bittorrent-dht
hongkongkiwi/bittorrent-dht
huawis/bittorrent-dht
hyuni/bittorrent-dht
iafine/bittorrent-dht
icaas/bittorrent-dht
icebob/bittorrent-dht
im1477/bittorrent-dht
imsnif/bittorrent-dht
iojaeuian/bittorrent-dht
is00hcw/bittorrent-dht
jimmywarting/bittorrent-dht
jordanrancie/bittorrent-dht
joshterrill/bittorrent-dht
jpospychala/bittorrent-dht
kamyu104/bittorrent-dht
khubo/bittorrent-dht
kronicd/bittorrent-dht
kuggaa/bittorrent-dht
kustomzone/bittorrent-dht
kyonetca/bittorrent-dht
ladykiller/bittorrent-dht
larryaubstore/bittorrent-dht
learn-alex/bittorrent-dht
lemonhall/bittorrent-dht
liuqixing/bittorrent-dht
lmatteis/bittorrent-dht
luccascm/bittorrent-dht
mafintosh/bittorrent-dht
maitysubhasis/bittorrent-dht
marcus7777/bittorrent-dht
marmolejo/bittorrent-dht
martinheidegger/bittorrent-dht
mdrnio/bittorrent-dht
mihv/bittorrent-dht
minhnhut0602/bittorrent-dht
mistakia/bittorrent-dht
mmathys/bittorrent-dht
mmpmm/bittorrent-dht
mnaamani/bittorrent-dht
mosaic101/bittorrent-dht
myl142857/bittorrent-dht
nazar-pc/bittorrent-dht
nettan20/generic-dht
nettr/bittorrent-dht
networld-to/bittorrent-dht
neuroradiology/bittorrent-dht
newBird01/bittorrent-dht
nkresge/bittorrent-dht
ofsahin/bittorrent-dht
oleiba/bittorrent-dht
paulkernfeld/bittorrent-dht
peterjerry/bittorrent-dht
phnz/bittorrent-dht
piratesreturn/bittorrent-dht
pldubouilh/bittorrent-dht
prdn/bittorrent-dht
qqueue/bittorrent-dht
rabidaudio/bittorrent-dht
ramosem/bittorrent-dht
rebaser/bittorrent-dht
rectius/bittorrent-dht
rg3l3dr/bittorrent-dht
robertkowalski/bittorrent-dht
rtc-alex/bittorrent-dht
ruzyna/bittorrent-dht
semtle/bittorrent-dht
shangma/bittorrent-dht
shime/bittorrent-dht
simudream/bittorrent-dht
skerit/bittorrent-dht
socjs/bittorrent-dht
sportsbitenews/bittorrent-dht
substack/bittorrent-dht
techtronics/bittorrent-dht
tectronics/bittorrent-dht
teotikalki/bittorrent-dht
thomasyuan/bittorrent-dht
tiger-BeA/bittorrent-dht
timanthynot/bittorrent-dht
tradle/bittorrent-dht
transitive-bullshit/bittorrent-dht
trentlarson/bittorrent-dht
vcvc001/bittorrent-dht
volth/bittorrent-dht
wangrupeng2017/bittorrent-dht
waningese/bittorrent-dht
wasinsandiego/bittorrent-dht
wjianwei126/bittorrent-dht
xaiki/bittorrent-dht
xemasiv/bittorrent-dht
zhanglyni/bittorrent-dht
zhenhappy/bittorrent-dht
zhiqinghuang/bittorrent-dht
zing123com456pho789/bittorrent-dht
Nothing to show
Commits on Jun 16, 2017
Commits on Jun 20, 2017
Commits on Jun 22, 2017
Commits on Jun 23, 2017
Commits on Jul 23, 2017
Commits on Jul 29, 2017
Commits on Sep 28, 2017
Commits on Sep 29, 2017
Merge pull request #174 from webtorrent/greenkeeper/initial
Update dependencies to enable Greenkeeper 🌴
Commits on Nov 09, 2017
Merge pull request #165 from nazar-pc/standalone-sha1-randombytes
Use `jssha` and `randombytes` packages in order to avoid large overhead of `crypto` in browserify build
Merge pull request #163 from nazar-pc/patch-1
Allow specifying custom implementation of k-rpc
travis: drop 0.10 and 0.12 support
k-bucket does not support node 0.10 or node 0.12 anymore because they're using Object.assign()
Merge pull request #170 from nazar-pc/custom-hash-length
Support for hash functions with length other than 20 bytes
Commits on Dec 02, 2017
#20 - check nodes on ping (#172)
* addNode: update lastChange on bucket

* check nodes on ping and remove if broken

* check every minute for outdated bucket

* make timeout configurable

* make k-bucket 3.3.0 adjustments

use sattelite data container (metadata)

* fix on ping event handler
do not cluster periodic pinging (#178)
* do not cluster periodic pinging

* fix clearInterval / clearTimeout (#179)

* 1ms is too little slack
add some cleanup for the ping code (#180)
* add some cleanup

* add ping gc test

* test that there are two nodes

* add test (#181)

* add test

* debug

* debug 2

* clean test

* bump deps
Commits on Dec 18, 2017
add port bounds-check on announce (#183)
* add bad port test

* add port bounds-check
Commits on Jan 10, 2018
peers: handle maxAge option (#186)
* docs: document bucket timeout option

* peers: handle maxAge option

handle option maxAge to remove stale peers from peercache
Commits on Jan 11, 2018
Commits on Jan 29, 2018
Commits on Feb 12, 2018
Fix issue #156 (#158)
* Fix issue #156

Modify DHT.prototype.get to return the value with the greatest sequence number, not the last value retrieved regardless of sequence number

* Add space after if to pass npm test

* Make k-rpc keep searching for mutable items

as pointed out by thomasyuan

* Update client.js
Commits on Feb 13, 2018
Commits on Feb 17, 2018
Merge pull request #189 from chr15m/issue-dht-get-doc
Updated README with dht.get opts parameter details.
Commits on Feb 18, 2018
Commits on Feb 25, 2018
Commits on Feb 26, 2018
Merge pull request #192 from webtorrent/greenkeeper/bencode-2.0.0
Update bencode to the latest version 🚀
Commits on Feb 28, 2018
Commits on Mar 06, 2018
Commits on Mar 08, 2018
Merge pull request #191 from nazar-pc/patch-1
Add support for ArrayBufferView (like Uint8Array) in toBuffer() function
Merge pull request #193 from webtorrent/greenkeeper/k-bucket-4.0.0
Update k-bucket to the latest version 🚀
Commits on Apr 20, 2018
Commits on Apr 21, 2018
Merge pull request #197 from webtorrent/err-to-er
fix error variable in ping retry
Commits on Apr 23, 2018
Commits on May 17, 2018
Commits on May 23, 2018
Merge pull request #195 from chr15m/issue-194-ignore-cache-get-mutabl…
…e-option

Option to ignore locally cached mutable get.
Merge pull request #155 from thomasyuan/master
don't cache mutable value since it could be changed by other peers.
Merge pull request #190 from chr15m/issue-167-comply-with-bep44-salt-…
…spec

Accept spec compliant BEP44 mutable get replies with salt
Commits on Jun 12, 2018
Commits on Aug 02, 2018
Commits on Aug 04, 2018
Merge pull request #202 from emilbayes/patch-1
Document that seq is required for mutable
Commits on Aug 29, 2018
Merge pull request #204 from webtorrent/standard-12
Updates in preparation for standard 12
Merge pull request #207 from jimmywarting/patch-1
node 4 has reached its end of life support in apr
Commits on Aug 30, 2018
Merge pull request #205 from webtorrent/greenkeeper/k-bucket-5.0.0
Update k-bucket to the latest version 🚀
Showing with 682 additions and 160 deletions.
  1. +3 −0 .npmignore
  2. +2 −3 .travis.yml
  3. +8 −1 AUTHORS.md
  4. +16 −8 README.md
  5. +173 −105 client.js
  6. +11 −7 package.json
  7. +101 −3 test/announce.js
  8. +7 −7 test/basic.js
  9. +10 −5 test/dht_store_mutable.js
  10. +7 −2 test/dht_test_vectors.js
  11. +1 −1 test/horde.js
  12. +24 −8 test/internal.js
  13. +65 −1 test/live/bep44.js
  14. +77 −0 test/ping.js
  15. +1 −8 test/to-json.js
  16. +175 −0 test/updated-bucket.js
  17. +1 −1 {bin → tools}/update-authors.sh
View
@@ -0,0 +1,3 @@
.travis.yml
test/
tools/
View
@@ -10,9 +10,8 @@ addons:
- g++-4.8
node_js:
- "node"
- "4"
- "0.12"
- "0.10"
- "8"
- "6"
install:
- npm install
script:
View
@@ -31,5 +31,12 @@
- Aaron Hill (aa1ronham@gmail.com)
- Sebastian Glaser (anx@ulzq.de)
- thomas (thomas@cppcoder.net)
- Nazar Mokrynskyi (nazar@mokrynskyi.com)
- greenkeeper[bot] (greenkeeper[bot]@users.noreply.github.com)
- Diego Rodríguez Baquero (diegorbaquero@gmail.com)
- Robert Kowalski (rok@kowalski.gd)
- Metamystical (metamystical@users.noreply.github.com)
- Emil Bay (github@tixz.dk)
- Jimmy Wärting (jimmy@warting.se)
#### Generated by bin/update-authors.sh.
#### Generated by tools/update-authors.sh.
View
@@ -74,11 +74,14 @@ If `opts` is specified, then the default options (shown below) will be overridde
``` js
{
nodeId: '', // 160-bit DHT node ID (Buffer or hex string, default: randomly generated)
bootstrap: [], // bootstrap servers (default: router.bittorrent.com:6881, router.utorrent.com:6881, dht.transmissionbt.com:6881)
host: false, // host of local peer, if specified then announces get added to local table (String, disabled by default)
concurrency: 16 // k-rpc option to specify maximum concurrent UDP requests allowed (Number, 16 by default)
hash: Function // custom hash function to use (Function, SHA1 by default)
nodeId: '', // 160-bit DHT node ID (Buffer or hex string, default: randomly generated)
bootstrap: [], // bootstrap servers (default: router.bittorrent.com:6881, router.utorrent.com:6881, dht.transmissionbt.com:6881)
host: false, // host of local peer, if specified then announces get added to local table (String, disabled by default)
concurrency: 16, // k-rpc option to specify maximum concurrent UDP requests allowed (Number, 16 by default)
hash: Function, // custom hash function to use (Function, SHA1 by default),
krpc: krpc(), // optional k-rpc instance
timeBucketOutdated: 900000, // check buckets every 15min
maxAge: Infinity // optional setting for announced peers to time out
}
```
@@ -236,7 +239,7 @@ These options are available:
* `opts.k` - ed25519 public key buffer (32 bytes) (REQUIRED)
* `opts.sign(buf)` - function to generate an ed25519 signature buffer (64 bytes) corresponding to the `opts.k` public key (REQUIRED)
* `opts.seq` - optional sequence (integer), must monotonically increase
* `opts.seq` - optional sequence (integer), must monotonically increase (REQUIRED)
* `opts.cas` - optional previous sequence for compare-and-swap
* `opts.salt` - optional salt buffer to include (< 64 bytes) when calculating
the hash of the content. You can use a salt to have multiple mutable addresses
@@ -296,14 +299,20 @@ dht.get(key, function (err, res) {
})
```
#### `dht.get(hash, callback)`
#### `dht.get(hash, opts, callback)`
Read a data record (created with `.put()`) from the DHT.
([BEP 44](http://bittorrent.org/beps/bep_0044.html))
Given `hash`, a hex string or buffer, lookup data content from the DHT, sending the
result in `callback(err, res)`.
These options are available:
* `opts.verify` - override the default ed25519 verification function supplied during DHT instantiation.
* `opts.salt` - optional salt buffer (if any) that was used to calculate the hash. Must be specified if included in the hash.
* `opts.cache` - use locally cached response value when available instead of performing a network lookup (defaults to true).
`res` objects are similar to the options objects written to the DHT with
`.put()`:
@@ -312,7 +321,6 @@ result in `callback(err, res)`.
* `res.k` - the public key (only present for mutable data)
* `res.sig` - the signature (only present for mutable data)
* `res.seq` - the sequence (optional, only present for mutable data)
* `res.salt` - the salt (optional, only present for mutable data)
### events
Oops, something went wrong.

No commit comments for this range