+ Reply to Thread
Results 1 to 8 of 8

Thread: Deluge

  1. #1
    Guest Coder anthony-joal's Avatar
    Join Date
    22.03.17
    Location
    France
    P2P Client
    qBittorrent
    Posts
    188
    Activity Longevity
    0/20 9/20
    Today Posts
    0/5 ssssss188

    Deluge

    Please before reading this thread, read Client file format.

    Since BitTorrent clients are updated regularly, i'll post the default file template for Deluge. And will list any changes for a particular version against this default template.

    Default template
    Code:
    {
        "keyGenerator": {
            "length": 8,
            "type": "hash_no_leading_zero",
            "refreshOn": "TORRENT_PERSISTENT",
            "case": "upper"
        },
        "peerIdGenerator": {
            "pattern": "xxxxxxxxxxxxx",
            "refreshOn": "NEVER",
            "shouldUrlEncode": false
        },
        "urlEncoder": {
            "encodingExclusionPattern": "[A-Za-z0-9_~\(\)\!\.\*-]",
            "encodedHexCase": "lower"
        },
        "query": "info_hash={infohash}&peer_id={peerid}&port={port}&uploaded={uploaded}&downloaded={downloaded}&left={left}&corrupt=0&key={key}&event={event}&numwant={numwant}&compact=1&no_peer_id=1&supportcrypto=1&redundant=0",
        "numwant": 200,
        "numwantOnStop": 0,
        "requestHeaders": [
            { "name": "Host", "value": "xxxxx"},
            { "name": "User-Agent", "value": "xxxxxxxxxxxxxx" },
            { "name": "Accept-Encoding", "value": "gzip" },
            { "name": "Connection", "value": "close" }
        ]
    }
    1.3.15
    peerIdGenerator.pattern: -DE13F0-[A-Za-z0-9_~\(\)\!\.\*-]{12}
    requestHeaders.User-Agent: Deluge 1.3.15
    Last edited by anthony-joal; 15.08.17 at 20:56.
    This is my signature. There are many others like it, but this one is mine.
    Reply With QuoteReply With Quote
    Thanks

  2. Who Said Thanks:

    cloud99 (11.08.17) , anon (10.08.17)

  3. #2
    Guest Coder anthony-joal's Avatar
    Join Date
    22.03.17
    Location
    France
    P2P Client
    qBittorrent
    Posts
    188
    Activity Longevity
    0/20 9/20
    Today Posts
    0/5 ssssss188
    Updated file format to a more readable one.
    This is my signature. There are many others like it, but this one is mine.
    Reply With QuoteReply With Quote
    Thanks

  4. Who Said Thanks:

    cloud99 (14.08.17) , H265 (13.08.17)

  5. #3
    Moderator anon's Avatar
    Join Date
    01.02.08
    Posts
    39,370
    Activity Longevity
    11/20 19/20
    Today Posts
    1/5 ssss39370
    I installed Deluge 2.0.3 on Lubuntu 18.04 from the official repositories today (there is no Windows port yet, and I don't have the time to compile one), and its announces look like this.

    Code:
    GET /announce?info_hash=%84%b8%b8pm%7f%c5%bb%c1%93%f2%5d%8b%24%19~%dce%a2%fd&peer_id=-DE203s-JVXJE2-zYA8M&port=54143&uploaded=0&downloaded=0&left=790626304&corrupt=0&key=EEB6FF6B&event=started&numwant=200&compact=1&no_peer_id=1&supportcrypto=1&redundant=0 HTTP/1.1
    Host: torrent.ubuntu.com:6969
    User-Agent: Deluge/2.0.3-2-201906121747-ubuntu18.04.1 libtorrent/1.1.5.0
    Accept-Encoding: gzip
    Connection: close
    Note how when compared against the template in the first post, the peer_id prefix ends with "s" ("stable"?) instead of "0", and the User-Agent is expanded with additional version information. Can anyone confirm these changes on other distros, or perhaps an unofficial Windows port? This sort of thing makes it impossible to write client emulations that are safe for everyone.
    "I just remembered something that happened a long time ago."
    Reply With QuoteReply With Quote
    Thanks

  6. Who Said Thanks:

    anthony-joal (18.06.19)

  7. #4
    Guest Coder anthony-joal's Avatar
    Join Date
    22.03.17
    Location
    France
    P2P Client
    qBittorrent
    Posts
    188
    Activity Longevity
    0/20 9/20
    Today Posts
    0/5 ssssss188
    Quote Originally Posted by anon View Post
    I installed Deluge 2.0.3 on Lubuntu 18.04 from the official repositories today (there is no Windows port yet, and I don't have the time to compile one), and its announces look like this.

    Code:
    GET /announce?info_hash=%84%b8%b8pm%7f%c5%bb%c1%93%f2%5d%8b%24%19~%dce%a2%fd&peer_id=-DE203s-JVXJE2-zYA8M&port=54143&uploaded=0&downloaded=0&left=790626304&corrupt=0&key=EEB6FF6B&event=started&numwant=200&compact=1&no_peer_id=1&supportcrypto=1&redundant=0 HTTP/1.1
    Host: torrent.ubuntu.com:6969
    User-Agent: Deluge/2.0.3-2-201906121747-ubuntu18.04.1 libtorrent/1.1.5.0
    Accept-Encoding: gzip
    Connection: close
    Note how when compared against the template in the first post, the peer_id prefix ends with "s" ("stable"?) instead of "0", and the User-Agent is expanded with additional version information. Can anyone confirm these changes on other distros, or perhaps an unofficial Windows port? This sort of thing makes it impossible to write client emulations that are safe for everyone.
    Indeed, the V2.x.x seems to introduce new patterns. The peer_id will probably be the same on every OS.

    The user agent is a bit more tricky but it just need a new placeholder for {host}, shouldn't be that much work for developpers.

    Also the libtorrent is going to be a fixed string on windows because it wil be a build dependency, for linux systems it "may" change but it's unlikely.
    This is my signature. There are many others like it, but this one is mine.
    Reply With QuoteReply With Quote
    Thanks

  8. Who Said Thanks:

    JohnareyouOK (28.06.19) , anon (18.06.19)

  9. #5
    Moderator anon's Avatar
    Join Date
    01.02.08
    Posts
    39,370
    Activity Longevity
    11/20 19/20
    Today Posts
    1/5 ssss39370
    That's what I thought. I'll wait to check what things look like on the Windows port (when released), and then see what chances exist of accurately replicating the new behavior on RM+, mRatio and Bigly.
    "I just remembered something that happened a long time ago."
    Reply With QuoteReply With Quote
    Thanks

  10. Who Said Thanks:

    anthony-joal (02.07.19)

  11. #6
    Moderator anon's Avatar
    Join Date
    01.02.08
    Posts
    39,370
    Activity Longevity
    11/20 19/20
    Today Posts
    1/5 ssss39370
    Well, since almost four months later there is still no official Windows package, today I have installed Deluge 2.0.3 by following this procedure, and observed a few details.

    Firstly, as mentioned above, the peer_id prefix is -DE203s- instead of the -DE2030- that may be expected from previous patterns.

    Secondly, the peer_id is different for each torrent and does not change when stopping and restarting, so the peerIdGenerator refreshOn value in the first post should now be TORRENT_PERSISTENT instead of NEVER. This change may come from libtorrent rather than the client itself; unfortunately it also results in behavior that cannot be replicated by the perfect spoof in BiglyBT Extreme Mod (but does not necessarily lead to detectability, depending on user action).

    Thirdly, the User-Agent string does not include the compilation/commit date and OS name as it does on Lubuntu, only the Deluge and libtorrent version numbers. Two example announces from different torrents follow.

    Code:
    GET /announce?info_hash=9%0e%eco%ba%8c%c3s%b2%9bc%f1%f7%bb%2c%88_%3f%df%d1&peer_id=-DE203s-_H1vn1s7lGXs&port=58568&uploaded=0&downloaded=0&left=1&corrupt=0&key=7D6A81E7&event=started&numwant=200&compact=1&no_peer_id=1&supportcrypto=1&redundant=0 HTTP/1.1
    Host: 127.0.0.1
    User-Agent: Deluge/2.0.3 libtorrent/1.1.13.0
    Accept-Encoding: gzip
    Connection: close
    
    GET /announce?info_hash=%15%b5%8b%b3%b3%d1%b7%fcWni%f1x%e9%27c%e8%a5%f2%e0&peer_id=-DE203s-*KnGM*K_bgP_&port=58568&uploaded=0&downloaded=0&left=1&corrupt=0&key=3FAD9369&event=started&numwant=200&compact=1&no_peer_id=1&supportcrypto=1&redundant=0 HTTP/1.1
    Host: 127.0.0.1
    User-Agent: Deluge/2.0.3 libtorrent/1.1.13.0
    Accept-Encoding: gzip
    Connection: close
    All tests were conducted using a "fake" tracker running on localhost that always returns a static failure reason. Also, Deluge occasionally made requests to the root of the tracker's server, but I didn't bother to find out why. Note how header order and the User-Agent and Accept-Encoding values differ from those in tracker announces.

    Code:
    GET / HTTP/1.1
    Connection: close
    User-Agent: Deluge/2.0.3 (https://deluge-torrent.org)
    Accept-Encoding: gzip,x-gzip,deflate
    Host: 127.0.0.1
    "I just remembered something that happened a long time ago."
    Reply With QuoteReply With Quote
    Thanks

  12. Who Said Thanks:

    cloud99 (14.06.20) , (17.02.20) , anthony-joal (30.09.19)

  13. #7
    Guest Coder anthony-joal's Avatar
    Join Date
    22.03.17
    Location
    France
    P2P Client
    qBittorrent
    Posts
    188
    Activity Longevity
    0/20 9/20
    Today Posts
    0/5 ssssss188
    Great job :)

    I personnaly won't bother with root path http request as well, it does not sounds relevant and will most likely be fixed in future versions.
    You savec me a lot of time investigating with wireshark :) Thanks for this !
    This is my signature. There are many others like it, but this one is mine.
    Reply With QuoteReply With Quote
    Thanks

  14. #8
    Moderator anon's Avatar
    Join Date
    01.02.08
    Posts
    39,370
    Activity Longevity
    11/20 19/20
    Today Posts
    1/5 ssss39370
    You're welcome I'm thinking that the root request may be used to display a tracker favicon or log additional errors. Not something we need to replicate in either case.
    "I just remembered something that happened a long time ago."
    Reply With QuoteReply With Quote
    Thanks

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •