Freitag, 24. November 2017, 10:08 UTC+1

Sie sind nicht angemeldet.

  • Anmelden
  • Registrieren

Lieber Besucher, herzlich willkommen bei: NAS Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Samstag, 14. Januar 2012, 18:00

Torrent SDK

Does anyone know where I can find and download the Bit-torrent SDK ?

Thanks

snoopy

NAS2000-Team

Beiträge: 467

Wohnort: Zu Hause

2

Freitag, 20. Januar 2012, 12:36

There are several BT packages. I guess there is also one, working on Your FW Platform.

Why You want a Developer Kit (SDK) ? :think:

I can not remember the url (just use g**gle) but there is a workaround with some developments - but it is ... guess what :wacko: Firmware related.

Greetz
snoopy
--------------------------------------------------------------------------
Der Mensch ist das wichtigste und kostbarste Peripheriegerät einer Computeranlage.

myStuff: NAS2001+4220(1000Gb-ext3)+Dlink524+KabelD. (120 Mbit)

3

Samstag, 21. Januar 2012, 02:33

I couldn't find it. The BT client on the router I've is pretty basic and is very basic. I'm hoping to find GPL SDK and check out some needed feature/plug-in could be added.

dorusan

Anfänger

Beiträge: 2

Wohnort: Bucharest, Romania

4

Dienstag, 3. September 2013, 12:24

I couldn't find it. The BT client on the router I've is pretty basic and is very basic. I'm hoping to find GPL SDK and check out some needed feature/plug-in could be added.
I can agree that the feature set is limited, here's what I found by doing some basic reversing.

Internally the BT client uses a basic control protocol on the 8888 port :

PHP-Quelltext

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
this.appSettingsGet = function(onFinished) {
    this.req("/api/app-settings-get"onFinished);
};

this.appSettingSet = function(namevalonFinished) {
    var "/api/app-settings-set?" encodeURIComponent(name) + "=" encodeURIComponent(val);
    this.req(ronFinished);
};

this.torrentsGet = function(onFinished) {
    this.req("/api/torrents-get"onFinished);
};

this.torrentStop = function(torrentHashonFinished) {
    this.req("/api/torrent-stop?hash=" torrentHashonFinished);
};

this.torrentStart = function(torrentHashonFinished) {
    this.req("/api/torrent-start?hash=" torrentHashonFinished);
};

this.torrentRemove = function(torrentHashwithDataonFinished) {
    var url "/api/torrent-remove?hash=" torrentHash;
    url += "&delete-torrent=yes";
    if (withDataurl += "&delete-data=yes";
    this.req(urlonFinished);
};

this.torrentGetFiles = function(torrentHashonFinished) {
    this.req("/api/torrent-get-files?hash=" torrentHashonFinished);    
};

this.torrentAddUrl = function(urlstartonFinished) {
    var url "/api/torrent-add?url=" encodeURIComponent(url);
    if (starturl += "&start=yes";
    this.req(urlonFinished);
};

this.appSettingsSetUrl = function(settings) {
    var req "/api/app-settings-set?";
    for (var 0settings.lengthi++) {
        if (!= ireq += "&";
        var el settings[i];
        var arg encodeURIComponent(el[0]) + "=" encodeURIComponent(el[1]);
        req += arg;
    }
    return req;
};

this.appSettingsSet = function(settingsonFinished) {
    var req this.appSettingsSetUrl(settings);
    this.req(reqonFinished);
};

this.torrentFileGet = function(hashfile_idonFinished) {
    var req "/api/torrent-file-get?hash=" hash "&id=" file_id;
    this.req(reqonFinished);
};


So for example, if we are to perform a basic GET request on the url of you NAS (port 8888) and we attach the 'api/get-torrents' for example, you would get the full list of torrents.
REQUEST :

PHP-Quelltext

1
<NAS_IP>:8888/api/torrents-get


ANSWER :

PHP-Quelltext

1
2
3
4
5
6
7
8
9
{"torrents" : [
{"caption" "Torrent_1""distributed_copies" "10.99988""dl_rate" 25961"done" 427638739"hash" "462fe3b891e6d4e08370a97b04789080b77b1ce0""max_connections" 50"max_dl_rate" : -1"max_ul_rate" : -1"max_uploads" 4"payload_download" 519817061"payload_upload" 519607824"peers_connected" 39"peers_total" 176"private" 0"seeds_connected" 7"seeds_total" 17"size" 142703923016"state" "downloading""stopped" 0"ul_rate" 4915}, 
{"caption" "Torrent_2""distributed_copies" "26.99979""dl_rate" 66761"done" 13616977"hash" "4fa793869dc2c0e9cd558163d4ccba45c4cbcb84""max_connections" 50"max_dl_rate" : -1"max_ul_rate" : -1"max_uploads" 4"payload_download" 14478610"payload_upload" 0"peers_connected" 44"peers_total" 15"private" 0"seeds_connected" 25"seeds_total" 6"size" 20004872510"state" "downloading""stopped" 0"ul_rate" 0}, 
{"caption" "Torrent_3""distributed_copies" "2.350104""dl_rate" 6503"done" 163337"hash" "714dcaf17e2729e4a96c4adbaf034ed81abb1426""max_connections" 50"max_dl_rate" : -1"max_ul_rate" : -1"max_uploads" 4"payload_download" 228873"payload_upload" 0"peers_connected" 3"peers_total" 238"private" 0"seeds_connected" 2"seeds_total" 85"size" 24173988743"state" "downloading""stopped" 0"ul_rate" 0}, 
{"caption" "Torrent_4""distributed_copies" "16.99735""dl_rate" 58333"done" 13792643"hash" "90d0126de78b7ec4c28890678929fa436145de8f""max_connections" 50"max_dl_rate" : -1"max_ul_rate" : -1"max_uploads" 4"payload_download" 14708214"payload_upload" 98304"peers_connected" 37"peers_total" 171"private" 0"seeds_connected" 13"seeds_total" 52"size" 31633289822"state" "downloading""stopped" 0"ul_rate" 0}, 
{"caption" "Torrent_5""distributed_copies" "8.99982""dl_rate" 27814"done" 4560209"hash" "a2066a0cf2ad5691dd93f273f0ab425a3aacccc1""max_connections" 50"max_dl_rate" : -1"max_ul_rate" : -1"max_uploads" 4"payload_download" 5111185"payload_upload" 0"peers_connected" 19"peers_total" 83"private" 0"seeds_connected" 7"seeds_total" 32"size" 23298617389"state" "downloading""stopped" 0"ul_rate" 0}, 
{"caption" "Torrent_6""distributed_copies" "39.99971""dl_rate" 42912"done" 14330156"hash" "d6b2804dafed9533f8a723301aa8cf4405a30d5b""max_connections" 50"max_dl_rate" : -1"max_ul_rate" : -1"max_uploads" 4"payload_download" 15013764"payload_upload" 81920"peers_connected" 50"peers_total" 274"private" 0"seeds_connected" 35"seeds_total" 175"size" 14324317752"state" "downloading""stopped" 0"ul_rate" 1638}, 
{"caption" "Torrent_7""distributed_copies" "0.9915617""dl_rate" 8349"done" 247106"hash" "f1ad2d91680cdb9066875fa80b219201575c3786""max_connections" 50"max_dl_rate" : -1"max_ul_rate" : -1"max_uploads" 4"payload_download" 378178"payload_upload" 0"peers_connected" 4"peers_total" 244"private" 0"seeds_connected" 0"seeds_total" 68"size" 32308233661"state" "downloading""stopped" 0"ul_rate" 0}
]}


Just parse it and use it. This is the output from a Planex MZK-NAS02SG

You can perform any operation in the HTTP-UI basically.
Hope it helps.

Dorin.