T3adda direct lel contenu

Chnowa howa DHT fi BitTorrent? Trackers, DHT, w peer exchange

Efhem BitTorrent DHT (BEP 5), el trackers el markaziya, w PEX (BEP 11). T3allem kifach el swarms men ghir trackers yal9aw peers w kifach ye5dmou el magnet links.

Bil mokhtasar

  • El Distributed Hash Table (DHT) y5alli clients BitTorrent yal9aw peers fil swarm men ghir ma y3ammlou 3la serveurs trackers markaziya.
  • BitTorrent yesta3mel 3 taba9at bech yal9a peers: trackers markaziya, Kademlia DHT (BEP 5), w Peer Exchange (PEX, BEP 11).
  • El magnet links y3ammlou 3al DHT bech yal9aw el peers el lowlin, w ba3d yesta3mlou protocole BEP 9 bech ynazlou el métadonnées.
  • MacLC ydammej libtorrent bech ystreami el vidéo direct men magnet links w fichiers .torrent men ghir ma yestanna el tanzil yekmel.
Fi hal saf7a
  1. Chnowa howa DHT fi BitTorrent, w kifach ye5dem?
  2. Trackers, DHT, w PEX: Kifach yet9arnou?
  3. Kifach el table de routage Kademlia tal9a el peers?
  4. 3lach el magnet links yest7a9ou DHT bech ye5dmou?
  5. Chnowa ta2thir el DHT 3al khousousiya (privacy)?
  6. Kifach MacLC yet3amel m3a magnet links w torrent streaming?
  7. Asas el streaming el la-markazi

El Distributed Hash Table (DHT) fi BitTorrent howa protocole la-markazi mta3 ba7th peer-to-peer y5alli el lecteurs vidéo w clients torrent yal9aw pcyet o5ra tpartagi fichier men ghir ma ykalmou serveur tracker markazi. Mabni 3al algorithme Kademlia w mwasaf fi BitTorrent Enhancement Proposal 5 (BEP 5), el DHT y7awwel el swarm el kol l-base de données mouwazza3a win kol ordinateur mcharak y3awen fi ta5zin w tawjih ma3loumet el peers.

Fil ayem el lowla mta3 el partagi peer-to-peer, ken tracker markazi yti7, yet9ass, wella yebloqui-h fournisseur d’accès internet, el swarm el kol kan ya9ef fi blasstou. B-jam3 el trackers m3a el DHT wel Peer Exchange (PEX), BitTorrent el jdid ye5dem ka réseau maillé ydawwi rouhou b-rouhou, ynajem yal9a peers, yetbadel métadonnées, w ystreami vidéo 7atta kif kol serveur markazi yetsakker.

Animation

Where the pieces come from, and in which order

seeder60 %seeder35 %80 %50 %seederYouStarting…
Seeders (solid) have the whole file; leechers (partial rings) are still downloading and share what they have. Rarest first spreads pieces evenly across the swarm. Streaming asks for the pieces just ahead of the playhead first, so the film can start before the download ends.

Chnowa howa DHT fi BitTorrent, w kifach ye5dem?

Bech tefhem el Distributed Hash Table, chouf kifach kan ye5dem el réseau peer-to-peer el 9dim.

Fil architecture el aslya mta3 Bram Cohen, kol fichier .torrent kan fih lista mta3 trackers—serveurs web HTTP wella UDP markaziya. Kol ma t7ell torrent, el PC mte3ek yab3ath talab “announce” lel tracker. El tracker ysajjel el IP mte3ek w yraja3lek lista fiha 50 PC e5er 9a3din ynazlou wella ypartagiw nafss el fichier.

Rغم elli kanet sri3a, el trackers el markaziya kanet fiha 3 mouchkilat kbar:

  1. No9tet fachel wa7da: Ken el serveur mta3 el tracker yti7 wella yet3abba, el mosta3mlin ej-jdod ma yajmouch yal9aw peers.
  2. El 7ajb wel censure: Les fournisseurs internet yajmou b-souhoula yebloquiw esm el domaine wella el IP mta3 el tracker.
  3. Takalif el serveurs: El mo7afdha 3la serveurs kbar yethamlou melayin el talabat kol d9i9a tetsamma barcha flous.

Fi 2005, el mojtama3 mta3 BitTorrent 7all hal mochkel b-BEP 5, elli sna3 réseau men ghir trackers ye5dem bel Distributed Hash Table.

Fi 3oudh ma t5abbi listat el peers 3la serveurs markaziya, el DHT ywazza3 el daftar 3la melayin el mosta3mlin fil 3alam. Kol client y5addem DHT ywalli “node” fi base de données kbira. Kif t7ell torrent, el client ye7seb el info hash mta3 el fichier (20 bytes), yes2el el nodes el 9rab fil DHT, w yal9a el seeders direct.

Trackers, DHT, w PEX: Kifach yet9arnou?

Les clients BitTorrent el jdod ma y3ammlouch 3la tari9a wa7da. Yesta3mlou 3 taba9at bech yal9aw peers b-a9sa sor3a:

El Miza Trackers Markaziya (BEP 3 / BEP 15) Distributed Hash Table (DHT / BEP 5) Peer Exchange (PEX / BEP 11)
El Architecture Client-serveur markazi Réseau Kademlia la-markazi Hadrra moubachra bin el peers
Protocole de Transport HTTP/HTTPS wella UDP UDP Remote Procedure Calls (RPC) Messages extension TCP / μTP
No9tet Fachel Wa7da? Ey (Ken el tracker yti7, ya9ef el ba7th) Lé (La-markazi tamamman) Lé (Y3ammel 3al swarm el mawjoud)
Chnowa Ye7taj fel Bidaya Itisal moubacher b-URL el serveur Ye7taj bootstrap nodes fel lowel Ye7taj 3al a9al peer wa7ed mottasel
Fatrat el Ba7th Kol 900 l-1,800 thanya Routage mostamerr fil jiwar Kol 60 thanya bin el peers
Yda3em Magnet Links? Ey (Ken el trackers maktoubin fil URI) Asasi (Yal9a el métadonnées el lowla) Lé (Yzid el itisalat el mawjouda bark)
Torrents Privés Da3m kamil (Yatabbe9 el 9awanin) Mtaffi b-drapeau private: 1 Mtaffi b-drapeau private: 1

Hal 3 andhma ykammlou ba3dhhom:

  1. Trackers: Ya3tiw daf3a kbira mta3 peers madhmounin awel ma tebda el tanzil.
  2. DHT: Yal9a peers kif el trackers yti7ou wella yetbloquaw, wella kif t7ell magnet links men ghir trackers.
  3. Peer Exchange (PEX): Awel ma tettesel b-2 wella 3 peers, PEX yes2elhom m3a chkoun houma mottaslin, w hakka yakbar el swarm b-sor3a men ghir ma teb3ath talabat l-barra.

Bech tefhem akther kifach el client yet3adda mel ba7th lel streaming, a9ra Kifach ye5dem el torrent streaming.

Kifach el table de routage Kademlia tal9a el peers?

El DHT mta3 BitTorrent howa tatbi9 l-algorithme Kademlia, elli sna3ouh Petar Maymounkov w David Mazières.

Kademlia ynaddhem kol node 3al internet w kol torrent fi nafss el majal el riyadhi:

1. Majal Node ID mta3 160-Bit

Kol node DHT yasna3 mo3arref 3achwa2i mta3 160-bit (Node ID) awel ma ye5dem. W kol torrent mo3arref bel info hash mte3ou mta3 20-byte (160-bit).

5ater el Node IDs wel info hashes yetcharkou fi nafss el majal mta3 160-bit, Kademlia y9is el “9orb” bin zouz pcyet b-opération XOR:

Distance(A, B) = A ⊕ B

Hal masafa el riyadhiya ma t9isch el masafa el joghrafiya bel kilometrat wella el ping bel millisecondes: t9is el ta9arob el ra9mi bin zouz ar9am 160-bit.

2. Ba7th Récursif 3al Nodes

Wa9t el client mte3ek ylawwej 3la peers l-film 3andou info hash H:

  1. Ylawwej fi jadwel el routage mte3ou 3al nodes elli el Node ID mte3hom a9rab ma ykoun l-H 7asb XOR.
  2. Yab3ath talab UDP get_peers lel nodes el 9rab hedhoukom.
  3. Ken hal nodes mcharkin fil swarm, yraja3oulou lista mta3 IPs el peers.
  4. Ken ma 3andhomch el lista, yraja3oulou IPs mta3 nodes o5rin fi jadwelhom a9rab l-H.
  5. El client y3awed hal 3amaliya lin yousel lel majmou3a el mas2oula 3la ta5zin ma3loumet hedheka el info hash.

Kima mfassar fil spécification BEP 5, el nodes yeta7kaw b-arba3a appels UDP khfaf: ping, find_node, get_peers, w announce_peer.

Kif tnazzel fichier .torrent, yji m3ah el chajara mta3 el dossiers, 7ajm el fichiers, w el hashes SHA-1 mta3 kol 9at3a.

Ama el magnet link howa juste chaine de texte (URI). Mathalan:

magnet:?xt=urn:btih:3b245504d6f3a401d4a0...&dn=Sintel

La7edh elli el lien ma fih chay ghir el info hash (xt) w esm el fichier (dn). Ma fih la listat fichiers, la 7ajm el 9ata3, w ghaleban ma fih 7atta tracker.

Bech magnet link yebda ye5dem, el client lezmou yesta3mel DHT 3la mar7altin:

  1. Yal9a Peers b-DHT: El client yesta3mel el info hash bech ydour fil Kademlia DHT w yal9a IPs mta3 peers nachitin.
  2. Ynazzel el Metainfo b-BEP 9: Ta7t BEP 9 (ut_metadata), el client yettesel b-hedhoukom el peers w yotlob menhom yab3athoulou el métadonnées .torrent direct.

Awel ma yousel el dictionnaire mta3 el métadonnées w yetthabbet mennou, el lecteur yasna3 el fichiers w yebda yotlob el 9ata3 mta3 el vidéo. L-tafhm akther 3al magnet links, a9ra Chnowa howa el magnet link.

Chnowa ta2thir el DHT 3al khousousiya (privacy)?

Fama fekra ghalta elli 5ater el DHT la-markazi, donc y5alli el torrenting serri wella anonyme.

Fil wa9e3, el DHT mta3 BitTorrent howa daftar 3alani, mouch mchaffar, w maftou7 lel ness el kol:

  • Swarm Makchouf: Ay PC ynajem yes2el el DHT 3la ay info hash w ye5ou el IPs el 3ammiya wel ports mta3 el peers el kol.
  • DHT Crawlers: Chareket ta7lil w mo2assasat ra9aba t5addem robots “DHT crawlers” dima tmassi el réseau el kol w tsajjel chkoun ycharak fi anehi swarms.
  • Ma fammech tachfir asasi: 7atta ken el data tetb3ath b-Message Stream Encryption (MSE), talabat el DHT tetb3ath wadha7 fi paquets UDP 3adiyin.

Ken el client mte3ek wa7el fi “connecting to peers”, chouf el guide mte3na Torrent wa7el fi connecting to peers.

MacLC fih moteur streaming BitTorrent mabni 3la libtorrent, elli y5allik tstreami el vidéowat men magnet links wella fichiers .torrent men ghir ma testanna el tanzil yekmel.

Kif t7ell magnet link fi MacLC:

  1. Fat7 el liens: Enzel Command-U (File › Open Web Video) bech talsa9 ay magnet link, wella ejbed fichier .torrent l-wost el fenetre.
  2. DHT w métadonnées: El moteur libtorrent ykalem el réseau DHT bech y7ell el info hash w ynazzel el métadonnées (BEP 9).
  3. El start gate: Écran animé yfassar kol mar7la. El start gate yestanna ta9riban 20 thanya mel film wa9t ye9is sor3et el swarm, w ba3d y7afedh 3la buffer bin 10 w 90 thanya 7asb el sor3a, w y5addem el film fi kol 7al ba3d d9i9tin.
  4. Mouchirat el lecture: 3alama 3al barre de lecture twarrik chnowa mcharji l-9oddem, m3a el sor3a el 7aliya w 3adad el peers.

Bech tefhem akther el bibliothèques C++ elli t5addem el lecteurs, a9ra Chnowa howa libtorrent w Seeders vs leechers.

Asas el streaming el la-markazi

El Distributed Hash Table howa we7ed men a9wa el injazat el handasiya fi tari5 el internet. B-ta3widh el serveurs el markaziya b-réseau riyadhi mabni 3la Kademlia w BEP 5, el DHT yadhman elli el aflam el maftou7a wel archivage el 3am yajmou y3ichou dima men ghir idara markaziya.

M3a MacLC 3la Apple Silicon, el DHT ye5dem fil 5afé, y7ell el magnet links w ywaslek lel swarms bech tmarkez enti 3al tafaroj bark.

As2ela yet3awdou

Chnowa el far9 bin tracker w DHT fi BitTorrent?

El tracker howa serveur markazi y7afedh 3la lista mta3 adresses IP el nachita fil swarm. El DHT howa réseau peer-to-peer la-markazi win kol client mottasel ye5dem ka tracker sghir y5azen w yjaweb 3la talabat el peers men ghir serveur markazi.

Ynajem torrent yetnazzel ken el trackers lkol tay7in?

Ey. Ma dam el DHT ma7loul wel swarm mouch ma7tout fih drapeau private, el client mte3ek ynajem yal9a el seeders wel leechers el kol 3abr el réseau DHT.

Chnowa howa Peer Exchange (PEX) fi BitTorrent?

Peer Exchange (BEP 11) howa protocole y5alli el peers elli deja mottaslin b-ba3dhhom yetbadlou listat mta3 peers o5rin fil nafss el swarm, w hakka yakbar el swarm fisa3 men ghir ma yes2el trackers wella DHT.

Est-ce que el DHT y5alli el torrenting anonyme?

Lé. El DHT mta3 BitTorrent 3alani tamamman. Kol client mcharak ywarri el adresse IP wel port mte3ou l-nodes o5rin. Ay taraf theleth ynajem yes2el el DHT bech ya3ref chkoun ycharak fi swarm mo3ayyen.

Before you download

MacLC is free. If it is useful to you, a gift helps it skip “Open Anyway” and funds the next release.