Jump to content

Multi-user Webui-Shell


Lord Alderaan

Recommended Posts

  • Replies 540
  • Created
  • Last Reply

Sorry to keep bothering, but thanks for the quick replies.

I seem to be able to login in and even create users, but doesn't really seem to be doing anything.

I put the webui folder inside my www folder right? But then do I set the '$cfg['settings_dir'] to the gui in the www or to the C:/utorrent folder made by vine?

Edit: Oh btw.. I had to name my shell folder gui because when I logged it it would redirect to /gui and it couldnt find anything.

So maybe I need to change a filename or config?

Link to comment
Share on other sites

You create a new folder somewhere OUTSIDE the webserver where the Webui_shell can store its settings (mainly the users database). Then you fill in the path to that folder as $cfg['settings_dir']. It is just the location where the shell will store settings and shouldn't refer to any already existing dir of utorrent or the webui or whatever.

[edit]You are not following the readme correctly. You do NOT rename the webui_shell folder to gui. You make a rewrite rule for gui that refers to the index.php in the webui_shell folder:

RewriteRule ^/gui/?(.*)$ /webui_shell/index.php?shell_file=$1 [QSA]

Without this the shell will not work. (ergo renaming the webui_shell to gui will not work.)

Link to comment
Share on other sites

Just thought I'd post about my success with this Multi-user webui shell.

I recently replaced two energy hog servers in the basement with a single Windows Home Server box. I wanted to be able to proxy to uTorrent from a subdirectory on a website on this machine, like I had been doing on the old server in Apache.

But since WHS requires IIS, and the remote access parts need port 80 to go to the WHS machine, I had to do it in IIS.

Before finding this WebUI, I had sucessfully found a free URLRewriter/URLProxy for IIS from Managed Fusion:

http://www.managedfusion.com/products/url-rewriter/

...and was using it to proxy "/tivo" to my TivoWebPlus and "/switchboard" to my xAP Switchboard (Caller ID) but could not seem to get "/uTorrent" or "/gui" to reverse proxy to the WebUI.

But installing this shell gave me what I wanted...

I didn't want to install ANOTHER rewriting application, so I chose to just use the Managed Fusion one instead of the recommended one, but it works fine.

Ans I had to add "<?php" to the beginning of main.php in /inc/admin, as explained in a previous post by LA. But other than that, it all appears to work as expected.

Thanks for the great shell to the WebUI.

Bushman

Link to comment
Share on other sites

The webui shell replaces (on the fly) all instances of /gui/ in the webui files with what you set as $cfg['altname'] and that's why it works and your previous setups didn't.

If you really want you could edit the files in the webui.zip yourself and manually replace all instances /gui/ with /uTorrent/ and it should work too without needing this shell. :)

And indeed a lot of other rewriters should work with the Webui Shell too. Although there might be some that won't.

Link to comment
Share on other sites

I understand that the webui would have to be proxied to "/gui" on the web server, but unfortunately, the managedfusion rewriter/proxy handles all proxies as just a type of rewrite... on Apache, the two commands:

ProxyPass

ProxyPassReverse

...are enough to handle all of the proxying, but with the managedfusion rewriter/proxy (the only FREE IIS reverse proxy I could find) proxying is handled as an extension of the RewriteRule command, like so:

RewriteRule ^/tivo/(.*) http://192.168.64.251/$1 [P]

(note the [P] at the end)

...and there is no functionality for ProxyPassReverse. I could not seem to craft rules correctly to proxy the gui correctly for reditects and subelements.

Anyway, thanks again, your shell solved my problem

Bushman

Link to comment
Share on other sites

  • 2 weeks later...

so, lord, great work, i see u have migrated to adodb finally :)

i will only write my modifications:

a) i do not want user to have that thiny settings thing above gui - so i replaced file contents inc/user/main.php, that only 1 iframe is located there. new contents:

<html><head><title>µTorrent Webui</title><style>body, html,iframe {margin:0;padding:0;height:100%;width:100%;border:0;}</style></head>
<iframe src="index.html" name="bianca" noresize="noresize" scrolling="no">
</html>

B) i have many sites, projects on my local server, so i just wanted to have a simple "gui" map on root of my web server, that is also reachable via "localhost/gui" address in my computer, so what i did was:

1. renamed shell's folder to gui
2. modified (i am using apache) .htaccess file's contents:
#for gui shell:
RewriteEngine On
RewriteBase /gui
RewriteRule ^(.*)$ index.php?shell_file=$1 [QSA]

i hope it helps to anyone!

Link to comment
Share on other sites

Hey looka. Nice changes.

I was thinking about making an option for a) myself in the admin panel. Per user. I might do this for 0.5.0.

I decided against using .htaccess files in the first place because iirc a lot of default configs have allowing .htaccess files off by default. I figured if you need to edit the config to enable the rewriter (and enabling AllowOverride) you might as well put the rewriter lines themselves in there too. This way I don't force people to enable AllowOverride if they don't really want to (or explain how they could enable it only for /gui) and I prevent them from having to edit the .htaccess file if they want to change the url to something else then /gui. But I still have the idea of using .htaccess files in my head. Maybe if I ever make an installer.

Another idea I had was writing a branch that uses the webui.zip with only key files replaced with php versions and then use .htaccess files to make sure those files are parsed by php. This would remove the need for the rewriter altogether. The drawbacks are again dependency on allowing .htaccess files, the need to update the webui shell whenever the webui is updated (which I try to avoid) and making custom/edited webui alternatives complex to install.

Progress report on 0.5.0: I'm rewriting the admin panel atm and I don't have that much time.

Link to comment
Share on other sites

  • 3 weeks later...

I just released 0.5.0

Lots of new changes. Plus a fix for a major mysql bug (I'm suprised nobody ran into it). See OP for changes.

To upgrade from 0.4.x: Download the new rar and extract the files in it. Overwrite all the old webui_shell files with the new ones except for your config.php.

There are a few new optional config settings you might want to add.

To do this open your current config.php and add the following lines below the line that starts with $cfg['md5pass']:

$cfg['bf_max'] = 10; // BruteForce protection: Max number of login attempts 
$cfg['bf_age'] = 600; // BruteForce protection: Time to remember login attempts. (After this time the counter is reset to zero)
$cfg['max_execution_time'] = 90; // Increase the maximum execution time in case of page timeout errors.

See readme for more information about these options.

Important:

Required: Now login to the admin panel and open the options section of each user. (See the readme for a manual of the new admin panel)

If you want to start using quotas:

Login as a user of each instance (to update the main torrentlist of each instance with torrent sizes).

Then log into the admin panel and open the torrent section of each user (to update the torrent sizes of that user using the main torrentlist).

I'm sure we'll have bugs in this version as again a lot was changed.

And again feedback, suggestions, etc are more then welcome.

Link to comment
Share on other sites

hmmm nothing. could be that i have everything in another directory (gui)?

something with cookies? i have deleted cookies, but still wont log me out:)

when i first time went to the page, a login window waited. then i entered user and go directly to gui. oabviously, something has to do with remembering IP - because my ie7 also wanted to go directly to gui, instead of letting me in into the admin panel...

Link to comment
Share on other sites

That is weird.

It's working perfectly here and I've tested Fx3, IE7, IE8, Chrome, Safari and Opera.

Also the logout code didn't change.

Are you sure no user has Enable_IP_Auth enabled. Because that didn't work before and is fixed in 0.5.0 and that would explain you logging back in automatically. And this sounds exactly like you're auto logging in using IP login.

If IP auth is enabled there is four things you can do:

1) Open the webui shell admin panel from another computer.

2) Comment out line 162 in index.php starts with $login=$database->login(

3) Check/edit the database directly (you need sqlitebrowser 2.0 or mysql administrator).

4) Login using post/get is checked before IP login is checked so you could try the following:

Close Fx3

Start Fx3.

Enter the following url:

http://localhost/gui/?shell_login=username&shell_pw=password

Use the admin username and password from config.php

The / between gui and ? is important. Don't forget it.

Replace localhost with ip/host if you don't run locally.

That url only works the first time you visit the gui. Once you get a session there is no way to login. Clear cookies or restart firefox before trying agian.

Link to comment
Share on other sites

i am getting this error the whole time:

{"build":0,"error":"SHELL: Configuration Error: Wrong login details."}

login and password matches to the one i gave it

so i tried making another instance and then a new user, same error

i am running FF3 and i even tried (yes i know) Safari on my dad's iPhone

nothing worked

btw: this is what i am getting at the Fails menu:

Configuration error: This user has no valid instance. shell_file=mootools.js Typhoon

Configuration error: This user has no valid instance. shell_file=index.html Typhoon

Link to comment
Share on other sites

in config file, you provide password to control panel of shell.

then - are you sure you have created instance to running utorrent? usually, this is localhost and some port, with user and pass that have admin rights to access it via gui.

then you assign this instance to user(s)

Link to comment
Share on other sites

When logging in as a user I see {"build":0,"error":"SHELL: Configuration Error: Wrong login details."}

This happens when the Webui Shell reached µtorrent+webui but the login information was rejected.

Make sure the username and password of that user's instance are correct.

Goto the admin panel, instances, and make sure the username and password of the instance in question is correct.

If you get Configuration error: This user has no valid instance. then you didn't set an instance for that user in the User Panel.

As for a guide:

http://cdlist.mine.nu/dump/webui_shell_readme.txt and scroll down to the the section about the Admin Panel and start reading carefully. If there is still anything you don't understand feel free to ask.

Link to comment
Share on other sites

@bushman4: Can you explain your settings and rules more detailed please? I am using WHS too but have that Ionic Rewriter installed which does not satisfy all my needs.

When reverse proxying on my IIS6 I get the following error, 404 not found:

http://www.mydomain.com:80/utorrent/?token=BmgrY3_asJU9nT8AcZf2qf69bEzOx5WB7_iBJ3h-5PAKiA9LDFCNIXSSzkk=&action=getsettings&list=1&t=1238274668314

Any ideas?

Thanks in advance.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...