dht is used by anacrolix/torrent, and is intended for use as a library in other projects both torrent related and otherwise
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd cmd/dht-server: Don't require -tableFile to start Nov 21, 2018
internal/cmd Move internal bloom cmds over from torrent May 25, 2018
krpc Handle IPv6 response nodes when bootstrapping Nov 16, 2018
LICENSE added LICENSE Aug 1, 2017
README.md Fix links in README Aug 10, 2017
addr.go Standardize KRPC types and begin to add support for IPv6 Feb 11, 2018
announce.go Use Response.ForAllNodes where appropriate Nov 21, 2018
announce_test.go Add test logging bloom filter characteristics Aug 10, 2017
bitcount_test.go Create custom int160 type to avoid allocation overhead in node IDs wi… Feb 6, 2017
bucket.go Add the bucket type Aug 8, 2017
dht.go Add conntrack rate-limiting Nov 21, 2018
dht_test.go Make distance take int160s by value Oct 22, 2018
doc.go Fix main doc formatting Oct 2, 2017
expvar.go Standardize KRPC types and begin to add support for IPv6 Feb 11, 2018
go.mod Use conntrack.EntryHandle.Forget when possible Nov 29, 2018
go.sum Use conntrack.EntryHandle.Forget when possible Nov 29, 2018
int160.go Make distance take int160s by value Oct 22, 2018
misc.go Rate limit contacting new nodes during announce Oct 22, 2018
node.go Standardize KRPC types and begin to add support for IPv6 Feb 11, 2018
nodes_file.go Standardize KRPC types and begin to add support for IPv6 Feb 11, 2018
nodes_file_test.go sortimports Apr 11, 2018
security.go Fix SecureNodeId, it needs a pointer to the array Jul 8, 2017
security_test.go Test some assumptions around node ID security Feb 19, 2018
server.go Use conntrack.EntryHandle.Forget when possible Nov 29, 2018
table.go Closest nodes weren't being filtered Feb 19, 2018
table_test.go Add test for #12 Sep 3, 2017
tokens.go Giant cleanup in progress Jul 8, 2017
tokens_test.go dht.Server: Return valid token from get_peers, and handle incoming an… Nov 26, 2016
transaction.go Add conntrack rate-limiting Nov 21, 2018

README.md

dht

CircleCI GoDoc Join the chat at https://gitter.im/anacrolix/torrent

Installation

Install the library package with go get github.com/anacrolix/dht, or the provided cmds with go get github.com/anacrolix/dht/cmd/....

Commands

Here I'll describe what some of the provided commands in ./cmd do.

Note that the godo command which is invoked in the following examples builds and executes a Go import path, like go run. It's easier to use this convention than to spell out the install/invoke cycle for every single example.

dht-ping

Pings DHT nodes with the given network addresses.

$ godo ./cmd/dht-ping router.bittorrent.com:6881 router.utorrent.com:6881
2015/04/01 17:21:23 main.go:33: dht server on [::]:60058
32f54e697351ff4aec29cdbaabf2fbe3467cc267 (router.bittorrent.com:6881): 648.218621ms
ebff36697351ff4aec29cdbaabf2fbe3467cc267 (router.utorrent.com:6881): 873.864706ms
2/2 responses (100.000000%)