Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

256
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda