Skip to content
This repository has been archived by the owner on Oct 3, 2024. It is now read-only.

Commit

Permalink
Merge torrust/torrust-website#246: New blog post: Hash2Torrent - Retr…
Browse files Browse the repository at this point in the history
…ieve Torrent Files Effortlessly!

910dfe5 feat: new blog post: BHash2Torrent (Jose Celano)

Pull request description:

  New blog post: Hash2Torrent - Retrieve Torrent Files Effortlessly!
  Repo: https://github.com/torrust/torrust-hash2torrent
  Live demo: https://hash2torrent.com/

ACKs for top commit:
  josecelano:
    ACK 910dfe5

Tree-SHA512: c8a2dccb9eab717cb3f8b836b93dabb76a5d3a6de87e02b2b3425bffb2a1bc8c5bc56f30ae8b0010ea0f348a14ed354ea96b6c078454a40464a99558d443728b
  • Loading branch information
josecelano committed Sep 5, 2024
2 parents 02b14e1 + 910dfe5 commit 1fac483
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 0 deletions.
2 changes: 2 additions & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ infohash
IPFS
johnthagen
Juggery
Katson
kcachegrind
keyrings
Kimbatt
Expand Down Expand Up @@ -77,6 +78,7 @@ realpath
regr
rehype
roboto
rqbit
runtimes
rustc
RUSTFLAGS
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
---
title: Hash2Torrent - Retrieve Torrent Files Effortlessly!
slug: hash2torrent-retrieve-torrent-files-effortlessly
coverImage: /images/posts/hash2torrent-retrieve-torrent-files-effortlessly/hash2torrent-screenshot.png
date: 2024-09-05T10:00:00.000Z
updated: 2024-09-05T10:00:00.000Z
excerpt: Discover Hash2Torrent, a new tool to fetch torrent files (metainfo files) directly from their infohash! Simplify your torrent management and integrations with our easy-to-use service.
contributor: Jose Celano
contributorSlug: jose-celano
tags:
- Service
- Demo
- Metainfo
- Metadata
- Sample
hidden: false
---

<script>
import Callout from "$lib/components/molecules/Callout.svelte";
import CodeBlock from "$lib/components/molecules/CodeBlock.svelte";
import Image from "$lib/components/atoms/Image.svelte";
import PostBody from "$lib/components/molecules/PostBody.svelte";
import PostContainer from "$lib/components/molecules/PostContainer.svelte";
import PostTable from "$lib/components/molecules/PostTable.svelte";
</script>

<PostContainer>

<PostTable>

## Table of contents

- [Why this tool](#why-this-tool)
- [Implementation](#implementation)
- [Alternative Methods](#alternative-methods)
- [Benefits of Using Hash2Torrent](#benefits-of-using-hash2torrent)
- [Conclusion](#conclusion)
- [Links](#links)
- [Acknowledgments](#acknowledgments)

</PostTable>

<PostBody>

Hello, Torrust community!

We are thrilled to introduce our newest project: [Hash2Torrent](https://hash2torrent.com/), a web service that allows you to easily retrieve torrent files using only their infohash (version 1).

Hash2Torrent is designed to make torrent management more accessible and user-friendly, without the need to install a BitTorrent client.

<Callout type="success">

https://hash2torrent.com

</Callout>

## Why this tool

In our quest to find a straightforward tool that allows users to download torrent files directly from an infohash, we discovered that there wasn't a simple, reliable service available. We set out to change that by creating Hash2Torrent — a service that fills this gap. With Hash2Torrent, you can now quickly download torrent files by simply entering the infohash on our website ([hash2torrent.com](https://hash2torrent.com/)) or using a direct URL format:

<Callout type="info">

```text
https://hash2torrent.com/{info-hash}
```

</Callout>

For example: <https://hash2torrent.com/443c7602b4fde83d1154d6d9da48808418b181b6>.

<Callout type="warning">

The service does NOT download the contents described in the torrent file. It only ask other peers for the torrent file, also called metainfo file. Besides, the file (called metadata in BEP 9) includes only the info dictionary because is the only part covered by the info-hash. See [BEP 9](https://www.bittorrent.org/beps/bep_0009.html) for more information.

</Callout>

## Implementation

The project is a thin API wrapper that uses the Rust BitTorrent client [rqbit](https://github.com/ikatson/rqbit). rqbit has an option to add a torrent to the client in `list-only` mode, meaning the torrent is not downloaded, but only listed in the client. When you add a new torrent from a magnet-link, the client automatically gets the torrent file from other peers if it's available.

The API generates a magnet-link for the info-hash and adds that magnet-link to the client in `list-only` mode. The clients returns the torrent file.

<Callout type="warning">

For the time being, the service API only returns a direct (not user-friendly) timeout (408) if the client behind the service can't find any peer having that torrent.

</Callout>

## Alternative Methods

Traditionally, if you wanted to retrieve a torrent file using its infohash, you would have to:

- Open a BitTorrent client that supports DHT (Distributed Hash Table).
- Add the infohash as a magnet link.
- Wait for the client to find peers that have the torrent file.

While this method works, it can be cumbersome and is not ideal if you're looking for a lightweight solution or need to automate the process for integration into other services.

<Callout type="info">

**NOTICE:** You need the DHT to find other peers having the torrent. In the future we could also also user to introduce a magnet-link that may contain a list of trackers. In that case, the client could use those tracker to find peers.

</Callout>

## Benefits of Using Hash2Torrent

Hash2Torrent is all about simplicity and ease of integration:

- **User-Friendly Interface:** Just like a Google search, simply type the infohash into our form, click download, and if peers are available, the torrent file will be downloaded within seconds.
- **Direct URL Access:** Use our direct URL format to fetch torrent files programmatically, making it ideal for integration with other tools and services.
- **Efficiency:** No need to deal with BitTorrent clients or complex setups. Hash2Torrent is the simplest way to get a torrent file from an infohash. We have also added a torrents cache so it will be even faster if the torrent is already cached.
- **Contribution to the Ecosystem:** By providing this service, we aim to empower the community with more tools that enhance the overall BitTorrent experience.

<Callout type="info">

Try it out! Visit Hash2Torrent ([hash2torrent.com](https://hash2torrent.com/)) and give it a try with your favorite torrents' infohashes. We are eager to hear your feedback and suggestions.

</Callout>

## Conclusion

We built Hash2Torrent to make torrent retrieval from infohashes as easy as possible. Whether you're a casual user who needs the occasional torrent file or a developer looking to integrate torrent retrieval into your application, Hash2Torrent is here to help.

This project is just one of the many ways we plan to contribute to the BitTorrent ecosystem by providing practical, user-friendly tools. We believe in building a more accessible torrenting experience for everyone, and Hash2Torrent is a significant step in that direction. We are excited to continue innovating and supporting the community with more tools like this!

Happy torrenting!

## Links

- [The live demo](https://hash2torrent.com/).
- [Github repo](https://github.com/torrust/torrust-hash2torrent).

## Acknowledgments

A massive thank you to all contributors who made this project possible, especially those involved in developing the Rust-based BitTorrent client that powers Hash2Torrent, specially to [Igor Katson](https://github.com/ikatson) whose work underpins Hash2Torrent. Their dedication and contributions have been instrumental in bringing this service to life.

If you have any questions or issues regarding this post, please [open an issue](https://github.com/torrust/torrust-website/issues/new).

For any other questions or issues related to Torrust repositories, please open an issue on the corresponding repository:

- Torrust Hash2Torrent: <https://github.com/torrust/torrust-hash2torrent/issues>
- Torrust Tracker: <https://github.com/torrust/torrust-tracker/issues>
- Torrust Index Backend: <https://github.com/torrust/torrust-index/issues>
- Torrust Index Frontend: <https://github.com/torrust/torrust-index-gui/issues>

We very welcome any contributions to the project!

</PostBody>

</PostContainer>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1fac483

Please sign in to comment.