length is a multiple of 16 (required for AES block cipher) Key Generation Take the MD5 hash of the first 8 bytes of the packet header as the key, 128 bit Encryption Electronic Codebook Mode (Simple)
the content of buffer to a log file Call the original sha1_update() function Return the result sha1_update (original) sha1_update (hook function) Function Caller Invode Return Return Invoke
Bytes Stop at: 500 Bytes Add Range to HTTP Header Other Range format by Xunlei Range: XXXX-XXXX (starting – ending) -- HTTP Request -- GET /soft/21/QQ2010SP3.exe HTTP/1.1 Host: softdl1.tech.qq.com Range: bytes=501-
Two flows Message Flows First HTTP flow: get file size & first part of data Xunlei Client HTTP Server HTTP Response HTTP Request File size first part data Local file 1000 5000
Two flows Message Flows First HTTP flow: get file size & first part of data Two parallel HTTP flows Xunlei Client HTTP Server HTTP Response HTTP Request HTTP Request HTTP Request First connection is aborted Start two parallel connections Range: 1001-3000 Range: 3001- File size first part data Local file 1001-3000 3001-
Two flows Message Flows First HTTP flow: get file size & first part of data Two parallel HTTP flows Xunlei Client HTTP Server HTTP Request HTTP Request HTTP Request HTTP Request First connection is aborted Start two parallel connections Range: 1001-3000 Range: 3001- File size first part data Local file HTTP Response HTTP Response
from original server, e. g size HTTP Request (Post) to Xunlei server -- HTTP Request –- POST / HTTP/1.1 Host: 123.129.242.168:80 …message body(Encrypted )… -URL of file: http://softdl1.tech.qq.com/soft/21/QQ2010SP3.exe -File length -Xunlei version -MAC address -IP address
from original server, e. g size HTTP Request (Post) to Xunlei server HTTP Response from Xunlei server -- HTTP Response –- HTTP/1.1 200 OK …message body(Encrypted)… -List of URLs http://dl_dir.qq.com/qqfile/qq/QQ2010/QQ2010SP3.exe http://ydsoft1.greendown.cn:8880/201011/QQ2010SP3_1125.exe ………
servers) tries to ban direct linking Server responds HTTP request: get only if it comes from the content providers’ page Xunlei’s Solutions: provide both URLs and corresponding referrers direct linking : It usually occurs when a web page use of a linked object that belonging to a second site -- HTTP Request–- GET /soft/21/QQ2010SP3.exe HTTP/1.1 Referrer: http://softdl1.tech.qq.com/soft/21 -- HTTP Response –- HTTP/1.1 200 OK …message body(Encrypted)… http://dl_dir.qq.com/qqfile/qq/QQ2010/QQ20 10SP3.exe (referrer) http://ydsoft1.greendown.cn:8880/201011/QQ 2010SP3_1125.exe (referrer) ……
Referrers of so many mirror servers? Key Ideas: make use of large user base Xunlei browser plug-in collects referrer (address of content providers’ page) -- HTTP Request –- POST / HTTP/1.1 Host: 123.129.242.169:80 …message body(Encrypted )… -URL of file: http://softdl1.tech.qq.com/soft/21/QQ2010S P3.exe -Referrer: http://softdl1.tech.qq.com/soft/21
URLs refer to the same content? Key Ideas: make use of large user base Xunlei clients update summary reports to Xunlei server -- HTTP Request –- POST / HTTP/1.1 Host: 123.129.242.179:80 …message body(Encrypted)… -Partial hash -size -file name -url -referrer -etc. 20480 Bytes 20480 Bytes 20480 Bytes length/3 SHA-1 partial hash
mirror list Find mirrors that have the same partial hash Partial_Hash Mirror hash(QQ2010PS3.exe) Tencent.com/QQ2010PS3.exe hash(QQ2010PS3.exe) huanJun.com/QQ2010PS3.exe hash(QQ2010PS3.1.exe) Tencent.com/QQ2010PS3.1.exe hash(QQ2010PS3.1.exe) AOL.com/QQ2010PS3.1.exe
length and URL (2) by partial hash and length -There is a validation mechanism, chunk hash? Test Conjecture 1 Content File Name Length Result real content QQ2010SP3.exe 30.2MB get mirror list fake content QQ2010SP3.exe 15.0MB Fail to get mirror list real content QQ2010SP3_2.exe 30.2MB Fail at the first try, obtain mirror list after 10s fake content (change a few bytes) QQ2010SP3.exe 30.2MB (1)get mirror list, but abort download from mirrors later (2)get mirror list, continue download from mirrors until finish
Xunlei server performs as a tracker Xunlei server provides torrent file (name, size, chunk hash, etc.) UDP between peers Difference Aware of peers in the same LAN (TCP) Both push and pull Optimized peer selection (no snubbing)
regarded seeder HTTP, BT, eDonkey can be treated uniformly Role of Xunlei Server Indexing Search (search by URL, Partial Content, Torrent File ) Coordination (more than a tracker)
regarded seeder HTTP, BT, eDonkey can be treated uniformly Role of Xunlei Server Indexing Search (search by URL, Partial Content, Torrent File ) Coordination (more than a tracker) Trend of Xunlei To be a seeder for paid users Cross protocol sharing (we observe a BT task downloads though HTTP !)