Results 1 to 5 of 5

Thread: uTorrent

  1. #1
    Guest Coder anthony-joal's Avatar
    Join Date
    22.03.17
    Location
    France
    P2P Client
    qBittorrent
    Posts
    110
    Activity Longevity
    6/20 2/20
    Today Posts
    0/5 ssssss110

    uTorrent

    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",
            "refreshOn": "TIMED_OR_AFTER_STARTED_ANNOUNCE",
            "refreshEvery": 10,
            "case": "upper"
        },
        "peerIdGenerator": {
            "pattern": "xxxxxxxxxxxxxxxx",
            "refreshOn": "NEVER",
            "shouldUrlEncode": true
        },
        "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",
        "numwant": 200,
        "numwantOnStop": 0,
        "requestHeaders": [
            { "name": "host", "value": "xxxxx"},
            { "name": "User-Agent", "value": "xxxxxxxxxxxxxxxx" },
            { "name": "Accept-Encoding", "value": "gzip" },
            { "name": "Connection", "value": "Close" }
        ]
    }

    3.5.0_44090
    peerIdGenerator.pattern: -UT3500-(\u003a\u00ac)[\u0001-\u00ff]{10}
    requestHeaders.User-Agent: uTorrent/350(111258682)(44090)


    3.5.0_43916
    peerIdGenerator.pattern: -UT3500-(\u008c\u00ab)[\u0001-\u00ff]{10}
    requestHeaders.User-Agent: uTorrent/350(111258508)(43916)


    3.2.2_28500
    peerIdGenerator.pattern: -UT3220-To[\u0001-\u00ff]{10}
    query: info_hash={infohash}&peer_id={peerid}&port={port}& uploaded={uploaded}&downloaded={downloaded}&left={ left}&corrupt=0&key={key}&event={event}&numwant={n umwant}&compact=1&no_peer_id=1
    numwantOnStop: 200
    requestHeaders.User-Agent: uTorrent/3220(28500)
    requestheaders new header: { "name": "Accept-Language", "value": "{locale}" } The header takes place between "Accept-Encoding" and "Connection".
    Last edited by anthony-joal; 21.10.17 at 01:23.
    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:

    H265 (11.08.17) , cloud99 (11.08.17) , anon (10.08.17)

  3. #2
    Moderator anon's Avatar
    Join Date
    01.02.08
    Posts
    33,825
    Activity Longevity
    14/20 19/20
    Today Posts
    2/5 ssss33825
    "Accept-Language": "en-US"
    The value for this is read from "LocaleName" on registry key HKCU\Control Panel\International, so it can vary between computers.

    Also, how do you handle URL encoding exceptions? uTorrent only encodes a-z, A-Z and - . _ ~ in the info_hash and peer_id as per the protocol specification, but other clients are different.

    I'll have a look at the client file terminology and then your other threads when I have more time, good work so far.
    emerly35 is away
    Reply With QuoteReply With Quote
    Thanks

  4. Who Said Thanks:

    anthony-joal (11.08.17) , H265 (11.08.17)

  5. #3
    Guest Coder anthony-joal's Avatar
    Join Date
    22.03.17
    Location
    France
    P2P Client
    qBittorrent
    Posts
    110
    Activity Longevity
    6/20 2/20
    Today Posts
    0/5 ssssss110
    Quote Originally Posted by anon View Post
    The value for this is read from "LocaleName" on registry key HKCU\Control Panel\International, so it can vary between computers.
    You'r right i updated the definition. For those interested in java you can use "Locale.getDefault().toLanguageTag()".

    Quote Originally Posted by anon View Post
    Also, how do you handle URL encoding exceptions? uTorrent only encodes a-z, A-Z and - . _ ~ in the info_hash and peer_id as per the protocol specification, but other clients are different.
    What do you mean by encoding exception? Since it's an HTTP call, all characters except a-z, A-Z and - . _ ~ have to encoded (with url encoding algorithm) this is part of HTTP protocol specification. Some clients does not seems to URLEncode characters, but these clients are using a standard charset (like qBitTorrent or transmission). Am i right or did i missed something?

    If you meant "what chars should compose the peerId", this is covered by client file terminology, for utorrent i'm 99.9% sure it uses random (from 0x00 up to 0x7E), i'll take another look tonight.

    Here is two peerId that i just got from uTorrent 3.5.0_43916 (in bold chars not being encoded):
    -UT3500-%8c%ab%a9%87%ce%2b%a8o%22%01sj
    -UT3500-%8c%ab%a1%d4%2c%93%24v3%91%60%ee

    As you can see, all characters from 0x00 up to 0xFF are encoded, except those you mentionned, but this is part of the HTTP protocol specification, i haven't seen yet a client that does not URLEncode another way. If there is one i'd like to know so i could investigate :)
    Last edited by anthony-joal; 12.08.17 at 12:18.
    This is my signature. There are many others like it, but this one is mine.
    Reply With QuoteReply With Quote
    Thanks

  6. Who Said Thanks:

    H265 (12.08.17)

  7. #4
    Guest Coder anthony-joal's Avatar
    Join Date
    22.03.17
    Location
    France
    P2P Client
    qBittorrent
    Posts
    110
    Activity Longevity
    6/20 2/20
    Today Posts
    0/5 ssssss110
    Ok.... i understand what you mean, some stupid clients does not follows the Http specification.... i'll change the client definition soon
    This is my signature. There are many others like it, but this one is mine.
    Reply With QuoteReply With Quote
    Thanks

  8. #5
    Guest Coder anthony-joal's Avatar
    Join Date
    22.03.17
    Location
    France
    P2P Client
    qBittorrent
    Posts
    110
    Activity Longevity
    6/20 2/20
    Today Posts
    0/5 ssssss110
    Updated file format to a more readable one and fixed missing encoding exclusion.
    Last edited by anthony-joal; 13.08.17 at 23:39.
    This is my signature. There are many others like it, but this one is mine.
    Reply With QuoteReply With Quote
    Thanks

Tags for this Thread

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188