Jump to content

Bug when using uTorrent WebUI with Stunnel


phunkyfish

Recommended Posts

MAY have found a bug. If I click the settings button (Purple button with a tick on it) I get the preferences page as you would expect. But if I click ok the page redirects to the webui at my alternative listening port. Since I'm using stunnel this page is not retrieveable as it should go to the webui at the port stunnel is listening on...

Should the webui be pulling the port from the url instead of the alternative listening port on the settings page?

Link to comment
Share on other sites

I can reproduce this problem too using the apache proxy too. Must be a code error in the redirect of the webui.zip.

Found the problem. Utorrent verifies the current port used with the utorrent port (or the webui alternative listening port if enabled) and redirects to the latter if it differs. I think this is done in case you change the port in the settings however this means that tunnelers and proxiers will always get wrongfully redirected upon closing the preferences. The problem is this code in the script.js file:

if((this.settings["webui.enable_listen"].v=="1")&&(this.settings["webui.port"].v!=_b9)){
window.setTimeout("redirect('http://"+document.domain+":"+this.settings["webui.port"].v+"/gui/');",1000);
}else{
if((this.settings["webui.enable_listen"].v=="0")&&(this.settings["bind_port"].v!=_b9)){
window.setTimeout("redirect('http://"+document.domain+":"+this.settings["bind_port"].v+"/gui/');",1000);
}
}

Change it to this:

window.setTimeout("redirect('"+location.protocol+"//"+document.domain+":"+_b9+"/gui/');",1000);

This disables the function mentioned above but means when you change the port through the webui you will have to go to the new url urself (which hardly ever happens and which is a minor inconvenience imho). Also it forwards you to the current used protocol (http: or https:) instead of always forwarding you to http:.

(you can download a ready to use webui.zip here if u want)

[edit](Added the protocol function)[/edit]

Could someone test this webui.zip again?

Link to comment
Share on other sites

  • 2 weeks later...

Hi!

I've also encountered the same problem.

I've used Lord Alderaan's webui.zip and although the page redirects to the correct port it still doesn't work.

The problem is that the page redirects to http and not https.

I've replaced http with https on the code Lord Alderaan has suggested and it seems to be working fine.

I think that should work for everyone who's having the same problem.

Thanks!

Link to comment
Share on other sites

  • 1 month later...

Working like a charm. Thanks for the "hack".

Is possible to connect only based on certificates, like auto challenge/response? I was trying XCA and have no clue about certs. I generate one "generic" cert instead the stunnel's default and it's working. I'm tryng to autenticate only based on certificates, banning all clients who dont have the right cert.

Thanks in advance.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...