源码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/miscsvn co http://xbt.googlecode.com/svn/trunk/xbt/Tracker xbt/Trackercd xbt/Tracker ./make.shcp 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状态监控:
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
公司的网络环境:
[root@master stund]# ./client stun.xten.com 0STUN client version 0.97running test number 0Primary: Dependent Mapping, preserves ports, no hairpin Return value is 0x000019
演示环境
[root@master stund]# ./client stun.xten.com 0STUN client version 0.97running test number 0Primary: InDependent Mapping, random ports, will hairpin Return value is 0x000019
172网段网络检测结果:
UPnP专题:
路由器需要配置Upnp说明(转发规则->Upnp)
Upnp-Notify抓包
NOTIFY * HTTP/1.1HOST:239.255.255.250:1900Cache-Control:max-age=120Location:http://192.168.2.1:35259/rootDesc.xmlServer: ASUSTeK UPnP/1.0 MiniUPnPd/1.4NT:urn:schemas-upnp-org:device:InternetGatewayDevice:1USN:uuid:a5631a65-f098-440e-8d12-d636413e2300::urn:schemas-upnp-org:device:InternetGatewayDevice:1NTS:ssdp:alive
UPnP响应抓包:
HTTP/1.1 200 OK CACHE-CONTROL: max-age=120ST: upnp:rootdevice USN: uuid:a5631a65-f098-440e-8d12-d636413e2300::upnp:rootdevice EXT: SERVER: ASUSTeK UPnP/1.0 MiniUPnPd/1.4LOCATION: http://192.168.2.1:35259/rootDesc.xml
UPnP设备搜索抓包:
M-SEARCH * HTTP/1.1HOST: 239.255.255.250:1900ST:upnp:rootdevice MAN:"ssdp:discover"MX:3
client_test与tracker交互抓包
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.1Host: 120.77.237.35:2710User-Agent: client_test/1.1.5.0Accept-Encoding: gzipConnection: 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
转载请注明来源:https://www.cnblogs.com/bugutian/