[Libtorrent-devel] A quick guide to rtorrent's xmlrpc that assumes
you read the peripheral manuals
Jari Sundell
jaris at student.matnat.uio.no
Thu May 24 20:12:17 UTC 2007
What you need:
* http://python.ca/scgi/ For apache, lighttpd should have this built-in.
* http://xmlrpc-c.sourceforge.net/
* Latest rtorrent source from svn.
Configure rtorrent with the --xmlrpc-c flag and add the following to:
httpd.conf: SCGIMount /RPC2 127.0.0.1:5000
rtorrent.rc: scgi_port = localhost:5000
Apache will now route xmlrpc requests to rtorrent, which is listening
only on connections from the local machine. Also make sure the /RPC2
location is properly protected.
To make it accessible from anywhere, use "scgi_port = :5000". This is
however not recommend as rtorrent has no access control, which means the
http server is responsible for handling that. Anyone who can send
rtorrent xmlrpc commands is likely to have the ability to execute code
with the privileges of the user running rtorrent.
Now, by using the xmlrpc utility that came with xmlrpc-c, call f.ex:
> # To list all the xmlrpc methods rtorrent supports.
> xmlrpc localhost system.listMethods
> # Get max upload rate.
> xmlrpc localhost get_upload_rate
> # Set upload rate, exact 100000 bytes.
> xmlrpc localhost set_upload_rate i/100000
> # Set upload rate, 100kb.
> xmlrpc localhost set_upload_rate 100k
It supports both single strings akin to what the option file accepts,
and proper xmlrpc integer, string and lists.
See the man page and rtorrent/src/command_* for more details on what
parameters some of the commands take.
Do not bother trying the FastCGI implementation that is also in the
tree, the code is only partially working and had to be abandoned due to
suckage on FastCGI's part.
Please do not ask questions that you should be able to figure out by
reading other manuals...
Rakshasa
Eating the hand that feeds you gives you your daily dose of essential
vitamins and minerals.
More information about the Libtorrent-devel
mailing list