如何使用java从磁力链接创建torrent文件?

2023-12-13

所以我想开发一个新的Java项目,将magnet URI转换为.torrent文件,但是我找不到方法来做到这一点,基本上我把magnet URI分成了几部分:

使用的URI:

magnet:?xt=urn:btih:d2474e86c95b19b8bcfdb92bc12c9d44667cfa36&dn=Leaves+of+Grass+by+Walt+Whitman.epub&tr=udp%3A%2F%2Ftracker.example4.com%3A80&tr=udp%3A%2F%2Ftracker.example5.com%3A80&tr=udp%3A%2F%2Ftracker.example3.com%3A6969&tr=udp%3A%2F%2Ftracker.example2.com%3A80&tr=udp%3A%2F%2Ftracker.example1.com%3A1337

崩溃:

magnet:?

xt=urn:btih:d2474e86c95b19b8bcfdb92bc12c9d44667cfa36

dn=叶子+of+草+作者+沃尔特+惠特曼.epub

tr=udp%3A%2F%2Ftracker.example4.com%3A80

tr=udp%3A%2F%2Ftracker.example5.com%3A80

tr=udp%3A%2F%2Ftracker.example3.com%3A6969

tr=udp%3A%2F%2Ftracker.example2.com%3A80

tr=udp%3A%2F%2Ftracker.example1.com%3A1337

根据我收集的信息这个链接,torrent 文件包含所需文件的文件、长度和路径,但我似乎无法从磁铁 URI 中获取这些信息。

提前致谢。


单独从磁力链接重新创建 .torrent 文件是不可能的。

Torrent 客户端从磁力链接获取 .torrent 文件的方式是:

  • 从跟踪器和/或 DHT 获取对等点列表。
  • 连接到对等点并使用下载 .torrent 元数据
    BEP9 - 对等点发送元数据文件的扩展.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何使用java从磁力链接创建torrent文件? 的相关文章

随机推荐