📜 ⬆️ ⬇️

Aria2C + OpenWRT

Have a nice day. Today there is a need to remotely download a couple of files to the router. I decided to share how I decided this question. Of course, you can use the usual wget by going to the router via ssh, but somehow it is not convenient. Googling I found only Aria2C for OpenWRT , of course, I could look badly if I’m still offering options, I’ll only be happy. Fits all my criteria, plus a nice bonus: it just as easily downloads torrents and ftp. The only drawback is that there is no web interface, but this drawback is easily fixed. Although for the sample you can and go another way about this a little later. In general, all those interested in asking for cat

Installation

The installation itself is extremely simple, literally in two teams.
opkg update
opkg install aria2c

Customization

Create a file with server settings
mkdir / etc / aria2
touch /etc/aria2/aria2.conf

Edit it with any editor that is convenient for you.
nano /etc/aria2/aria2.conf

For example, my file
daemon
allow-overwrite = false
check-certificate = false
auto-file-renaming = false
dir = / home
enable-rpc = true
rpc-listen-port = 6800
rpc-listen-all = true
rpc-user = test
rpc-passwd = test
file-allocation = none
enable-dht = false
disable-ipv6 = true
max-download-limit = 1500K
max-overall-download-limit = 1500K
log = / etc / aria2 / aria2.log
log-level = warn
auto-save-interval = 30
save-session = / etc / aria2 / aria2.sav

All settings are intuitive, for explanations and additional settings you can refer to the documentation , and even in Russian.
There was no time to write an autoload script, so for the time being it was a simple command to start
aria2c --conf-path = / etc / aria2 / aria2.conf
in /etc/rc.local
For remote control, you can assign any port, the main thing is not to forget to forward it, how it is done can be read here .
Everything can be checked.
Check

To manage all this, there is a ready-made program for Windows, you can take it here , but unfortunately, I have Ubuntu, so I had to find another way. He found it just as quickly, it’s quite a convenient and pretty web snout, you can download it here and put it directly on the router, but in my opinion this is too much action so as not to overload the router, for this there is a direct link on the developers website here it is . After loading we go into the settings and we drive in the external ip of your router and port, that's all, good downloads.

PS The topic was written at work in his spare time, not to kick for mistakes.

')

Source: https://habr.com/ru/post/192386/


All Articles