- 浏览: 224847 次
- 性别:
- 来自: 北京
最新评论
-
lzj0470:
这种方式,带来的问题很大。如:返回一个对象,然后再调用一些办法 ...
自定义classloader加密java程序 -
bushkarl:
JavaScript 胸罩尺寸计算器 -
bushkarl:
...
Ubuntu php 环境配置 -
dearsunkey:
hao !
Ubuntu php 环境配置 -
qskm:
这个怎么用呢?楼主没说清楚啊,
1、 加密的话该怎么加密?直接 ...
自定义classloader加密java程序
留存。。以作参考。。
原文:http://xbtt.sourceforge.net/udp_tracker_protocol.html
UDP tracker protocol
Introduction
The UDP tracker protocol is a high-performance low-overhead BitTorrent tracker protocol. URLs for this protocol look like udp://tracker:port.
Azureus, XBT Client and XBT Tracker support this protocol.
All values are send in network byte order (big endian). Do not expect packets to be exactly of a certain size. Future extensions could increase the size of packets.
Set n to 0.
If no response is received after 60 * 2 ^ n seconds, resend the connect request and increase n.
If a response is received, reset n to 0.
HTTP vs UDP
* Ethernet: 14 bytes
* IP: 20 bytes
* TCP: 20 bytes
* UDP: 8 bytes
Protocol Packets Non-user User Total
HTTP 10 540 247 + 119 + 6 * N = 366 + 6 * N 906 + 6 * N
UDP 4 168 16 + 16 + 98 + 20 + 6 * N = 150 + 6 * N 318 + 6 * N
HTTP - UDP 6 372 216 588
HTTP / UDP 2.5 3.2 1.5 2.0
The UDP tracker protocol uses (less than) 50% of the bandwidth the HTTP tracker protocol uses. And because UDP is stateless, limits to the number of (open) TCP connections a router or server can handle, do not apply.
Structures
Before announcing or scraping, you have to obtain a connection ID.
1. Choose a (random) transaction ID.
2. Fill the connect input structure.
3. Send the packet.
connect input Offset Size Name Value
0 64-bit integer connection_id 0x41727101980
8 32-bit integer action 0
12 32-bit integer transaction_id
16
1. Receive the packet.
2. Check whether the packet is at least 16 bytes.
3. Check whether the transaction ID is equal to the one you chose.
4. Check whether the action is connect.
5. Store the connection ID for future use.
connect output Offset Size Name Value
0 32-bit integer action 0
4 32-bit integer transaction_id
8 64-bit integer connection_id
16
1. Choose a (random) transaction ID.
2. Fill the announce input structure.
3. Send the packet.
announce input Offset Size Name Value
0 64-bit integer connection_id
8 32-bit integer action 1
12 32-bit integer transaction_id
16 20-byte string info_hash
36 20-byte string peer_id
56 64-bit integer downloaded
64 64-bit integer left
72 64-bit integer uploaded
80 32-bit integer event
84 32-bit integer IP address 0
88 32-bit integer key
92 32-bit integer num_want -1
96 16-bit integer port
98
1. Receive the packet.
2. Check whether the packet is at least 20 bytes.
3. Check whether the transaction ID is equal to the one you chose.
4. Check whether the action is announce.
5. Do not announce again until interval seconds have passed or an event has happened.
announce output Offset Size Name Value
0 32-bit integer action 1
4 32-bit integer transaction_id
8 32-bit integer interval
12 32-bit integer leechers
16 32-bit integer seeders
20 + 6 * n 32-bit integer IP address
24 + 6 * n 16-bit integer TCP port
20 + 6 * N
Up to about 74 torrents can be scraped at once. A full scrape can't be done with this protocol.
1. Choose a (random) transaction ID.
2. Fill the scrape input structure.
3. Send the packet.
scrape input Offset Size Name Value
0 64-bit integer connection_id
8 32-bit integer action 2
12 32-bit integer transaction_id
16 + 20 * n 20-byte string info_hash
16 + 20 * N
1. Receive the packet.
2. Check whether the packet is at least 8 bytes.
3. Check whether the transaction ID is equal to the one you chose.
4. Check whether the action is scrape.
scrape output Offset Size Name Value
0 32-bit integer action 2
4 32-bit integer transaction_id
8 + 12 * n 32-bit integer seeders
12 + 12 * n 32-bit integer completed
16 + 12 * n 32-bit integer leechers
8 + 12 * N
If the tracker encounters an error, it might send an error packet.
1. Receive the packet.
2. Check whether the packet is at least 8 bytes.
3. Check whether the transaction ID is equal to the one you chose.
error output Offset Size Name Value
0 32-bit integer action 3
4 32-bit integer transaction_id
8 string message
If the tracker requires authentication, an authentication structure has to be appended to every packet you send to the tracker. The hash is the first 8 bytes of sha1(input + username + sha1(password)).
authenticate input Offset Size Name
0 8-byte zero-padded string username
8 8-byte string hash
16
Actions
* 0: connect
* 1: announce
* 2: scrape
* 3: error
Events
* 0: none
* 1: completed
* 2: started
* 3: stopped
原文:http://xbtt.sourceforge.net/udp_tracker_protocol.html
UDP tracker protocol
Introduction
The UDP tracker protocol is a high-performance low-overhead BitTorrent tracker protocol. URLs for this protocol look like udp://tracker:port.
Azureus, XBT Client and XBT Tracker support this protocol.
All values are send in network byte order (big endian). Do not expect packets to be exactly of a certain size. Future extensions could increase the size of packets.
Set n to 0.
If no response is received after 60 * 2 ^ n seconds, resend the connect request and increase n.
If a response is received, reset n to 0.
HTTP vs UDP
* Ethernet: 14 bytes
* IP: 20 bytes
* TCP: 20 bytes
* UDP: 8 bytes
Protocol Packets Non-user User Total
HTTP 10 540 247 + 119 + 6 * N = 366 + 6 * N 906 + 6 * N
UDP 4 168 16 + 16 + 98 + 20 + 6 * N = 150 + 6 * N 318 + 6 * N
HTTP - UDP 6 372 216 588
HTTP / UDP 2.5 3.2 1.5 2.0
The UDP tracker protocol uses (less than) 50% of the bandwidth the HTTP tracker protocol uses. And because UDP is stateless, limits to the number of (open) TCP connections a router or server can handle, do not apply.
Structures
Before announcing or scraping, you have to obtain a connection ID.
1. Choose a (random) transaction ID.
2. Fill the connect input structure.
3. Send the packet.
connect input Offset Size Name Value
0 64-bit integer connection_id 0x41727101980
8 32-bit integer action 0
12 32-bit integer transaction_id
16
1. Receive the packet.
2. Check whether the packet is at least 16 bytes.
3. Check whether the transaction ID is equal to the one you chose.
4. Check whether the action is connect.
5. Store the connection ID for future use.
connect output Offset Size Name Value
0 32-bit integer action 0
4 32-bit integer transaction_id
8 64-bit integer connection_id
16
1. Choose a (random) transaction ID.
2. Fill the announce input structure.
3. Send the packet.
announce input Offset Size Name Value
0 64-bit integer connection_id
8 32-bit integer action 1
12 32-bit integer transaction_id
16 20-byte string info_hash
36 20-byte string peer_id
56 64-bit integer downloaded
64 64-bit integer left
72 64-bit integer uploaded
80 32-bit integer event
84 32-bit integer IP address 0
88 32-bit integer key
92 32-bit integer num_want -1
96 16-bit integer port
98
1. Receive the packet.
2. Check whether the packet is at least 20 bytes.
3. Check whether the transaction ID is equal to the one you chose.
4. Check whether the action is announce.
5. Do not announce again until interval seconds have passed or an event has happened.
announce output Offset Size Name Value
0 32-bit integer action 1
4 32-bit integer transaction_id
8 32-bit integer interval
12 32-bit integer leechers
16 32-bit integer seeders
20 + 6 * n 32-bit integer IP address
24 + 6 * n 16-bit integer TCP port
20 + 6 * N
Up to about 74 torrents can be scraped at once. A full scrape can't be done with this protocol.
1. Choose a (random) transaction ID.
2. Fill the scrape input structure.
3. Send the packet.
scrape input Offset Size Name Value
0 64-bit integer connection_id
8 32-bit integer action 2
12 32-bit integer transaction_id
16 + 20 * n 20-byte string info_hash
16 + 20 * N
1. Receive the packet.
2. Check whether the packet is at least 8 bytes.
3. Check whether the transaction ID is equal to the one you chose.
4. Check whether the action is scrape.
scrape output Offset Size Name Value
0 32-bit integer action 2
4 32-bit integer transaction_id
8 + 12 * n 32-bit integer seeders
12 + 12 * n 32-bit integer completed
16 + 12 * n 32-bit integer leechers
8 + 12 * N
If the tracker encounters an error, it might send an error packet.
1. Receive the packet.
2. Check whether the packet is at least 8 bytes.
3. Check whether the transaction ID is equal to the one you chose.
error output Offset Size Name Value
0 32-bit integer action 3
4 32-bit integer transaction_id
8 string message
If the tracker requires authentication, an authentication structure has to be appended to every packet you send to the tracker. The hash is the first 8 bytes of sha1(input + username + sha1(password)).
authenticate input Offset Size Name
0 8-byte zero-padded string username
8 8-byte string hash
16
Actions
* 0: connect
* 1: announce
* 2: scrape
* 3: error
Events
* 0: none
* 1: completed
* 2: started
* 3: stopped
发表评论
-
男士常见肌肤问题及针对方案
2008-06-17 12:54 1299问题一:皮肤就象个大油田,常常看上去油光光的,可是感觉居然还是 ... -
做软件外包就像农民种地一样
2008-06-12 13:23 2190中关 村软件园里,坐落 ... -
MDA-ZZ
2008-05-10 20:20 1214MDA(Model Driven Architectur ... -
男人最帅的39个瞬间 =共勉~
2008-04-20 02:18 9961.不说话的时候。 沉默 ... -
把你的DV作品送到嘎纳去吧
2008-04-08 17:26 1020可能在大多数人眼中, ... -
意大利作曲家维瓦尔第
2008-04-03 10:57 1010意大利作曲家。 167 ... -
NGOSS:下一代网络运营支撑系统
2008-03-27 23:19 1149摘要:首先介绍了NGOSS ... -
给女孩的话:当他不再爱你的时候
2008-03-26 20:16 1288当他不再爱你的时候,不要再给他打电话。你的一句我想你,只能换来 ... -
服务发现ZZ
2008-03-24 10:08 976服务发现:采用自上而 ... -
.NET平台下几种SOCKET模型的简要性能供参考ZZZ
2008-03-17 19:57 1344这个内容在cnblogs中也讨论过很多次了,这两天大概看了一些 ... -
牛仔裤你一定要知道的16条ZZZ
2008-03-06 09:10 9321买牛仔裤,裤腰处留出3 ... -
How to Deal With Out Of Memory Errors(ZZZ)
2008-03-01 09:59 1548These errors are rather commonl ... -
2007浙江高考满分作文之一行走在消逝中
2008-02-11 12:24 1775——loli有三好,身娇 ... -
DOS here
2008-02-02 18:18 1217挺方便的。代码记在这。 引用Windows Registry ... -
IP多播【转】
2008-01-28 21:53 1882IP多播(也称多址广播 ... -
Why Ruby on Rails won't become mainstream【转】
2008-01-28 12:43 1215在tss看到的,原帖地址是: http://beust.com ... -
比較Java和C++的總體擁有成本
2008-01-18 13:28 1088BEA公司的白皮書,比較了Java和C++的總體擁有成本 -
人生能有5次就好了
2008-01-17 19:59 1487有好多想做的事情 我想当学校的老师... 也想当宇宙飞 ... -
BGP协议【转载自51cto】
2008-01-16 14:21 1098刚才看streaming的paper,发现自己欠缺的太多了。 ... -
大学的脾气有多大【转自豆瓣九点】
2008-01-13 16:16 1233大学的“脾气”有多大 ...
相关推荐
etorrent 是一个用Erlang语言开发的Bittorrent客户端,当前支持的 BEP: BEP 03 - The BitTorrent ... BEP 15 - UDP Tracker Protocol BEP 23 - Tracker Returns Compact Peer Lists. 标签:etorrent
4. **UDP Tracker Protocol**:UDP追踪器协议,提高了连接速度和效率,减少了服务器负担。 5. **eDonkey Network**:eDonkey网络,是eMule最初的共享网络,采用客户端-服务器模式。 6. **Kad Network**:kad网络,是...
状态:不完整(排序) 从跟踪器(UDP)获取种子信息 为了发现群中的其他对等方,客户端将UDP数据包发送给跟踪器,以宣布其存在。 请求和响应都很短。 如果使用TCP,则必须打开和关闭连接,这会带来额外的开销。 因此...
UDP(User Datagram Protocol)是一种无连接的传输协议,相对于TCP而言,它更注重速度而非可靠性。在VR环境中,实时性至关重要,因此UDP常被用于低延迟的通信需求。 该控制台应用的工作原理是,它会周期性地广播...
UDP(User Datagram Protocol)是一种无连接的、不可靠的传输层协议,常用于实时数据传输,如音频、视频流媒体,以及对延迟敏感的游戏应用。P2P(Peer-to-Peer)网络则是一种分布式网络架构,其中每个节点既是服务器...
洪流追踪器 用Python 3编写的UDP洪流跟踪器抓取器 安装 pipenv install torrent-tracker-scraper pipenv shell 用法 传递信息哈希列表 from torrent_tracker_scraper import scraper ... 'tracker' : 'udp://exp
UDP(User Datagram Protocol)是一种无连接的传输层协议,常用于需要快速传输数据且对数据完整性要求不高的场合。在P2P网络中,尤其是BitTorrent协议,UDP跟踪器(Tracker)扮演了关键角色,它帮助协调客户端之间的...
5. **UDP Tracker Support**:除了传统的HTTP/HTTPS tracker之外,BitTorrent还支持基于UDP的追踪器,这可以提高追踪请求的效率。 6. **Bandwidth Management**:为了公平地分配网络资源,客户端会限制其上传和下载...
10. **扩展协议**:原版BitTorrent协议经过多次扩展,如uTP(Micro Transport Protocol)用于优化网络资源,或者扩展如Fast Extension以加速文件交换。 11. **源代码结构**:熟悉常见的编程语言(如C++、Python或...
anacrolix-torrent客户端可能内置了对多种Tracker协议的支持,包括HTTP和UDP。 3. **DHT(分布式哈希表)**:为了增强网络的去中心化特性,该项目可能会实现DHT网络,即使没有Tracker服务器,客户端也能找到其他...
3. **传输层**:在此层,TCP/UDP报文的端口号提供了进一步的流量控制依据,通过扩展的ACL规则实现对特定服务或应用的流量管理。 #### 三、BT下载原理与协议介绍 资料深入探讨了BT下载的原理和协议,这是理解流量...
UDP(User Datagram Protocol)虽然更快但不保证数据顺序,通常用于实时性要求高的应用,如视频会议。 2. **多点连接**:P2P文件传输允许每个节点同时与多个其他节点连接,这种并发连接提高了传输效率。每个节点都...
RTP(Real-time Transport Protocol)用于传输实时数据,而RTCP(Real-time Transport Control Protocol)则用于监控传输质量。C#实现P2P视频聊天时,需要理解并实现这两个协议,以确保音视频数据的高效传输。 ### ...
New Issue Tracker: Roundup New Documentation Format: reStructuredText Using Sphinx PEP 343: The ‘with’ statement Writing Context Managers The contextlib module PEP 366: Explicit Relative Imports...