tor-ctrl v1 - setting bandwidthrate from commandline via controlport and many, many other possibilites...

Stefan Behte Stefan.Behte at gmx.net
Wed Oct 10 22:26:42 UTC 2007


Hi!

I'm sorry to write again, but the previous post somehow became a
follow-up to another post and I'm not sure that this got much (any?!)
attention.

I'd like to present a tool which was said to be wanted by some people
running servers (http://tor.eff.org/volunteer.html.en -> nr. 3)  - so I
wrote it.

tor-ctrl is a general-purpose commandline tool for executing commands on
a tor server via the controlport. I regard it as kind of "interface"
between the tor controller interface and the commandline.

It's written in BASH and uses just telnet/xxd (the last one only when
using control_auth_cookie), so there is no need for a bulky java/python
installation.

Here is an example of what you can do with it:
For setting the bandwidth for specific times of the day, I suggest
calling tor-ctrl via cron, e.g.:

0 22 * * * /path/to/tor-ctrl -c "SETCONF bandwidthrate=1mb"
0 7 * * *  /path/to/tor-ctrl -c "SETCONF bandwidthrate=100kb"

This would set the bandwidth to 100kb at 07:00 and to 1mb at 22:00.
You can use notations like 1mb, 1kb or the number of bytes.

In order to do other "magic", you should read
http://tor.eff.org/svn/trunk/doc/spec/control-spec.txt

I also created a download-page for the tool: http://ge.mine.nu/tor-ctrl.html
Direct link: http://ge.mine.nu/code/tor-ctrl.sh
If it's down, please try again later (I had some problems with my ISP
recently).

Please send me some feedback, ideas and (most important!) bug reports!


Best regards,

Stefan Behte
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tor-ctrl.sh
Type: application/x-sh
Size: 5412 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-talk/attachments/20071011/51b5be43/attachment.sh>


More information about the tor-talk mailing list