Temat: OpenWrt i ściąganie torrentów

Witam

Jakiś czas temu napisałem pod web-ifa skrypty umożliwiające ściąganie torrentów (inne niż freeloader i downloader).
Oparte to jest na silniku z torrentfluxa.
Jeżeli ktoś jest zainteresowany to zapraszam do testów i ewentualnych poprawek.
strona z opisem: http://www.plesken.elpec.com/openwrt/

Proszę sie nie przestraszyć wyglądem strony. Ważna jest treść a nie jakieś wygibasy :-)
Uwagi mile widziane:)

Pozdrawiam

Plesken

PS. Aha. Skrypty nie mają problemów ze ściąganiem torrentów z PT (tam gdzie jest passkey).

2

Odp: OpenWrt i ściąganie torrentów

Wygląda miło. Jest jeszcze sctcs, ale nie ma źródeł (chociaż gość zaklina się, że przekompiluje to na co chcesz)

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: OpenWrt i ściąganie torrentów

Cezary napisał/a:

Wygląda miło. Jest jeszcze sctcs, ale nie ma źródeł (chociaż gość zaklina się, że przekompiluje to na co chcesz)

Tia, tyle że scts jest pod ctorrenta a ctorrent jak pisałem to ma problemy z PT.

4

Odp: OpenWrt i ściąganie torrentów

Probowalem odpalic ale nie sciga sie. Przez WWW mam takie informacje:
"cat: /mnt/mnt/disc1_3/torrent/.torrents/ComUNL.torrent.stat.pid: No such file or directory BusyBox v1.00 (2007.01.30-11:42+0000) multi-call binary Usage: grep [-ihHnqvs] PATTERN [FILEs...] Search for PATTERN in each FILE or standard input. Options: -H prefix output lines with filename where match was found -h suppress the prefixing filename on output -i ignore case distinctions -l list names of files that match -n print line number with output lines -q be quiet. Returns 0 if result was found, 1 otherwise -v select non-matching lines -s suppress file open/read error messages"

Sciagam za pomoca SCTCS, czy jakis pakiet by sie gryzl?

Odpalenie z reki:
"/opt/local/bin/python" "/etc/TF_BitTornado/btphptornado.py" False 0 "/mnt/mnt/disc1_3/torrent/.torrents/ComUNL.torrent.stat" root --responsefile "/mnt/mnt/disc1_3/download/ComUNL" --display_interval 5 --max_download_rate 100 --max_upload_rate 100 --max_uploads 20 --minport 2700 --maxport 2701 --super_seeder 0

Startuje i po 2 s. wychodzi bez bledu
ComUNL.torrent.stat:

100
Download Failed!


root
+

0.0
0
0
0
0
ComUNL.torrent.stat.5299:
run - begin
display - begin
display - prior to self.write
writeStatus - begin
writeStatus - running :
writeStatus - stoppedAt :
display - end
failed - begin
display - begin
display - prior to self.write
writeStatus - begin
writeStatus - running :

writeStatus - stoppedAt :
display - end
failed - end
run - removing PID file :/mnt/mnt/disc1_3/torrent/.torrents/ComUNL.torrent.stat.pid
run - end

Gdzie robie blad ?

5

Odp: OpenWrt i ściąganie torrentów

/mnt/mnt/disc1_3? Tak ma być?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

6 (edytowany przez strazak 2007-04-18 21:04:59)

Odp: OpenWrt i ściąganie torrentów

Tak, tak ma byc. Tak sobie to ulozylem, moze glupie, ale tak zadzialalo i dziala, wiec jest smile. Jak sie podumiem to zobie zapewne to "wyprostuje"

Ogolnie to mi sie ten interfejs nawet podoba, do dlugiego seedowania na PT starczy.
Interfejs SCTCS jest najbardziej zaawansowany, poza tym wystawiam na zewnatrz tylko port 8080, a nie interfejs samego routera.

7

Odp: OpenWrt i ściąganie torrentów

No jest ciekawie, im większy wybór tym lepiej smile .

czy można nim ściagać kilka torrentów na raz ?
I czy mógłbyś zrobić wersję pracująca poza gui wrt, tak jak np. amule na oddzielnym porcie ?

pozdrawiam i życzę powodzenia.

8 (edytowany przez plesken 2007-04-18 23:01:13)

Odp: OpenWrt i ściąganie torrentów

strazak napisał/a:

Probowalem odpalic ale nie sciga sie. Przez WWW mam takie informacje:
"cat: /mnt/mnt/disc1_3/torrent/.torrents/ComUNL.torrent.stat.pid: No such file or directory BusyBox v1.00 (2007.01.30-11:42+0000) multi-call binary Usage: grep [-ihHnqvs] PATTERN [FILEs...] Search for PATTERN in each FILE or standard input. Options: -H prefix output lines with filename where match was found -h suppress the prefixing filename on output -i ignore case distinctions -l list names of files that match -n print line number with output lines -q be quiet. Returns 0 if result was found, 1 otherwise -v select non-matching lines -s suppress file open/read error messages"


Sciagam za pomoca SCTCS, czy jakis pakiet by sie gryzl?

A przy czym dokładnie masz ten błąd? Przy uruchamiania torrenta do ściągania, czy przy ładowaniu strony?
Ewedentnie nie może znaleść pliku (może w konfigu źle wpisałeś).

Czy ten sctcs to jest ten dodatek do ctorrenta, czy jakaś nowa aplikacja?

Sprawdziłem, to jest to co wcześniej używałem do ctorrenta. Miałem problem z passkey i nie mogłem ściągać torrentów z PT.
Dlatego że nie było nic innego napisałem coś własnego. Odnośnie interfejsu zawsze można go zmienić na bardziej zaawansowany, to jest dopiero 0.1 wersja :-).

strazak napisał/a:

Odpalenie z reki:
"/opt/local/bin/python" "/etc/TF_BitTornado/btphptornado.py" False 0 "/mnt/mnt/disc1_3/torrent/.torrents/ComUNL.torrent.stat" root --responsefile "/mnt/mnt/disc1_3/download/ComUNL" --display_interval 5 --max_download_rate 100 --max_upload_rate 100 --max_uploads 20 --minport 2700 --maxport 2701 --super_seeder 0

Startuje i po 2 s. wychodzi bez bledu
ComUNL.torrent.stat:

100
Download Failed!


root
+

0.0
0
0
0
0
ComUNL.torrent.stat.5299:
run - begin
display - begin
display - prior to self.write
writeStatus - begin
writeStatus - running :
writeStatus - stoppedAt :
display - end
failed - begin
display - begin
display - prior to self.write
writeStatus - begin
writeStatus - running :

writeStatus - stoppedAt :
display - end
failed - end
run - removing PID file :/mnt/mnt/disc1_3/torrent/.torrents/ComUNL.torrent.stat.pid
run - end

Gdzie robie blad ?

Hmm... Ten plik torrenta na pewno jest dobry?

AAAA napisałeś że ściągasz przez inną aplikację. Na 99% to jest właśnie ta przyczyna gdyż ten plik jest otworzony.

9

Odp: OpenWrt i ściąganie torrentów

bodzio_g napisał/a:

No jest ciekawie, im większy wybór tym lepiej smile .

czy można nim ściagać kilka torrentów na raz ?
I czy mógłbyś zrobić wersję pracująca poza gui wrt, tak jak np. amule na oddzielnym porcie ?

pozdrawiam i życzę powodzenia.

Można ściągać kilka torrentów naraz, ale UWAGA! Musisz się liczyć z dużym load average.
Testowałem przy 6 torrentach ściąganych jednocfześnie.

Co chodzi o wersję na oddzielnym porcie to musiałbym zaprząc http nowe, a tego chciałem właśnie uniknąć wykorzystując to co jest.

10 (edytowany przez strazak 2007-04-18 23:30:02)

Odp: OpenWrt i ściąganie torrentów

Po skonfigurowaniu wszystkiego zapodalem sciezki do torrentow, ktore juz mam, pokazuje je wszystkie. Takze uploadowanie torrenta dziala. po nacisnieciu DL wyrzuca te bledy, dokladnie wyglada to tak przy 2 jakby aktywnych:
Torrent Manager
cat: /mnt/mnt/disc1_3/torrent/.torrents/ComUNL.torrent.stat.pid: No such file or directory BusyBox v1.00 (2007.01.30-11:42+0000) multi-call binary Usage: grep [-ihHnqvs] PATTERN [FILEs...] Search for PATTERN in each FILE or standard input. Options: -H prefix output lines with filename where match was found -h suppress the prefixing filename on output -i ignore case distinctions -l list names of files that match -n print line number with output lines -q be quiet. Returns 0 if result was found, 1 otherwise -v select non-matching lines -s suppress file open/read error messages cat: /mnt/mnt/disc1_3/torrent/.torrents/Dupeguru.v2.4.8.Incl.Keygen-EXPLOSiON.torrent.stat.pid: No such file or directory BusyBox v1.00 (2007.01.30-11:42+0000) multi-call binary Usage: grep [-ihHnqvs] PATTERN [FILEs...] Search for PATTERN in each FILE or standard input. Options: -H prefix output lines with filename where match was found -h suppress the prefixing filename on output -i ignore case distinctions -l list names of files that match -n print line number with output lines -q be quiet. Returns 0 if result was found, 1 otherwise -v select non-matching lines -s suppress file open/read error messages
File Name Status Download & Upload Speed Action
----
ComUNL.torrent    
Stopped
   
DL=100%, UP=0.0%
   
DL=, UP=
   
DL, STOP, DEL
---
Dupeguru.v2.4.8.Incl.Keygen-EXPLOSiON.torrent    
Stopped
   
DL=%, UP=%
   
DL=, UP=
   
DL, STOP, DEL

Oczywiscie sciagnietych plikow torrentow brak. Torrenty z 2 stron PT i HT.
Co do SCTCS jest to programik napisany prze Madziara, dzialajacy na http, pokazujacy graficznie postep, predkosci i dzialajacy jako nakladka na Enhancent Torrent. Jego forum http://www.freeweb.hu/seaky77/sctcs/forum/index.php

Moze pomoze info, co siedzi w systemie :
busybox    1.00-5    Core utilities for embedded Linux systems
cbtt    20060211-1    Bittorrent tracker
cbtt-mysql    20060211-1    Bittorrent tracker with mysql support
ccxstream    1.0.15-3   
ctorrent    1.3.4-dnh2.2-1    console-based BitTorrent client
curl    7.14.0-1    a client-side URL transfer tool
enhanced-ctorrent    dnh2.2-6   
glib1    1.2.10-1    The GLib library of C routines
haserl    0.8.0-1    a CGI wrapper to embed shell scripts in HTML documents
libcurl    7.14.0-1    a client-side URL transfer library
libgcc    3.4.4-9    GCC support library
libmysqlclient    5.0.18-1    MySQL client library
libncurses    5.2-8    a terminal handling library and common terminal definitions
libopenssl    0.9.8d-1    OpenSSL (Secure Socket Layer) libraries
libpthread    0.9.27-1    POSIX threads library
libstdc++    0.2.0-6   
libuclibc++    0.2.2-4   
mc    4.6.1   
nano    1.3.8-1    An enhanced clone of the Pico text editor
nas    3.90.37-17    Proprietary Broadcom WPA Authenticator/Supplicant
ncurses    5.5-1   
ntpclient    2003_194-2    NTP client for setting system time from NTP servers.
nzbget    0.2.3-1    A command-line based binary newsgrabber
samba-server    2.0.10-2    NetBIOS/SMB file and print server
sctcs    0.851b   
uclibc    0.9.27-9    Standard C library for embedded Linux systems
uclibc++    0.1.11-2    A standard c++ library for embedded systems
uclibc-opt    0.9.28-11   
uclibcxx    0.2.1-1    C++ library for embedded systems
zlib    1.2.2-2    an implementation of the deflate compression method (library)

Zmiana katalogow, dostepu, konfiguracji i odpalenie z reki:
"/opt/local/bin/python" "/etc/TF_BitTornado/btphptornado.py" False 0 "/up/D.torrent.stat" root --responsefile "/up/2/" --display_interval 5 --max_download_rate 100 --max_upload_rate 100 --max_uploads 20 --minport 2700 --maxport 2701 --super_seeder 0
kilka sekund bez bledu i D.torrent.stat.8194:
run - begin
display - begin
display - prior to self.write
writeStatus - begin
writeStatus - Failed to Open StatFile
writeStatus - running :0
writeStatus - stoppedAt :
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
display - end
failed - begin
display - begin
display - prior to self.write
writeStatus - begin
writeStatus - running :
writeStatus - stoppedAt :
display - end
failed - end
run - removing PID file :/up/D.torrent.stat.pid
run - end

11 (edytowany przez plesken 2007-04-19 00:12:39)

Odp: OpenWrt i ściąganie torrentów

strazak napisał/a:

Po skonfigurowaniu wszystkiego zapodalem sciezki do torrentow, ktore juz mam, pokazuje je wszystkie. Takze uploadowanie torrenta dziala. po nacisnieciu DL wyrzuca te bledy, dokladnie wyglada to tak przy 2 jakby aktywnych:

Rozumiem że wgrałeś pliki *.torrent poprzez uploadera.

strazak napisał/a:

Torrent Manager
cat: /mnt/mnt/disc1_3/torrent/.torrents/ComUNL.torrent.stat.pid: No such file or directory BusyBox v1.00

ciach

Nie może znaleść pliku /mnt/mnt/disc1_3/torrent/.torrents/ComUNL.torrent.stat.pid, ponieważ takiego pliku nie utworzył, a powinien poprzez komende touch utworzyć pusty plik.
Sprawdź czy możesz w katalogu /mnt/mnt/disc1_3/torrent/.torrents/ coś zapisać z ręki i zobacz czy ta ścieżka się zgadza ze ścieżką podaną w pliku /etc/torrent.conf.

W źródle jest:
touch "$upload_path/.torrents/$name.stat"

Podaj mi swoje ustawienia w pliku /etc/torrent.conf

strazak napisał/a:

Oczywiscie sciagnietych plikow torrentow brak. Torrenty z 2 stron PT i HT.

No tak... bo ich nie ściąga.


strazak napisał/a:

Co do SCTCS jest to programik napisany prze Madziara, dzialajacy na http, pokazujacy graficznie postep, predkosci i dzialajacy jako nakladka na Enhancent Torrent. Jego forum http://www.freeweb.hu/seaky77/sctcs/forum/index.php

Tak już wiem. Miałem z tym problemy (też zrobiłem skrypty z użyciem sctcs) przy ściąganiu torrentów z PT.

strazak napisał/a:

Zmiana katalogow, dostepu, konfiguracji i odpalenie z reki:
"/opt/local/bin/python" "/etc/TF_BitTornado/btphptornado.py" False 0 "/up/D.torrent.stat" root --responsefile "/up/2/" --display_interval 5 --max_download_rate 100 --max_upload_rate 100 --max_uploads 20 --minport 2700 --maxport 2701 --super_seeder 0

kilka sekund bez bledu i D.torrent.stat.8194:
run - begin
display - begin
display - prior to self.write
writeStatus - begin
writeStatus - Failed to Open StatFile
writeStatus - running :0
writeStatus - stoppedAt :
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
writeStatus - Failed to Open StatFile for Writing
....
writeStatus - begin
writeStatus - running :
writeStatus - stoppedAt :
display - end
failed - end
run - removing PID file :/up/D.torrent.stat.pid
run - end

Nie może Ci zapisać pliku.
Ogólnie btphptornado jest uruchamiane według komendy:

"$python_path/python" -OO "$torrent_path/btphptornado.py" False 0 "$upload_path/.torrents/$name.stat" root --responsefile "$upload_path/$name" --display_interval 5 --max_download_rate $max_dw --max_upload_rate $max_up --max_uploads 20 --minport $min_port --maxport $max_port --super_seeder 0 &

Analizując to co Ty odpaliłeś z ręki to:
- błąd przy --responsefile, powinieneś podać nazwę pliku torrent

czyli u Ciebie powinno być:

"/opt/local/bin/python" "/etc/TF_BitTornado/btphptornado.py" False 0 "/up/D.torrent.stat" root --responsefile "/up/2/D.torrent" --display_interval 5 --max_download_rate 100 --max_upload_rate 100 --max_uploads 20 --minport 2700 --maxport 2701 --super_seeder 0

Oczywiście aby wskazać w którym katalogu ma zapisywać ściąganego torrenta to musisz przed odpaleniem tej komendy wejść do tego katalogu.
Jak zauważysz w źródle jest:

------------
cd "$upload_path"

..............

i później dopiero

"$python_path/python" -OO "$torrent_path/btphptornado.py" False 0 "$upload_path/.torrents/$name.stat" root --responsefile "$upload_path/$name" --display_interval 5 --max_download_rate $max_dw --max_upload_rate $max_up --max_uploads 20 --minport $min_port --maxport $max_port --super_seeder 0 &


Czy jak wejdziesz w "Settings" to widzisz swoje ustawienia?

12

Odp: OpenWrt i ściąganie torrentów

W settingu widze swoje ustawienia, po podaniu Twojego polecenia zaczelo sie cos dziac. Juz jest troche pozno, ale widze, ze bedzie dobrze smile.

13

Odp: OpenWrt i ściąganie torrentów

strazak napisał/a:

W settingu widze swoje ustawienia, po podaniu Twojego polecenia zaczelo sie cos dziac. Juz jest troche pozno, ale widze, ze bedzie dobrze smile.

Ok :-). Ja niestety dzisiaj w nocy pracuje, jakiś bzdurny serwer rekompiluje :-(. Zachciało mi się być adminem hehe