DelugeRPC details

Suggestions and discussion of future versions
Post Reply
atomix1040

DelugeRPC details

Post 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.
andar
Top Bloke
Top Bloke
Posts: 1050
Joined: Fri Jun 08, 2007 8:38 pm
Location: Victoria, BC
Contact:

Re: DelugeRPC details

Post 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
atomix1040

Re: DelugeRPC details

Post 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.
andar
Top Bloke
Top Bloke
Posts: 1050
Joined: Fri Jun 08, 2007 8:38 pm
Location: Victoria, BC
Contact:

Re: DelugeRPC details

Post by andar »

I have considered changing/providing an option to use JSON encoding instead of rencode.. Perhaps this will be available in the future.
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: DelugeRPC details

Post 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
bzion

Re: DelugeRPC details

Post 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?
bzion

Re: DelugeRPC details

Post by bzion »

Anybody knows?
johnnyg
Top Bloke
Top Bloke
Posts: 1522
Joined: Sun Oct 28, 2007 4:00 am
Location: Sydney, Australia

Re: DelugeRPC details

Post 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.
Post Reply