What's new

aria2 + webui on entware - bittorrent working

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

rod

Occasional Visitor
Finally got it!

First of all, sorry about my poor english, and sorry if you find this post long and messy. It was a challenge to me to make all work in the first place, and now I am recalling the steps. Comments are wellcome, confirmations of this working on this on that...are welcomed to. I will edit the post or update if necesary, and may be someone with better english and order skills can make a no-brainer step by step tutorial suited for the impatient ones.

Almost a year ago, when I first try to go from optware to entware in my ASUS RT-N16, I was discouraged because there was no full replacement solution for the buggy download manager.

My first attempts with aria2 were frustrating. I could not manage to set up any of the front ends, except for webui-aria but then, I could not start downloading anything except http files. No torrent, no nothing.

Saddly, went back to optware and download manager.

Now I found the way. So lets go step by step.

Prerequisites:

entware working (It can be tricky if you allready have optware, because it will install, and you may be able to do all the steps and even test it, but if you reset the router... it can go back to optware, even if you uninstall download manager. After many tryes, finally got surviving the reset. You have to erase all traces of optware on the microsd (or pendrive/hard drive) attached. I unplugged it... and erase everything except the old download folder from mi PC... even the hidden files that begins with a dot.

The general tutorial for aria that most fitted me was at first this: I recomend you to follow it in one window and continue reading my post on the other to make necesary changes.

I use that changing some things that I will explain below.

You have to install aria2, off course using
opkg update
opkg install aria2

And if you want to use the webui pointing the browser to the router (or from outside) you will need a web server. I used the lighttpd, but installed it using this instructions

In my case, the only webui that worked is webui-aria for many reasons. The one in that tutorial was keep throwing errors on line 17... something about SESSION, so I installed lighttpd_mod_session and that error dissapear, but never get to work. Other UI that I try was a cgi file, but it was in source form and I never manage to compile it on linux mint 14. Not to mention that uGet didnt worked too... so lets drop it, use whatever you want/find but I recommend zuahmza's webui-aria2 that doesn't require anything... it can work on your PC, on his website, on the www folder of the router... and probably on the download folder itself mounted with samba or NFS... and a web browser.

This is my own aria2.conf (BTW it is located in /opt/etc directly.. and NOT in the /opt/etc/aria2. You can use any folder you want for download, but it should exist.
Code:
daemon=true                                                                     
enable-rpc=true                                                                 
rpc-listen-port=6800                                                            
rpc-listen-all=true                                                             
dir=/tmp/mnt/OPTWARE/Download2                                                  
log=/opt/var/log/aria2.log                                                      
log-level=warn                                                                  
enable-dht=false                                                                
#dht-listen-port=6801                                                           
#dht-file-path=/opt/var/run/aria2c                                              
auto-save-interval=30                                                           
max-concurrent-downloads=5                                                      
lowest-speed-limit=1K                                                           
max-overall-upload-limit=20K                                                    
max-upload-limit=10K                                                            
max-overall-download-limit=150K                                                 
max-download-limit=30K                                                          
bt-max-peers=25                                                                 
bt-max-open-files=50                                                            
bt-request-peer-speed-limit=2K                                                  
seed-ratio=1.0                                                                  
seed-time=1460                                                                  
#to use epoll is a bit better than select                                       
event-poll=epoll

Don't get fooled by the OPTWARE string... it is just the name of my pendrive that I didn't changed after coming from the optware past. I remove the lines of rpc password and user, but they work. I didn't enabled them again because I removed the access from outside to the virtual server (it worked with the external IP when i tried)... I use it from inside mi LAN. The way to get to the web server is, in my case: 192.168.1.1:81 and you will add /webui-aria2 if that is the name of the folder inside www.

Now the most annoying problem..solved:

The aria2 that came with the entware in the repos, DOESNT have support for bittorrent and many other features...

First I think of cross-compile it myself, buy before I even started to get a clue on that, I found a page with a set of scripts for compiling inside the router directly... time consuming but accurated and optimized results, as stated by the mantainer of the toolkit. It is called tomatoware and will allow you to compile in the router updated versions of applications for entware or optware, and even compile stuff that not exist yet on the repositories.

But it gets better... in the case of aria2 you may be not need to compile it at all. Searching the proyects tied to tomatoware (different forks of tomatousb) I found a files repository for the same guy, that have binaries allready compiled. I download a few (including aria2). Here is the link

Then I stopped aria in the router going to /opt/etc/init.d and issuing
./S81aria2 stop

And make a backup of the aria2c binarie (you can enter vía samba to the entware/bin folder and copy the file to you PC)

Finally copied the new, updated binary replacing the one in the router.
in my case:
cp /mnt/OPTWARE/Download2/aria2c /opt/bin

then start again aria with
./S81aria2 start

and thested the features with:
aria2c -v

Which showed me that it has all the features I want enabled... and the binary is smaller than the previous one.

Enabled Features: Async DNS, BitTorrent, Firefox3 Cookie, GZip, HTTPS, Message Digest, Metalink, XML-RPC
Hash Algorithms: sha-1, md5

After that, I pointed once more my browser to the routerip:81/whatever-folder-the-webui-is-on and this time, when I pushed Add, it showed me more optiones, including torrent.

In my tests, I whas able to download a torrent following the link... also able to download a torrent searching for the .torrent in my PC

The mangnets this time where decoded, but I am not done with the tests... It allways showed the metadata, but in some cases it dont started to donwload, and in my hurry, I give it myself the .torrent and delete the old magnet one. But I will update here when I tested it more extensively.

Now that I can download, I will keep the entware...

PS. Other caveat that I found trying to follow the previous tutorials is the location of the aria2.conf... It will be in the etc folder...and ^NOT^ in the etc/aria2 folder. You will lose time if you dont verify this.
 
I'm in the middle of setting up a Debian Live USB build environment for Entware, but had I known about Tomatoware I might have just gone with that. Wouldn't compiling directly on the router be incredibly slow though?

Also I had been meaning to look for an aria2 webui and kept forgetting about it, so thanks both for the reminder and recommendations.
 
Question: How to make aria2 play with yaaw

I couldn't go pass the server error. I have done many tryes with the server line in the config screen and nothing... can you tell me how do you make it work?
 
I couldn't go pass the server error. I have done many tryes with the server line in the config screen and nothing... can you tell me how do you make it work?
I found last yaaw is not working with the Firefox, I got the same issue. May be it's blocked by some plugin, don't know.

If you are still using webui-aria2, you may hide annoying messages with following AdBlock+ rules:
Code:
ziahamza.github.com##.alert
ziahamza.github.com##.progress.active
ziahamza.github.com##.download-graph
ziahamza.github.com##canvas
 
@ rod

add this two lines in config file
Code:
rpc-allow-origin-all=true
rpc-secret=12345

change rpc-secret what ever you like.
comment out or remove rpc-user and rpc-passwd lines

now in yaaw setting add JSON-RPC Path as
Code:
http://token:12345@192.168.1.1:6800/jsonrpc

I am using chrome

hope this helps.
 
I couldn't go pass the server error. I have done many tryes with the server line in the config screen and nothing... can you tell me how do you make it work?
I spent some time to find out whats wrong. Yaaw demo is too old and doesn't support token authentication. I've pulled last version of it's code and placed to free hosting site. Now it's working.

Update: Demo updated!
 
Last edited:
Still doesn't work for me

Couldn't make it work from your host, nor from my forked copy on github. Even using ip address instead of xxxx.asuscomm.com. And it doesen't look to be an RPC issue, because the webui-aria2 worked as always, now with the rpc-secret string on the corresponding field :|

I will try it more from my work, to discard the fact that I am now inside my lan, but this doesn't affect webui-aria2 so I think I will stick with it.

Thanks for the effort!
 
As for me, I prefer YAAW because of its ability to select which files to download. Unfortunately, it's just a sorted flat list (as in transmission 2.74 and earlier). I've asked YAAW author to implement it.

PS Now file list is hierarhical! Demo updated! Thanks to binux!
 
Last edited:

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top