How can download the file with torrent?

Download tool to create torrent with command line.

sudo apt install mktorrent

Create a directory mytest and get a sample file from web.

mkdir mytest
cd mytest
url="https://downloads.openwrt.org/releases/19.07.7/targets/x86/64/openwrt-19.07.7-x86-64-vmlinuz"
wget $url
ls  
openwrt-19.07.7-x86-64-vmlinuz

Create the torrent in the directory mytest.

mktorrent -a  http://open.acgtracker.com:1096/announce       \
          -a  http://1337.abcvg.info:80/announce             \
          -o  mytest.torrent   openwrt-19.07.7-x86-64-vmlinuz

Now open the mytest.torrent with deluge to make it in seeding status.
Copy the mytest.torrent into /tmp

cp mytest.torrent  /tmp

It is time to download file via torrent .

1.locally
1.1 qbittorrent

Open the /tmp/mytest.torrent and choose /tmp as storage in qbittorrent ,the file openwrt-19.07.7-x86-64-vmlinuz can be downloaded locally.

1.2 transmission

transmission-cli  mytest.torrent  -w  /tmp
transmission-cli 2.94 (d8e60ee44f)
[2021-06-14 15:36:39.567] Transmission 2.94 (d8e60ee44f) started
[2021-06-14 15:36:39.568] RPC Server: Adding address to whitelist: 127.0.0.1
[2021-06-14 15:36:39.568] UDP: Failed to set receive buffer: requested 4194304, got 425984
[2021-06-14 15:36:39.568] UDP: Please add the line "net.core.rmem_max = 4194304" to /etc/sysctl.conf
[2021-06-14 15:36:39.568] UDP: Failed to set send buffer: requested 1048576, got 425984
[2021-06-14 15:36:39.568] UDP: Please add the line "net.core.wmem_max = 1048576" to /etc/sysctl.conf
[2021-06-14 15:36:39.568] DHT: Reusing old id
[2021-06-14 15:36:39.568] DHT: Bootstrapping from 66 IPv4 nodes
[2021-06-14 15:36:39.618] openwrt-19.07.7-x86-64-vmlinuz: No data found! Ensure your drives are connected or use "Set Location". To re-download, remove the torrent and re-add it.
[2021-06-14 15:36:39.619] Saved "/home/debian/.config/transmission/torrents/openwrt-19.07.7-x86-64-vmlinuz.d522b39679e7990d.torrent"
[2021-06-14 15:36:39.619] openwrt-19.07.7-x86-64-vmlinuz: No data found! Ensure your drives are connected or use "Set Location". To re-download, remove the torrent and re-add it.
[2021-06-14 15:36:39.619] openwrt-19.07.7-x86-64-vmlinuz: No data found! Ensure your drives are connected or use "Set Location". To re-download, remove the torrent and re-add it.
[2021-06-14 15:36:39.820] Saved "/home/debian/.config/transmission/settings.json"

[2021-06-14 15:36:39.820] DHT: Not saving nodes, DHT not ready
[2021-06-14 15:36:39.820] Port Forwarding: Stopped
[2021-06-14 15:36:39.820] openwrt-19.07.7-x86-64-vmlinuz: Removing torrent
[2021-06-14 15:36:39.820] openwrt-19.07.7-x86-64-vmlinuz: Pausing

1.3 aria2c

aria2c   mytest.torrent  

06/14 15:37:39 [NOTICE] Downloading 1 item(s)

06/14 15:37:39 [NOTICE] IPv4 DHT: listening on UDP port 6958

06/14 15:37:39 [NOTICE] IPv4 BitTorrent: listening on TCP port 6892

06/14 15:37:39 [NOTICE] IPv6 BitTorrent: listening on TCP port 6892
 *** Download Progress Summary as of Mon Jun 14 15:38:39 2021 ***                                                                                                           
============================================================================================================================================================================
[#b38dc3 0B/3.7MiB(0%) CN:0 SD:0 DL:0B]
FILE: /tmp/openwrt-19.07.7-x86-64-vmlinuz
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 *** Download Progress Summary as of Mon Jun 14 15:39:40 2021 ***                                                                                                           
============================================================================================================================================================================
[#b38dc3 0B/3.7MiB(0%) CN:0 SD:0 DL:0B]
FILE: /tmp/openwrt-19.07.7-x86-64-vmlinuz
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[#b38dc3 0B/3.7MiB(0%) CN:0 SD:0 DL:0B]

2.On lan

push the mytest.torrent into 192.168.2.1.

scp mytest.torrent root@192.168.2.1:/home

Login 192.168.2.1

ssh root@192.168.2.1

2.1 transmission

root@OpenWrt:~# transmission-cli /home/mytest.torrent  -w /tmp
transmission-cli 3.00 (bb6b5a062e)
[2021-06-14 07:16:29.409] Transmission 3.00 (bb6b5a062e) started
[2021-06-14 07:16:29.409] RPC Server: Adding address to whitelist: 127.0.0.1
[2021-06-14 07:16:29.409] RPC Server: Adding address to whitelist: ::1
[2021-06-14 07:16:29.409] Couldn't bind port 51413 on 0.0.0.0: Address in use (Is another copy of Transmission already running?)
[2021-06-14 07:16:29.409] Couldn't bind port 51413 on ::: Address in use (Is another copy of Transmission already running?)
[2021-06-14 07:16:29.410] UDP: Couldn't bind IPv4 socket
[2021-06-14 07:16:29.410] UDP: Couldn't rebind IPv6 socket
[2021-06-14 07:16:29.410] DHT: Reusing old id
[2021-06-14 07:16:29.459] Saved "/root/.config/transmission/torrents/d522b39679e7990d34490b77b86571e4ae3d21f5.torrent"
[2021-06-14 07:16:29.744] Port Forwarding (NAT-PMP): initnatpmp succeeded (0)
[2021-06-14 07:16:29.744] Port Forwarding (NAT-PMP): sendpublicaddressrequest succeeded (2)
Progress: 0.0%, dl from 0 of 0 peers (0 kB/s), ul to 0 (0 kB/s) [None][2021-06-14 07:16:37.751] Port Forwarding: Port Forwarding
[2021-06-14 07:16:37.911] Port Forwarding: Port Forwarding
[2021-06-14 07:16:37.912] web: will verify tracker certs using envvar CURL_CA_BUNDLE: none
[2021-06-14 07:16:37.912] web: NB: this only works if you built against libcurl with openssl or gnutls, NOT nss
[2021-06-14 07:16:37.912] web: NB: invalid certs will show up as 'Could not connect to tracker' like many other errors
Progress: 0.0%, dl from 0 of 0 peers (0 kB/s), ul to 0 (0 kB/s) [None][2021-06-14 07:22:29.418] Saved "/root/.config/transmission/resume/d522b39679e7990d34490b77b86571e4ae3d21f5.resume"
Progress: 0.0%, dl from 0 of 0 peers (0 kB/s), ul to 0 (0 kB/s) [None]  

2.2 aria2c

root@OpenWrt:~# aria2c  /home/mytest.torrent  

06/14 07:25:48 [NOTICE] Downloading 1 item(s)

06/14 07:25:49 [NOTICE] IPv4 DHT: listening on UDP port 6952

06/14 07:25:49 [NOTICE] IPv4 BitTorrent: listening on TCP port 6945

06/14 07:25:49 [NOTICE] IPv6 BitTorrent: listening on TCP port 6945
 *** Download Progress Summary as of Mon Jun 14 07:26:50 2021 ***                                                                                                           
============================================================================================================================================================================
[#a13c43 0B/3.7MiB(0%) CN:0 SD:0 DL:0B]
FILE: /root/openwrt-19.07.7-x86-64-vmlinuz
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 *** Download Progress Summary as of Mon Jun 14 07:27:50 2021 ***                                                                                                           
============================================================================================================================================================================
[#a13c43 0B/3.7MiB(0%) CN:0 SD:0 DL:0B]
FILE: /root/openwrt-19.07.7-x86-64-vmlinuz
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[#a13c43 0B/3.7MiB(0%) CN:0 SD:0 DL:0B]
06/14 07:27:50 [ERROR] CUID#19 - Download aborted. URI=http://open.acgtracker.com:1096/announce?info_hash=%D5%22%B3%96y%E7%99%0D4I%0Bw%B8eq%E4%AE%3D%21%F5&peer_id=A2-1-35-0-rr%E6%C0k%A4%16%DF%F0~&uploaded=0&downloaded=0&left=3915840&compact=1&key=%E6%C0k%A4%16%DF%F0~&numwant=50&no_peer_id=1&port=6945&event=started&supportcrypto=1
Exception: [AbstractCommand.cc:340] errorCode=2 Timeout.
[#a13c43 0B/3.7MiB(0%) CN:0 SD:0 DL:0B]                                                                                                                                     
06/14 07:27:52 [ERROR] GID#1bd7e04731448a08 - Tracker request http://1337.abcvg.info:80/announce?info_hash=%D5%22%B3%96y%E7%99%0D4I%0Bw%B8eq%E4%AE%3D%21%F5&peer_id=A2-1-35-0-rr%E6%C0k%A4%16%DF%F0~&uploaded=0&downloaded=0&left=3915840&compact=1&key=%E6%C0k%A4%16%DF%F0~&numwant=50&no_peer_id=1&port=6945&event=started&supportcrypto=1 failed
Exception: [bencode2.cc:72] errorCode=25 Bencode decoding failed: error=-1
[#a13c43 0B/3.7MiB(0%) CN:0 SD:0 DL:0B]
1 Like

again, google ....

All steps can be reproducible ,please try as what i describe,i have googled so many tutorial.