Page 1 of 1

DelugeRPC details

Posted: Sun Oct 25, 2009 1:32 pm
by atomix1040
I'm trying to write a remote client, in C++. It's not clear to me how DelugeRPC works. In the 1.2 relase notes you write that the communication is both encrypted and compressed, in the little piece of information on the protocol you write it's only zlib encoded.
Could you provide some more information (perhaps an example) on how to use this protocol. Also i don't see a method for logging in, and all the methods require Auth Level=5. Perhaps this has been discussed/documented, just please point me to a specific link, i was unable to find anything.

Re: DelugeRPC details

Posted: Mon Oct 26, 2009 4:53 pm
by andar
http://deluge-torrent.org/docs/current/core/rpc.html

The messages are actually rencoded and then zlib compressed. I don't believe there is any C++ implementation of rencode.

http://svn.deluge-torrent.org/trunk/deluge/rencode.py

Re: DelugeRPC details

Posted: Mon Oct 26, 2009 5:34 pm
by atomix1040
well that sucks. i looked at the python source, but since i have no idea about python i can't re-write this.

i'll try JSON remote control then.

Re: DelugeRPC details

Posted: Mon Oct 26, 2009 9:54 pm
by andar
I have considered changing/providing an option to use JSON encoding instead of rencode.. Perhaps this will be available in the future.

Re: DelugeRPC details

Posted: Tue Oct 27, 2009 12:50 am
by johnnyg
atomix1040 wrote:well that sucks. i looked at the python source, but since i have no idea about python i can't re-write this.
if you know C++, python should be a walk in the park :P

Re: DelugeRPC details

Posted: Thu Aug 16, 2012 9:26 pm
by bzion
Hi!
I'm also in the same case of atomix1040, except I'm currently try to write a rencode implementation in Java.
I've read the rencode.py source file and I'm stuck because and I've some difficulties with the format that is really different than the bencode format.
When I'm logging some rencode output, I obtain that:
['\xc1', '\xc4', '>', 'i', '\x94', 'core.get_filter_tree', '\xc2', 'C', '\xc0', 'f']
['\xc1', '\xc4', '>', 'd', '\x97', 'core.get_session_status', '\xc1', '\xc4', '\x8b', 'upload_rate', '\x8d', 'download_rate', '\x93', 'payload_upload_rate', '\x95', 'payload_download_rate']
:?
So, do you have a simple description of the format and some explanations around the encoding mechanism?

Re: DelugeRPC details

Posted: Thu Aug 30, 2012 4:01 pm
by bzion
Anybody knows?

Re: DelugeRPC details

Posted: Fri Aug 31, 2012 11:58 am
by johnnyg
This thread was from over 3 years ago and since then andar has written a cython version of rencode: http://code.google.com/p/rencode/ which may be of some help (it contains tests).

There's unfortunately no spec for it.