Jump to content

uTorrent Regulator


Recommended Posts


About the application

This application can regulate the Global upload and download speeds of uTorrent on the basis of Network based, Process based and/or Time based rules. Any one or all three features may be used.

I. uTorrent Regulator acts as a regulatory mechanism in each network computer to increase or decrease the global download and upload limits of uTorrent on the basis of the number of computers connected to the network. It scans the network at periodic intervals to check for any changes in the number of connected network computers.It connects to the uTorrent Regulator on other computers on the network and displays details of uTorrent state and regulation.

II. Even if network regulation is not desired, uTorrent Regulator can also regulate Global speeds on the basis of active processes (other applications) on the computer. For example, users can pause or reduce the speeds of the active downloads in uTorrent temporarily during web browsing. They just have to specify the process name of the application (web browser) which uTorrent Regulator will monitor.

III. uTorrent Regulator can regulate Global speeds for specified time intervals.

IV. Rules can be created for Process based and Time based regulation. Active torrents can be paused or speeds can be reduced to specified values.



Suggestions and comments will be highly appreciated.

You can also mail me at jamytechlab@gmail.com

Token authentication is supported and must be enabled.


1. Starts with system startup with an icon in the notification area.

2. If Network regulation is enabled:

a) Periodically checks if uTorrent is active in the computer, scans and displays all the network computers, regulates the global download limits of uTorrent on the basis of Network based, Process based or Time based regulation.

B) Periodically Connects to the uTorrent Regulator on other computers on the network and displays details of uTorrent state and regulation (to check for any discrepancies).

c) Network devices scan options – User can specify the IP addresses which have to be queried for presence of network computers. You may choose to scan within a range or scan for specific IP addresses. You may also set scan exclusions within the range.

d) Differential Limiting (optional) – allows for better management of bandwidth in situations where all the network users are not using uTorrent (e.g. only web browsing). In such cases it may be desired that only a small bandwidth sufficient for web browsing be made available to such users and the remainder distributed among the uTorrent users.

3. Regulation of uTorrent can be done on the basis of any active Program or on the basis of a specified time interval whichever is enabled.

Three types of rules can be specified which is followed when an application launches or when the time interval starts:

1. All active torrents may be paused.

2. Reduce the Global speeds by a specified value.

3. Reduce the Global speeds to a specified value.

4. Program log file (optional) - for tracking regulatory activity. This is extremely useful in keeping a record of changes to the uTorrent limits and also status of Network computers along with time and date.

5. The new version 1.5 allows display of a Mini Web User Interface of uTorrent. This can be configured to display Mini Web UI for uTorrent running on your network computers as well. Using the Mini UI users can display current torrents and download details. Users can also start, pause, resume, remove or add torrents, and modify certain uTorrent preferences even for uTorrent running on computers in the home network.




Suggestions and comments will be highly appreciated.


Link to comment
Share on other sites

  • 1 month later...

New version 1.5 uploaded.


Version 1.5 - Released 05-July-11

1) Improved: GUI design and colors.

2) Feature : Option to change the regulation enforcement frequency

3) Feature : Mini Web UI display of uTorrent running on self or a network computer

4) Fixed : Minor unresponsiveness during regulation enforcement

5) Improved: Differential limiting - Added more settings including System Idle check

6) Fixed : Differential limiting delayed regulation enforcements.

7) Fixed : sometimes sends blank fields to Network PC scan lists.

8) Improved: Now displays number of Torrents as downloading (D), Seeding (S) or paused (P).

9) Minor Bugfixes.

Thanks to all the users who have mailed me or commented on this forum post for their suggestions.

Further comments on any bugs or suggestions would be highly appreciated.

Link to comment
Share on other sites

  • 1 month later...


This is the thing I am looking for, much appreciated your development, thank you very much!


Unfortunately, I'm using Win7 x64, and the installer says it cannot be installed on x64 systems (Xp, Vista, Win7). Why is that? Win7 x64 is able to run x86 apps, isn't it? :S



Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

edit: lower limit means stricter limit

Example: 20K limit is lower than 40K limit.

Hello Jamy,

I was plannig to write a program in .NET 3.5 using tombull's API (http://test.utorrent.com/forum/viewtopic.php?id=50687) similar to Regulator, I did not start it yet, then I found your program. So I have installed your program and tested it. I found some semantic bugs, I have some questions, and I have some feature ideas.

Things that I don't understand:

- Why Regulator generates the WebUI password and tells me what port I have to use? What if that port is already used by an other program, and I can't change it becouse it is hardcoded in it.

The advanced options is protected with password anyway, so why can't I use the password and port what I have chosen in uTorrent's WebUI preferences?

- This also goes for the username. User Guide PDF says it must be the same on all PCs. Why?

- I can't configure my upload bandwith, only the download bandwith.

I set my download bandwith is max 600K, and I set up differentiate limiting (for the purpose if another person is using the LAN, I don't want her/him to suffer from long webpage load times (yes, I use bandwidth management (AKA uTP), but it doesn't solve the problem).

I set up the allocated "browsing" bandwith for 100K, and then it limit's uTorrent's download for 500K. It's OK and working, BUT: it limits uTorrent's UPLOAD speed for 500K too but my internet connection's max upload speed is 60K!! So basically the upload will be unlimited, it saturates the line and can't send the ACK packets rapidly enough, and download speed drops significantly.

So there should be preferences for upload speed too, as the same as for download speed.

- User Guide PDF says:

"Your Internet bandwith - this is the maximum total download speed of internet connection of the network KB/sec (Kilobytes/sec). Generally it is 1/8th of your connection Bandwith."

(I also want to note here that I had to type this becouse I can't copy from the PDF, and it is really disturbing. I can open it in Advanced PDF password recovery anyway and remove the SECURE restrictions ("user password is empty, so instant decrypting possible"). I can open it then in Abyy Fine Reader and convert it to .doc, so it's only good for make a PDF inconveninent, particularly if it's a readme.)

I absulutely don't get it. What do you mean?? Why only 1/8? If I have an internet connection what has 5 Megabits/sec download bandwidth, then I have 5 Mbit/s download bandwith, not 5/8 Mbit/s.

Are yout trying to explain Kilobit to KiloByte conversion? Becouse then you have to divide by 8, that's true. But it would be simplier to write something like this: This option needs the input in KiloBytes/second.

You wrote "generally". It's not generally. 1 byte is ALWAYS 8 bits.

(OK, there were "ancient" times when 7 bit was 1 byte, but it was a long time ago :) )

- The scan is limited to 10 PCs. Why?

Features that would make this program much more better, and usable for more people:

- You should redesign the GUI, becouse the actual one is a real mess.

The color pickings aren't lucky neither :)

- If screensaver is on in a PC, then obviously not browsing there anybody, so that allocated bandwith for browsing should be disabled for that PC.

Related request:


- Make that allocated "browsing" bandwith to every PC. So if there is only one PC which is turned on, screensaver not running, and uTorrent is not running on it neither, then allocated bandwith for browsing should be 50K, and if there are 2 PCs like this, then 100K and so on. So the more PCs are running, the more allocated browsing bandwith they would have. Maybe there should be a starting 50K for generic traffic which is not uTorrent (browsing, skype, games, etc) and then +25K for every single PC on the LAN which turned on and etc. what I wrote before.

- Option to lower the limits automatically if a given process starts (of course it would be possible to give more than one process), and set the limits back to original if the process exists. This would be good for gamers for example.

The user could not set the limit higher than the regulator's limit, only to lower (stricter).

There should be three way for this: lower by x kilobytes or lower to x kilobytes, pause all torrents.

(Make sure if the result is 0, then pause all torrents, rather than set the limits to unlimited.)

Related request:


Other creative requests:

- pause all torrents for x minutes (or set stricter limit)


- better scheduler


- transfer cap + scheduler


- this should not take much time to implement


And another approach, what should be considered:


It generated a heated debate, and this would solve the problem when high upload takes away the bandwith from download. (I know uTP trying to do this, but with not much success.) I often experience that if I lower the upload speed, then download speed is start to rise. The program should do it automatically. Maybe this is becouse of the so much overhead generated by uTP, or I don't konw.

It need a lot of testing and a huge ammount of statistical data, to write an algorithm to calculate the limits based on the recent ping times, and on the actual download and upload speeds.

I think there should be a minimum down/upload speed limit, start from here, if ping times are OK, then rise the limits until they are not.

This solves the problem if another PC on the LAN is downloading stuff too, and pulling down the speeds in uTorrent, becouse it can't pull down lower than the minimum.

Maybe this approach is a dead end, but after all of the features above are implemented, then maybe it worth a try.

And this is what regulator for:




I believe a lot of people would use this program if all these features were supported.


If I go to specify IP adresses and then press Cancel or Apply in the new window, then it duplicates the whole list.

By the way there is an integrated method in the .NET framework to check an IP address is it valid or not. You can use like this:

public bool IsAddressValid(string addrString)


IPAddress address;

return IPAddress.TryParse(addrString, out address);


Link to comment
Share on other sites

Hello karogyoker,

OOOhhh....your post really scared me on first look!! :D

Well, I thank you for taking time out in putting up all that and would take your criticism and suggestions positively.

Things that you dont understand...

1. uTorrent Regulator generates its own port and password for you. Same goes for the common username. Here's why...

uTorrent Regulator has a BASIC feature to display the limits set on other network computers. For that it uses WEBUI to connect and retrieve the limits from uTorrent on the network computers. For that it needs to know the port, password, username of uTorrent on each network computer. If we go by your wish, network users would have to specify not only the port, password, username for their own uTorrent clients but also for each and every uTorrent client which may connect to the network. So basically this means everyone on the network has to be told the port, password, username for every other network computer. The End result... any one on the network can access any other uTorrent client using a simple web browser using the WEB API...without the knowledge of actual owner of the uTorrent client. How will you tackle this BIG privacy and Security issue??

The only solution I could think of for this (I would welcome if you have a better idea) is that let the software generate these parameters for individual network computers using an algorithm unique for every computer. This way the software can calculate these parameters for network computers also because it knows the algorithm. The network users are kept in the dark and privacy and security is secured. I don't mind and would appreciate if you have a better idea.

Now you can provide your own port and password. uTorrent regulator communicates directly with other regulators through client-server communication.

2. You cant configure the upload bandwidth.

I have ACCEPTED this suggestion. I would really try to include this feature in the next release. Thanks for your suggestion.

Upload bandwidth can now be configured.

3. User guide language.

Yes, I was trying to explain Kilobit to KiloByte conversion. I am really sorry for the difficult language and use of words like 'generally'. Please forgive me. The user guide was prepared in a hurry and may not be perfect. I will improve upon this. (And ya, i like irritating people with secured pdf.. :P)

Edited the user guide.

4. The scan is limited to 10 PC's

Its easy to ping a hundred computers. But this software individually connects to every network computer's uTorrent client to retrieve the limits. For presence or absence of every computer there are some possibilities and thus there are additional lines of code. So it is just a matter of time before i add more computers, but at present there are other improvements to care for. Besides, 10 network computers is quite a good network of PCs and I am not developing for corporates. :)

There is no limit on number of computers on network.

Features that you suggested...

1. GUI

This is not a big concern. I am not a good artist. But I accept your criticism and would look into it.

Improved GUI in subsequent versions.

2. Tackling the idle network computer (no utorrent, no browsing)

This concern is already under consideration. Differential limiting is a new feature. I wasn't even sure if it would help in the right way. Please give me time to work on it more. There are a lot of possibilities and a lot of hurdles. This feature will mature with future versions.

Implemented in the new version 1.5 to be released soon.

3. Lower the bandwidth if a process starts.

This feature is already under consideration. You will see it in the new version. Thanks for your suggestion of three way options.

Already implemented.

'Specify IP address' bug

Thanks. I will look into this. I already know how to validate an IP address in .net


You said 'some semantic bugs', but you mentioned only one..

Thanks for all the links to those forum requests. I will look into them.

I thank you again for all your ideas. I will definitely work on these.

By the way, my work on this project may be slow, but it is steady. This is because I am just a part time developer. I am not professionally related to computers in any way and this software is the product of my immense fascination for computers and .Net (i have taught myself at home). I have to take time out from my patients, my family, my studies for this hobby.

So all I request is your patience till all these ideas become a reality.

I hope I have been clear enough on this post.

Thank you.

Link to comment
Share on other sites

Hello Jamy,

1. uTorrent Regulator first try to connect to another uTorrent Regulator. If it's possible, then it requests the settings on it. Then the uTorrent Regulator on the other computer looks into its configuration, looks up the user/password and the port for it's localhost WebUI (by the way it is already did it when it started), gets the current upload and download limit, and sends it back to the requester computer.

It can be good for another reason: not only for checking the actual limits, but checking the other uTorrent Regulator settings too, so if there are any inconsistency in the options which "must be the same on all computer", then it can alert the user, and it can syncronize the options too.

4. Additional lines of code? Why? For example, you don't have to create timers manually, or anything manually. If you want to do something 100 times you don't have to write 100 lines of code, rather you write a for loop.

Example: Form1.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace timers
internal class TickData
public int SomeData { get; set; }
public string MoreData { get; set; }

public partial class Form1 : Form
public Form1()

List<Timer> timers = new List<Timer>();

timers.Add(new Timer()
Enabled = true,
Interval = 1000,
Tag = new TickData()
SomeData = 20,
MoreData = "foo"

timers.Add(new Timer() { Enabled = true, Interval = 2000, Tag = new TickData() { SomeData = 30, MoreData = "bar" } });

foreach (Timer timer in timers)
timer.Tick += new EventHandler(Form1_Tick);

void Form1_Tick(object sender, EventArgs e)
TickData td = ((sender as Timer).Tag as TickData);
this.Text = td.SomeData + td.MoreData;

You can almost generate everything in runtime, even source code lines, and compile it in runtime! :D

If not this is the problem with the scan limit, then I didn't get it what it is.

Another thing:

Since .NET is multi platform (at least in theory :) ), the program could be run under the Mono framework and therefore on linux and OSX.

But you invoked Windows API DLLs and used the WebBrowser class which is not implemented in Mono, so it won't be possible to run under Mono.

But this is just a note, to rewrite these things shlould take a lot of time, so this is low priority now, I guess.

Best regards,


Link to comment
Share on other sites

Hello Karogyoker,

1. Yes. I forgot to mention, this idea occured to me few months back. You are thinking right. This is the only safe alternative. I have been perfecting my skills on Client-server network communication for many days. But since i needed a quick solution for my uTorrent bandwidth problems, I have skipped its implementation in these first few versions of uTorrent Regulator.

No doubt, this is the future of uTorrent Regulator and I am working on it. I am expecting a new release within this month. If things go well this idea may also forever replace the old methodology. But I have to take care of all kinds of network hitches which may occur before this becomes a reality.

Feature Implemented

4. I already know :) and in fact I have used loops in my program. There were some other troubles which I dont quite remember now (maybe in certain sections of code a loop was not successful). But I am going to work on it. Thanks.


Regarding multi-platform, I would first like to achieve a certain level of perfection in the software before I can think of that. :)


Link to comment
Share on other sites

  • 2 weeks later...

Hello Jamy,

Your program detects the wrong adapter. It detects one of my virtual adapters and then the wrong local IP.

I recommend using the SharpPcap dll so it will be platform independant, and much faster.

Here is how you can do stuff in it: (you need .net 4.0 to compile this (or the newest Mono))

IPAddress defaultGateway = null;
Ping pinger = new Ping();
var reply =
pinger.Send("google.com", 4000, Encoding.ASCII.GetBytes("a"), new PingOptions(1, true));
defaultGateway = reply.Address;

if (defaultGateway == null)
throw new Exception(reply.Status.ToString());

var defaultDevice = (from device in LivePcapDeviceList.Instance
where device.Interface.GatewayAddress != null &&
select device).FirstOrDefault();

ARP arp = new ARP(defaultDevice.Name);
arp.LocalIP =
new IPAddress(defaultDevice.Interface.Addresses[0].Addr.ipAddress.GetAddressBytes());
IPAddress ip = IPAddress.Parse("");
Stopwatch sw = new Stopwatch();
var task = Task<PhysicalAddress>.Factory.StartNew(() => arp.Resolve(ip));
PhysicalAddress mac = task.IsCompleted ? task.Result : PhysicalAddress.None;

It is just a simple sample how to determine the right adapter and then check for a host by ARP request, but it's a good starting point to use it in your program.

here you can download the dll, add to references, and then

using SharpPcap;

using PacketDotNet;

Maybe you should add the PacketDotNet dll too, but maybe you won't need that.



var task = Task<PhysicalAddress>.Factory.StartNew(() => arp.Resolve(ip));

Don't put this into a loop, rather make a method, becouse this lambda method's arguments are not passed by parameters rather it is using the local variables in it's scope.

Or change the lambda method to take parameters. It is running on a separate thread so be careful with the variables.


Why the options needs a username? You can't create new users so it's totally useless to type it every time when you want to access the options.

The password field is enough.


There should be a default port for the regulator. Don't confuse the user with too much options, a default port is enough for 99% of the cases. If the user wants to change it then let it be. But then is it needed to change it on the other computers? I didn't tested it but it is just a tought.


Much better GUI, I like it, but:

The GUI freezes often (not responding).

Make sure you do everything not GUI related (scanning, communications with other regulators, WebUI etc.) in a separate thread (with background worker, Task Parallel Library etc..)

I can't use the regulator, it always use 99% of my cpu and I am unable to use it (not responding), maybe becouse I have more than 300 torrents.

Link to comment
Share on other sites

Hello karogyoker,

The computers on my network are doing fine with this version. I guess i can say that there are no minor hitches in the application.

I see your problems are highly specific, which of course i couldn't detect (none of my computers use virtual adaptors or 300 torrents!!!!).

1. Wrong adaptor detection. I wonder why you didn't have this problem with the earlier versions? Because I have not even touched that part of the code...

Regarding your suggestion, I have developed in .net 3.5 so far. I am not sure how soon this can be done...But I will keep your suggestion in my mind.

2. Yes, the port for regulator communication needs to be common to all the network computers. This is the only easier and better alternative to specifying individual port for each possible network computer in the advanced settings. Because this is the port on which regulator listens for requests from other regulators. Every regulator on the network must know on what port the other regulators are listening.

3. The communications are already done on a separate thread. (both requests and responses to other regulators).

I don't exactly know why the GUI is freezing in your case. The only reason I can guess is the number of torrents (300!).

Yes the web ui is on the same thread (but i strongly feel it shouldn't have caused the problem). The application parses the torrent list html document retrieved by WEB API to calculate number of paused or active torrents. Then there is another api call for regulation and another to retrieve the final global limits. But this still does not explain 99% cpu usage and freezing as in your case because i dont think parsing and counting 300 extra lines of plain text would do that.

I will think about this. Maybe you could throw some more light..

Web API calls are now made on separate thread in new version 1.5 to be released soon. Improved responsiveness is expected.

The process and time based regulations are working fine i guess.

Link to comment
Share on other sites

Hello Jamy,

1. When I tested the old version, I did not have Virtualbox installed. This is why it was working before. By the way I have 3 more virtual adapters (hamachi, tunngle, vmware) and I have a wireless adapter too, which I don't use every time.

2. The regulator's port is empty by default, there should be a default number for the port.

3. I am using tombull's .NET API, and I can pause all torrents and unpause them. It takes half a minute but my GUI is not freezing meanwhile.

I did not test the other functions (process and time based).

Link to comment
Share on other sites

Hello karogyoker,

1. I also have a wireless adapter which is working fine. At least that should not create a problem for you. Regarding the rest, as I said, I have noted your suggestion, but i can't promise an early solution.

2. No matter what, at first run, the users have to configure the advanced settings. I agree the listening port is empty by default. But I have clearly stated in the documentation that it has to be a any number (between 1-65535) which has to be decided by all network users. So its not a big issue. Maybe i will give something by default in the next update.

3. I think i got the reason. You said it takes 30 seconds to pause all your torrents using tombull's .net api (so i see 300 torrents really can slow the parsing or maybe even the web ui response from uTorrent itself). In my program, the regulation is checked and re-enforced at an interval of every 20 seconds. So in your case the process is never complete and the thread is always working.

Now the reason for such short interval is obvious. At least this is what I thought - Any manual correction (intentional or accidental) to the global speeds can be immediately reverted (in case of network based regulation) and process and time based regulations will somewhat be efficient. The more I increase this interval the purpose of regulation is defeated. Especially in case of process based and time based regulations, it will take more time to revert even after the process exits or the time interval elapses. (You will agree that regulation on a per second basis is not feasible. It will put unnecessary load with all the api calls and parsing.)

This interval I chose is a balanced approach, not too short not too long. And this works perfect for me.

So now one has to choose between effective regulation and effective computing (for the large number of torrents). You really need 300 torrents running at one time??? Let me know if you have a better idea.

Link to comment
Share on other sites

3. I only need max 10 torrents from that 300 :)

But not this is the case. The case is that the GUI is freezing while it is refreshing the torrents' statuses, so it needs to be on another thread.

I have no better idea, 1-2 minutes to pause and unpause torrents is very slow, so the solution is do not have so many torrents.

But at least in my program the GUI is not freezing, it just has a damn lot delay until all torrents are get paused.

It must be WebUI related, becouse if I click on uTorrent's icon, then pause all torrents, it takes less than a second.

Link to comment
Share on other sites

Hello Karogyoker,

3. So now we are out of much options for this. I will keep a separate thread next time, but it still wont solve the prob of 300 torrents.. :)

So now, will you please let me know how the application works with your 10 needed torrents and without virtual adapters :D . I would really appreciate your response.

Because that is what concerns most users.

And I would be encouraged with some words of appreciation for all the work I have done and all those suggestions of yours I have incorporated.. :D :D

Thank you again very much for your responses.

Link to comment
Share on other sites

  • 3 weeks later...


I have diabled the virtual adapters, now it finds the (one and only) local IP address of my pc.

But now it can not detect uTorrent (it says not running), maybe becouse of uTorrent 2.0.4 but I don't know why (webui settings are correct).

I have now 3 torrents and the app is not freezing (maybe becouse it can't even connect to webui).

Link to comment
Share on other sites

Hi karogyoker,

The regulator is fully compatible with uTorrent 2.0.4. (i am also using it)

To check whether uTorrent is running or not running, regulator simply checks the list of running processes on the system. I cant imagine why it wont work.

There must be some other problem with your setup. Make sure your antivirus and firewalls have fully unblocked the regulator.

Waiting for you to throw some more light.


Link to comment
Share on other sites

  • 7 months later...
  • 2 months later...


It is nice that you still develop this app.

Since that long time, I have a router with fully configurable QoS options, so I don't need an app like the regulator.

But it is good to see that it's getting better.

I tried it, how it looks, well done, it's nice, and there are a lot of options!

By the way it still detects the wrong adapter (Virtualbox), but one day maybe you will fix this too :P

Link to comment
Share on other sites


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

  • Create New...