Socket
Socket
Sign inDemoInstall

github.com/anacrolix/dht/v2

Package Overview
Dependencies
39
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/anacrolix/dht/v2

Package dht implements a Distributed Hash Table (DHT) part of the BitTorrent protocol, as specified by BEP 5: http://www.bittorrent.org/beps/bep_0005.html BitTorrent uses a "distributed hash table" (DHT) for storing peer contact information for "trackerless" torrents. In effect, each peer becomes a tracker. The protocol is based on Kademila DHT protocol and is implemented over UDP. Please note the terminology used to avoid confusion. A "peer" is a client/server listening on a TCP port that implements the BitTorrent protocol. A "node" is a client/server listening on a UDP port implementing the distributed hash table protocol. The DHT is composed of nodes and stores the location of peers. BitTorrent clients include a DHT node, which is used to contact other nodes in the DHT to get the location of peers to download from using the BitTorrent protocol. Standard use involves creating a Server, and calling Announce on it with the details of your local torrent client and infohash of interest.


Version published

Readme

Source

dht

Go Reference

Installation

Get the library package with go get github.com/anacrolix/dht/v2, or the provided cmds with go install github.com/anacrolix/dht/v2/cmd/...@latest.

Commands

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

dht

Supports various commands operating on the DHT.

% go run github.com/anacrolix/dht/v2/cmd/dht --help
valid arguments at this point:
  --help|-h
  --network <string>
  --secure
  --bootstrap-addr <[]string>
  --query-resend-delay <time.Duration>
  derive-put-target
  put
  put-mutable-infohash
  get
  ping
  get-peers
  query
  ping-nodes

Downstream projects

Projects that uses this repo in novel ways.

  • cove: Torrent browser with streaming, DHT search, video transcoding and casting.
  • btlink: btlink supports DNS records stored on the DHT.

FAQs

Last updated on 12 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc