What's new

Transmission...for Asuswrt/Merlin

  • 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!

kvic

Part of the Furniture
A sequel to this: http://www.snbforums.com/threads/ntp-daemon-for-asuswrt-merlin.28041

Transmission.png


My day as a web dev on his 8th day... The thread title is a bit misleading. You'll need to install Transmission from Entware-ng. Then by default it expects you to access its web interface at http://router.asus.com:9091.

Why not let us access through your beloved router's Web GUI? So here we are. If there are enough interest, I could create a little add-on package for installation to vanilla Merlin firmware (without the need of recompile).

Another screenshot...the Inspector View:
Inspector.png
 
Definitely nicer than having to hit the transmission port, does it offer notifications as well when the Torrent completes? The other thing I found lacking with the generic interface is the ability to delete both the data and torrent files. Very cool though.

And a little further off topic, it would be nice to see an add-on for running Internet speed tests directly on the router (DSL reports/Speedtest.net).
 
OK, found out how to do that, thanks @kvic.
Back to the drawing board, starting from square one...
 
Last edited:
i am interesed something like that for blocking IP addresses or range of IP addresses to block them to connect on my server over webgui......
 
Definitely nicer than having to hit the transmission port, does it offer notifications as well when the Torrent completes? The other thing I found lacking with the generic interface is the ability to delete both the data and torrent files. Very cool though.

It has all functionalities that comes with Transmission for Entware-ng. I didn't have to change the binary. I was interested in CSS and wanted to explore a bit more. So take Transmission as a vehicle. Learned something fun and ended up with a usable thing.

The Transmission Web Interface is well coded in CSS. Fairly skin-able.

As a side note, completion notification is there as it's in Entware-ng version. To my surprise, notification of adding torrent is there too. Look at /opt/etc/transmission/settings.json on these two lines:

"script-torrent-added-enabled": true,
"script-torrent-added-filename": "/path/to/some/script.sh",

Kudos to @ryzhov_al & co by including patch #5586 to enable this functionality.

For unknown and perhaps silly reasons, Transmission guys refused to include in the mainstream distribution.
 
OK, found out how to do that, thanks @kvic.
Back to the drawing board, starting from square one...

Adding a new Tab to WebUI shall be fairly easy now. Feel free to re-use the NTP Daemon ASP page as it's much simpler to start a new Tab. I borrowed that by stripping the Sysinfo ASP page to begin with..

For your project, I think the interesting part will be how to handle server side action/scripting. From architectural perspective, you might want to avoid a heavy- weight server side process (that handles config changes and web UI) being bigger than the processes actually doing the adblocking. :)
 
i am interesed something like that for blocking IP addresses or range of IP addresses to block them to connect on my server over webgui......

I could understand how people become wanting a GUI for everything since Windows 95...For most scenarios of smaller tasks I actually don't agree with the need for a GUI. Just my two cents.

Recently a group of repeating IPs hit my router's IPsec and HTTPS services. Interestingly some of these IPs are from research groups in well-known universities in US..

Anyway, I don't like they poke on my host where I actually have services running. So I use ipset to read a list of IPs from a text file and block the IPs through iptables. If you're interest, people may start reading ipset from here.
 
And a little further off topic, it would be nice to see an add-on for running Internet speed tests directly on the router (DSL reports/Speedtest.net).

Sorry, not from me :) Though it'll be an interesting project for motivated individuals.

I would borrow the "two big meters" from Adaptive QoS page as a foundation for such a new Tab. Then figure out how to read speedtest values from a local process (I suppose) and feed back into this HTML page..

Shall be fun. Any volunteers?
 
I borrowed that by stripping the Sysinfo ASP page to begin with..
I had a look into that as well, a good starting point for a project like this.
For your project, I think the interesting part will be how to handle server side action/scripting.
The question also is, what are the capabilities of the built in http server. If there only were a similar info tag for .asp as with php (<?php phpinfo() ?>).
I believe there is, it's just not working, as I recall when I did test it some time ago.
 
The question also is, what are the capabilities of the built in http server. If there only were a similar info tag for .asp as with php (<?php phpinfo() ?>).
I believe there is, it's just not working, as I recall when I did test it some time ago.

I thought it's a simple HTTP/1.0 daemon serving plain texts. Plus customisation by *wrt guys to understand a few custom tags that appear to having server side scripting capabilities.

I would bet any fancier standard server side scripting such as cgi, PHP, Perl etc aren't there. But I could be wrong as I haven't looked into the details of the httpd in asuswrt.

For your project, there are a few options IMHO...
  1. have users to install lighttpd + php (or anything server side scripting) plugin
  2. patch the httpd to understand one or two custom tags for your purpose
  3. have pixelserv to handle some kind of server side scripting for you
Option 1 is most flexible but you end up with a RAM-resident heavy-weight process that's probably bigger than dnsmasq. And for most of the time, it's dormant! For users already running lighttpd though, it's closer to a free ride.

For Option 2, you have to be in bed with ASUS which I would avoid. Also a pain to understand and change very legacy and heavily customised code for no merit. Not so fun if you want to give and take from your effort..

For Option 3, any big changes defeat the original purpose of pixelserv staying tiny and consuming as little resident RAM as possible...
 
  1. have pixelserv to handle some kind of server side scripting for you

It will work like this e.g. by calling
When pixelserv sees /cgi/, it will call a shell script (specified through an environment variable; a favoured shell can also be specified with another environment variable), and pass the rest of the URL after "cgi" to this shell script.

The content of the shell script fully under your control as well as the specification and interpretation of the URL after "cgi". So this shall give non-trivial flexibility in your hand based on your design of client side scripting, UI and other functionalities you plan to include as your project progresses.

I don't know the exact limit of URL length at the moment but from what I saw on ad url's passing a few KiB of data is no problem. Other downside is also obvious due to a primitive CGI like this..

If you decide to go with an option similar to this, let me know. I can offer to add such a facility into pixelserv-tls. Sooner or later I plan to add it anyway as I can think of many other uses of such a facility on a LAN/VPN environment without consuming any more resident RAM than it currently is :)
 
kvik

Great! Your Transmission integration into The router GUI is much better than mine! I didn't implement the file download progress bars.
 
@kvic do you know if transmission installed on the router could be redirected using policy rules with the vpn client? I have never installed it on the router because I was not sure I would be able to route through the VPN client.
 
kvik

Great! Your Transmission integration into The router GUI is much better than mine! I didn't implement the file download progress bars.

Interesting, I just read your other thread about you heavily customising your firmware. Seems some traits in us are alike! Nice, lol.

I also have been running on a custom kernel for a while. Recently started patching here and there. A recent count shows I've already changed 50 files. One day I might share the kernel with the community.
 

Latest threads

Sign Up For SNBForums Daily Digest

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