libtorrent資料整理

源碼libtorrent源碼地址:https://github.com/arvidn/libtorrent/releases

libtorrent Java庫地址: https://github.com/frostwire/frostwire-jlibtorrent/
libtorrent 官方Android實現: https://github.com/mianharisali/TorrentStream-Android
libtorrent 官方node.js實現: https://github.com/fanatid/libtorrent-rasterbar
libtorrent 官方go實現: https://github.com/steeve/libtorrent-go
libtorrent 官網: http://www.libtorrent.org/
boost源碼: https://sourceforge.net/projects/boost/files/boost/1.65.1/
xbt-tracker官網: http://xbtt.sourceforge.net/tracker/
xbt-tracker使用:
svn co http://xbt.googlecode.com/svn/trunk/xbt/misc xbt/misc
svn co http://xbt.googlecode.com/svn/trunk/xbt/Tracker xbt/Tracker
cd xbt/Tracker
./make.sh
cp xbt_tracker.conf.default xbt_tracker.conf

 

原理協議
維基專題: https://wiki.theory.org/index.php/BitTorrentSpecification#Extension_protocol
bt協議官網: http://bittorrent.org/beps/bep_0000.html
bt官網譯文: http://blog.csdn.net/xxxxxx91116/article/details/7970815
torrent文件解析: http://www.cnblogs.com/hnrainll/archive/2011/07/21/2112809.html
 
其餘p2p協議
JXTA: https://www.ibm.com/developerworks/cn/java/j-jxta2/ 
JXTA: http://www.cnblogs.com/cuizhf/p/3567752.html
openpeer: https://openpeer.org/open-peer-sdk-for-android/
 
編譯相關:
libtorrent NDK編譯: http://blog.csdn.net/echoaiya/article/details/44196771
(現使用的RutrackerDownloader編譯的apk的引用網址也源自與此)
Boost-for-android: https://github.com/moritz-wundke/Boost-for-Android 
 
vbytes(目前p2p產品主要參考的產品)
vbyteAPI地址: http://www.vbyte.cn/vlogin.html 
測試地址:  http://devcenter.vbyte.cn 
測試賬號: 用戶名:  test@vbyte.cn,密碼: Vb360
 
libtorrent自帶測試程序使用樣例
製做種子:(XXX://120.77.237.39:2710/announce是trakcer地址,能夠用-t指定多個)
./make_torrent movie2/fntg1024bd.mkv -t http://120.77.237.39:2710/announce 
-t udp://120.77.237.39:2710/announce -o movie2/fntg1024bd.torrent -C seecool -c "testvideo"

tracker狀態監控:php

http://120.77.237.39:2710/status
client_test直接使用infohash:
./client_test 4624f1877cc6a06e3d8e688e5354876501482acb@http://120.77.237.39:2710/status -s downloaddir/ -f debug.log

公司的網絡環境:html

[root@master stund]# ./client stun.xten.com 0
STUN client version 0.97
running test number 0
Primary: Dependent Mapping, preserves ports, no hairpin    
Return value is 0x000019

演示環境java

[root@master stund]# ./client stun.xten.com 0
STUN client version 0.97
running test number 0
Primary: InDependent Mapping, random ports, will hairpin    
Return value is 0x000019

172網段網絡檢測結果:node

http://cc.rtmfp.net/

對稱.png

 
UPnP專題:
路由器須要配置Upnp說明(轉發規則->Upnp)

zzzzz.png

 
Upnp-Notify抓包
NOTIFY * HTTP/1.1
HOST:239.255.255.250:1900
Cache-Control:max-age=120
Location:http://192.168.2.1:35259/rootDesc.xml
Server: ASUSTeK UPnP/1.0 MiniUPnPd/1.4
NT:urn:schemas-upnp-org:device:InternetGatewayDevice:1
USN:uuid:a5631a65-f098-440e-8d12-d636413e2300::urn:schemas-upnp-org:device:InternetGatewayDevice:1
NTS:ssdp:alive

UPnP響應抓包:android

HTTP/1.1 200 OK
CACHE-CONTROL: max-age=120
ST: upnp:rootdevice
USN: uuid:a5631a65-f098-440e-8d12-d636413e2300::upnp:rootdevice
EXT:
SERVER: ASUSTeK UPnP/1.0 MiniUPnPd/1.4
LOCATION: http://192.168.2.1:35259/rootDesc.xml

UPnP設備搜索抓包:git

M-SEARCH * HTTP/1.1
HOST: 239.255.255.250:1900
ST:upnp:rootdevice
MAN:"ssdp:discover"
MX:3

client_test與tracker交互抓包github

GET /announce?info_hash=%c6%d9%8a%82!%caVO%3e%a5%f7%d32%27%5d%e9HV&peer_id=-LT1150-s!q(NgykSRLV&port=6881&uploaded=0&downloaded=0&left=0&corrupt=0&key=AEFD4871&event=stopped&numwant=0&compact=1&no_peer_id=1&supportcrypto=1&redundant=0 HTTP/1.1
Host: 120.77.237.35:2710
User-Agent: client_test/1.1.5.0
Accept-Encoding: gzip
Connection: close

HTTP/1.0 200 OK

d8:completei0e10:incompletei1e8:intervali1800e12:min intervali1800e5:peers0:e

網絡穿透權威資料網絡

P2P網絡中的NAT穿透機制研究.nh
經過HTTP的方式提供種子
libtorrent內已經支持,格式可參考維基百科: https://wiki.vuze.com/w/HTTP_Seeding
 
WebSeed模式分爲兩種:
BEP17服務端適配: http://bittorrent.org/beps/bep_0017.html
BEP19客戶端適配: http://bittorrent.org/beps/bep_0019.html

獲取本身外網IP接口:
http://ip.taobao.com/service/getIpInfo.php?ip=myip​ 
相關文章
相關標籤/搜索