PDA

Bekijk de volledige versie : WebUi (utorrent)



Perkouw
15-12-2006, 11:35
http://forum.utorrent.com/viewtopic.php?id=14565


possible or not ? :(

n00ben
15-12-2006, 13:48
what is your question? if it is possible to host the web ui?

it is, but it will not be able to come in contact with utorrent, since you cannot run it.

/regards
Henrik

d3viant
15-12-2006, 18:56
That one may not work - but I am experimenting with a torrent client called transmission - it runs on the wl500 with a webUI script. Post on it here:

http://wl700g.info/showthread.php?t=6823&highlight=transmission

Perkouw
16-12-2006, 21:56
what is your question? if it is possible to host the web ui?

it is, but it will not be able to come in contact with utorrent, since you cannot run it.

/regards
Henrik

i thought this one would maybe work on the wl700gE somehow
but i just can't figure out HOW??!! :(

hope some smart ass guys here could make something of it :(

Can't wait to easy limit my upload & download speed

Regards,

Perkouw

d3viant
16-12-2006, 22:09
Perkouw - I have this transmission package working on my router using kfurge's firmware.

First setup the firmware as kfurge describes. Then use ipkg to install transmission and cron.

1. use vi to set up /opt/etc/transmission.conf in the way you want (upload, download limits, seeding, port, download location etc)
2. make sure the download directories you specified in transmission.conf exist and are writeable.
3. set cron to start with the router (put /opt/sbin/cron in your rc.local)
4. use vi to edit /opt/share/www/cgi-bin/transmission.cgi and /opt/sbin/transmission_watchdog - change the top line to read #!/opt/bin/bash instead of #!/bin/sh in both files.
5. add the following command to rc.local: /opt/sbin/syslogd -m 0 -O /opt/var/log/messages -S
6. add the following command to rc.local to start your webserver to remotely access the transmission control page: /apps/bin/thttpd -d /opt/share/www -c /cgi-bin/* -p 8008 -u root
7. reboot the router, then attempt to access the transmission page at http://192.168.1.1:8008/cgi-bin/transmission.cgi

Obviously replace 192.168.1.1 with whatever is needed in the case of your router.

GerardNL
19-12-2006, 22:52
Thanks to d3viant, I've gotten it partly working.

However, I didn't get the graph working yet.

One things is for certain: You'll need to install gnuplot (ipkg install gnuplot).

With that working I still get an error when I press the button "Log", I get this error:

"sed: Unsupported command w"

I've tried looking in the cgi file but don't see where sed is called with a "w" parameter.

I've also tried install the "sed" package, but didn't seem to resolve anything.

At the meantime, my router is downloading a torrent file. I hope it goes well.

lewislin
20-12-2006, 10:11
Hi d3viant,

I have followed your steps. but I can not get /apps/bin/thttpd running:
What I have seen after step 6 is

/apps/bin/thttpd: error while loading shared libraries: /apps/bin/thttpd: symbol nice, version GLIBC_2.0 not defined in file libc.so.6 with link time reference

if i used /opt/sbin/thttpd instead, I got this messages in step 7:

head: error while loading shared libraries: head: symbol vprintf, version GLIBC_2.0 not defined in file libc.so.6 with link time reference head: error while loading shared libraries: head: symbol vprintf, version GLIBC_2.0 not defined in file libc.so.6 with link time reference tail:

Any suggestion?
Thanks,
Lewis

d3viant
20-12-2006, 13:54
GerardNL: I havent managed to get the graph working either - I think the busybox version of sed is missing the required parameters for it...

lewislin: Have you made sure that your transmission.cgi and transmission_watchdog files have #!/opt/bin/bash at the top instead of #!/bin/sh?

GerardNL
21-12-2006, 23:10
Using Transmission now for about 3 days and finally completed a reasonably hot 700mb file. That's a lot slower then I would normally get (1 day or less).

One of the reasons for this is that the process somehow stops working. However, it's not just Transmission stopping. At the same time, I'm also running 1 enhanced-ctorrent process and that also stops working somewhere during the night. I need to yet figure out why these process stop working.

Anyways...

Now I have this one torrent completed and want to stop it... The first thing I've tried is to push it from Seeding to Done and visa versa (with the "push" button).

The "remove" button doesn't want to work since it says it only works on _suspended_ torrents. The "purge" button shows a different screen saying something about purging.

But via SMB I cannot remove any of the files. The only way to get rid of the torrent is to telnet into the router and and do the telnet commands. This is not really a big problem, but it would be nice if I didn't have to. It's much easier to use just SMB & Webbrowser.

I searched around a bit for some help on the Transmission program, but other then the build in "help" button, I haven't found anything that really explains the process.

Maybe someone found something?

Either way, this Transmission thing is getting in the direction of what I bought the particular router for: Doing off-line torrent downloading.

Maybe it's time to do a how-to-install page if people are interested?

d3viant
21-12-2006, 23:51
I believe that the transmission.cgi script works as detailed below:

transmission.cgi messes round with txt files in your torrent directory
transmission_watchdog is kicked off every 30minutes (or whatever you set your cronjob to)
transmission_watchdog looks at the txt files and decides what needs a transmissiond process running on it
if transmissiond isn't already running for a torrent, transmission_watchdog kicks one off for it

or something like that - the user "oleo" on this forum wrote that transmission script I think, so he would probably know it better :)

lewislin
22-12-2006, 00:44
Thanks d3viant,

Yes I double checked both files. I will keep trying.

Thanks,
Lewis

Perkouw
24-12-2006, 21:59
i just don't understand how you guy's do this :(
i only know how to upload a firmware (.nas file) on my router!!

hope someone can make a .nas file and with some easy uhh ''stuff'' on it !

like the WebUi!

d3viant
27-12-2006, 10:29
Perkouw - honestly it does get easier once you have played around with it a bit :)

The best thing for you to do if you are new to linux is probably to install it on a box if you have a spare one around (or you can use vmplayer with one of the custom images - I recommend the ubuntu image)

Then you have a chance to play around in linux without screwing up your router. Once you feel fairly confident with that, you can follow Kfurges instructions on how to get ssh/ipkg etc working on your router, and then login to it and follow my instructions in this thread to get transmission running on it

I am not sure right now if anyone is planning on releasing a fully customised firmware, the general consensus seems to be to just tweak it enough to let router owners customise them for their own needs.

MoD
27-12-2006, 11:30
I am not sure right now if anyone is planning on releasing a fully customised firmware...

I'm working on mine :) it should be more user fiendly. Unfortunatelly I'm very busy, so it goes slowly. I have created even web interface cutomization...

does anyone have expierence/knowledge about libjpeg library. There is a include directory with some *.h files. Why are they there?

IMM22
31-01-2007, 19:09
I´ve installed Transmission with a relative success using this tutorial.

The first problem encountered was this:
When é click in the LOG button I have this error:


sed: Unsupported command w

Creating graph...
"/shares/MYVOLUME1/MYSHARE1/Download/torrent//transfer.gnuplot", line 13: warning: Skipping unreadable file "/shares/MYVOLUME1/MYSHARE1/Download/torrent//transfer.data" "/shares/MYVOLUME1/MYSHARE1/Download/torrent//transfer.gnuplot", line 13: warning: Skipping unreadable file "/shares/MYVOLUME1/MYSHARE1/Download/torrent//transfer.data" "/shares/MYVOLUME1/MYSHARE1/Download/torrent//transfer.gnuplot", line 13: warning: Skipping unreadable file "/shares/MYVOLUME1/MYSHARE1/Download/torrent//transfer.data" "/shares/MYVOLUME1/MYSHARE1/Download/torrent//transfer.gnuplot", line 13: No data in plot

What does this mean?

The torrent seems to work fine.

oleo
31-01-2007, 19:22
Maybe your busybox on wl700g is not capable enough. Install coreutils or busybox package from Optware.

Wrong thread name.

umonster
01-02-2007, 19:30
i just don't understand how you guy's do this :(
i only know how to upload a firmware (.nas file) on my router!!

hope someone can make a .nas file and with some easy uhh ''stuff'' on it !

like the WebUi!


Ditto! I'm not a Linux guru, don't have an extra box or the time to learn, but it would be great if someone could build a fully usable firmware with a good torrent client. You will be richly rewarded in the afterlife :)

d3viant
02-03-2007, 23:38
One thing that I have found is torrentflux (http://www.torrentflux.com)

It's a php frontend torrent downloader/scheduler with an SQL database backend. This should in theory be workable on the wl-700. I have downloaded the tar.gz file but it's currently not working on a wl-700 with the openWRT firmware (same packages for the kfurge firmware so if I can get it going, then it should work for everyone)

Feel free to try it out and post back if you get it going! :)

kfurge
03-03-2007, 01:50
d3viant,

Interesting solution. How far have you gotten?

- K.C.

clausbruun
03-03-2007, 10:07
One thing that I have found is torrentflux (http://www.torrentflux.com)

It's a php frontend torrent downloader/scheduler with an SQL database backend. This should in theory be workable on the wl-700. I have downloaded the tar.gz file but it's currently not working on a wl-700 with the openWRT firmware (same packages for the kfurge firmware so if I can get it going, then it should work for everyone)

Feel free to try it out and post back if you get it going! :)

It looks very good :)

System Requirements

LINUX VERSION:
* Linux OS (most *nux)
* Apache with PHP module
* MySQL Database
* Python 2.2 or higher

Only thing that could be a problem is the Python req. ?

Im changing from kfurge firmware to openWRT this weekend and will for sure give this a spin, when that transition is done, will post back if i get it to work.

d3viant
03-03-2007, 10:55
d3viant,

Interesting solution. How far have you gotten?

- K.C.

It's almost running - I am trying to get it running on a lighter-weight solution (lighttpd with sqlite) Theres currently a few issues with the main page not loading (slight problem there :) )

I think it will work eventually though. I have been running it on my pc for a day or so and it seems quite nice. Download queueing, searching torrent sites directly from inside torrentflux, pausing, resuming and user management.

d3viant
03-03-2007, 12:52
Nice!

I got it running with lighttpd and mysql :D

mysqladmin doesn't work properly from the command line so you need phpmyadmin to manipulate your database.

1. You need to install the following from optware:


ipkg install php-fcgi php-mysql phpmyadmin python24 mysql

2. Move the /opt/var/www/phpmyadmin folder to your lighttpd/thttpd server root.

3. Ensure that mysqld and your webserver are running. Then go to your routers <ip>:<port>/phpmyadmin to get to the phpmyadmin centre. create a new table called torrentflux. when the table is created, select it and click the SQL tab at the top. copy and paste in the contents of mysql_torrentflux.sql into the box and click go. This will create all the required tables etc etc.

4. Put the html folder from the torrentflux download in the place you want it to be web-served from. (I have mine in a directory shared by samba and NFS as the downloads have to go to somewhere where your web browser has write permissions)

5. edit the config.php file in the html folder and make sure all the database stuff is right. (it should be if you called the database torrenflux when you created it). You should also change the line at the bottom of config.php that reads


$cfg["ip"] = $_SERVER['REMOTE_ADDR'];
to

$cfg["ip"] = '127.0.0.1';

This step may not be needed, but it definitely was for me.

6. check that it's working by going to the torrentflux index.php in a web browser

7. nohup is needed to get downloads to actually start. It's part of the coreutils package. do the following to install it:
edit /opt/var/lib/ipkg/optware and delete the line in the coreutils package section that says Conflicts:busybox-links

8. install coreutils with

ipkg -force-overwrite install coreutils

Enjoy! :)

EDIT: Looks like you need nohup aswell. steps 7 & 8 added to do this

sollie
03-03-2007, 21:25
Nice work.

Thanks.

sollie
03-03-2007, 22:36
Can you give some tips for installing mysql. I keep having errors when starting it.

Sollie.

d3viant
04-03-2007, 10:28
Can you give some tips for installing mysql. I keep having errors when starting it.

Sollie.


I just ran ipkg-opt install mysql php-mysql

That was enough for me (on the openWRT firmware)

On kfurge's one, you may need to go to /opt/lib/ipkg/info and change the postinst script for mysql to read #!/opt/bin/bash at the top. Then run that script again.

sollie
04-03-2007, 17:45
Questions d3viant,

1. Should i use openwrt?

2. Does torrentflux runs smoothly?

Sollie.

d3viant
04-03-2007, 20:00
Questions d3viant,

1. Should i use openwrt?

2. Does torrentflux runs smoothly?

Sollie.

1. you shouldn't have to use openWRT - it may provide a bit better in terms of performance than the ASUS modified firmware does, but everything you need is in the optware package set

2. from what I can see, it's running fairly smoothly for me. It's going quite slowly, but that may just be the particular torrent it's trying to download. (theres next to no load on the router at least)

d3viant
04-03-2007, 22:11
After a bit more testing, it works, but it's very SLOW

my uptime figures with 2 torrents going look like this:
load average: 5.83, 3.07, 1.30

Probably a bit on the high side :)

It may be better if we can get sqlite going with it. I had no luck myself with it, but it should technically work...


EDIT: ok, right now, it won't techinically work. We need a php-sqlite module - theres one for mysql, which makes the whole thing integrate properly. Does anyone know how to build the correct module for the router platform (mipsel IIRC)

Perkouw
11-03-2007, 12:54
awesome progress

however, i'm not able to do something like that
isn't it possible to make a ''firware'' that includes the torrent client or something like that ?

i hope i don't make you guys angry but i'm just not able to do things like that :O

Regards,

Perkouw

wirespot
11-03-2007, 15:26
Guys, I doubt there's going to be a firmware with torrent support on it. The firmware is for more important, essential things. Dependencies have to be kept to a minimum. Torrent support would require a lot of dependencies, all of which are supplied in the extended packages. It's just not reasonable to ask for it in the firmware.

For those who tried torrentflux: there's a fork called torrentflux-b4rt. It can use sqlite and it's relatively easy to install if you provide the requirements (web server, optional fast-cgi, php, sqlite, python) -- just call /setup.php in the browser when you're done installing those. It's somewhat better than torrentflux+mysql, I suspect it would be even better if you limit the number of connections per torrent to about 50. It's still a hog but you may be able to get it down to loads of only 1.5-2.0 with 2-3 torrents going. Here's how to install it. (http://wl500g.info/showthread.php?p=49459#post49459)

d3viant
12-03-2007, 14:15
The standard torrentflux supports sqlite as well apparently. The main problem right now is that there isnt a php-sqlite extension available for the wl-700ge. I will try torrentflux-b4rt tonight and see if it needs this extension (I suspect it probably will)

wirespot
12-03-2007, 14:25
It can use it, but can use MySQL too. See the thread I mentioned above, someone else figured how to enable sqlite for PHP out of Oleg's packages.

kfurge
12-03-2007, 16:58
Guys, I doubt there's going to be a firmware with torrent support on it. The firmware is for more important, essential things. Dependencies have to be kept to a minimum. Torrent support would require a lot of dependencies, all of which are supplied in the extended packages. It's just not reasonable to ask for it in the firmware.

I completely concur with this position. I know it's easier to just flash the device and *poof* it suddenly has additional features, but everyone has a different set of "requirements" for their box. There's fundamentally no way to have a one-size-fits-all flash image that'll satisfy everyone.

Additionally, I would argue that following a step-by-step recipe is only marginally more difficult than flashing an image.

To that end, I think we should start gathering our collective know-how into a series of best practice how-to's that can help get from stock firmware to a huge variety of endpoints. Each how-to would solve a particular problem.

I'm willing to write the how-to on how to upgrading the stock firmware and get a decent environment running on it. I'd consider it Rev-2 of the current web page instructions, with more detail, a prettier layout, and additional instructions on creating a fully functional base system.

From that, we could add additional items. I see a number of good topics already:

1. Better torrent support (there will probably be many of these)
2. Creating a self-hosting environment; compiling directly on the box
3. Better integration into a Mac network
4. Enabling ssh from the outside
5. Enhancing the firmware without reflashing (via mount -o bind)
6. ...

These forums are not the best place to host such things. I think we need a wiki to do this right. Any suggestions?

- K.C.

wirespot
12-03-2007, 17:51
Apparently there's one at http://wiki.wl500g.info :) It just seems terribly disorganized at the moment.

back2basic
12-03-2007, 18:22
These forums are not the best place to host such things. I think we need a wiki to do this right. Any suggestions?

- K.C.


I have space left on my webserver about 10 GB :) I can set up another book where you guys can discribe the custom firmware.

It now runs on my wl700 because my webserver was fucked up and had to give it a format. Tonight when I'm home from work(23:00u CET) I'm gonne patch it over to my badass webserver and the page should run at full speed.

take a look http://wl700g.homelinux.net/drupal/
Let me now what you think of it then I'll set up a bookpage for you guys
(drupal bookpages can be editted by registerd user just like a wiki. I think drupal looks nicer)

Grtz

Ron