• home
  • philips dvp-5960
  • guides and links
  • downloads
fish

uTorrent Firefox extension with HTTPS support

This page is just a location for a modified version of the uTorrent Firefox extension with built in support for HTTPS.

The original version without HTTPS support can be found here

This extension is the same as the original version except it simply has a "UseHTTPS" checkbox in the Options Dialog...

Download utorrentextWithHTTPS-0.1.5.xpi

If whoever is in charge of the extension wants to add the mods into the actual extension that would be great...

The checkbox in the Options dialog has a number of dots after you click on it. Have no idea why!

Changes:

  • Added a "UseHTTPS" checkbox to the options dialog.
  • Added a new function "gUTorrentPrefs.getConnectionType()" which returns "http" or "https" depending on whether or not the the checkbox is ticked.

For those who wish to know here are the changes I made:

Code:

uTorrentStatus.js
-----------------

request.open("GET", "http://" + gUTorrentPrefs.serverAddress() + ":" + gUTorrentPrefs.serverPort() + "/gui/?list=1", true, gUTorrentPrefs.adminUsername(), gUTorrentPrefs.adminPassword());


to

request.open("GET", gUTorrentPrefs.getConnectionType() + "://" + gUTorrentPrefs.serverAddress() + ":" + gUTorrentPrefs.serverPort() + "/gui/?list=1", true, gUTorrentPrefs.adminUsername(), gUTorrentPrefs.adminPassword());

dragObserver.js
---------------

request.open("POST", "http://" + gUTorrentPrefs.serverAddress() + ":" + gUTorrentPrefs.serverPort() + "/gui/?action=add-file", true, gUTorrentPrefs.adminUsername(), gUTorrentPrefs.adminPassword());

to

request.open("POST", gUTorrentPrefs.getConnectionType() + "://" + gUTorrentPrefs.serverAddress() + ":" + gUTorrentPrefs.serverPort() + "/gui/?action=add-file", true, gUTorrentPrefs.adminUsername(), gUTorrentPrefs.adminPassword());


uTorrentSidebar.xul
-------------------

var uri = "http://" + gUTorrentPrefs.serverAddress() + ":" + gUTorrentPrefs.serverPort() + "/gui/";

to

var uri = gUTorrentPrefs.getConnectionType() + "://" + gUTorrentPrefs.serverAddress() + ":" + gUTorrentPrefs.serverPort() + "/gui/";

prefs.js
-------

serverPort: function() { return this.prefs.getIntPref("uTorrent.serverPort"); },

added the following below the above line

useHTTPS: function() { return this.prefs.getBoolPref("uTorrent.useHTTPS"); },
getConnectionType: function() { return (this.prefs.getBoolPref("uTorrent.useHTTPS")) ? "https" : "http"; },

options.xul
----------

<preference id="serverPort" name="uTorrent.serverPort" type="int"/>

added the following below the above line

<preference id="useHTTPS" name="uTorrent.useHTTPS" type="bool"/>

AND

<row>
<label value="Server port" control="txtServerPort"/>
<textbox id="txtServerPort" flex="1" type="number" preference="serverPort"/>
</row>

added the following lines below the lines above

<row>
<label value="Use HTTPS" control="boolUseHTTPS"/>
<checkbox id="boolUseHTTPS" flex="1" preference="useHTTPS"/>
</row>


I finally got around to integrating your changes into utorrent. The latest version (0.1.6) is on my site now. Thanks for the contribution.

Jan 24, 02:58 AM #
by Alastair Patrick

Leave A Comment!

 

Copyright © 2008 - Phunkyfish.com | Hilary Quinn Web Design