Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

254
Vistas
Stitching DHT and Torrent Client together

I have two java libraries. One connects to DHT and can successfully download torrent files. And the other which downloads the actual data associated with the torrent.

The torrent client library expects an announce or announce-list section in the torrent, and does't understand the 'nodes' entry.

The question is how do I alter the torrent client code to understand the 'nodes' section of a torrent file. OR How do I calculate a tracker URL from a set of ip:port DHT peer addresses?

I could just guess the url by guessing a port number and appending /announce onto it.. but this surely isn't right?

Does anyone know how this works?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

For DHT-only operation you do not need an announce URL. If the library itself expects one you can insert a dummy url, the format dht://<infohash in hex> is common, but it does not matter, as it won't be used.

The DHT part on the other hand does not require the nodes to perform a lookup, it simply operates based on the infohash of the torrent. The nodes can optionally be injected into a dht client for bootstrapping, e.g. by executing a ping on them, but that should not be needed if it already is bootstrapped. Once the DHT client has done its get_peers and announce lookups the peer lists can be injected back into the torrent client.

Since you're using my library: You can use PeerLookupTask to read a torrent peer list from the DHT and AnnounceTask to add your torrent port to the list. The obtained IP and Ports have to be passed to the torrent client. The GetPeers CLI command contains an example how to use the first part. There also are utility methods that should cover common use cases.

over 4 years ago · Santiago Trujillo Denunciar

0

For an alternative I may recommend you to see Bt, which is a Java 8 BitTorrent client and already integrates with the8472's mldht: https://github.com/atomashpolskiy/bt

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda