📄 protocol-ext.txt
字号:
There are two new GET parameters for the tracker in the latestrelease. They are -key=xxxx - this is like peer id, but it's only known to the client and thetracker. It allows clients to be behind dynamic IP. If a peer announceda key previously, then it's accepted if and only if it gives the same keyagain. If no key was given, then the fallback is checking that the IPhasn't changed. If the IP has changed, mainline currently will give a peerlist but not change any data related to that peer, so that peers behinddynamic IP using old clients will continue to work okay. Currentlymainline generates the value associated with key as eight random hexvalues, and the tracker accepts any string from clients.compact=1 - when a client sends this, the 'peers' return value is a singlestring whose length is a multiple of 6 rather than a dict. To extract peerinformation from the string, chop it into substrings of length 6. For eachsubstring, the first four bytes are the IP and the last two are the port,encoded big-endian. This results in huge bandwidth savings.Everybody developing ports should implement these keys, they're veryuseful.-Bram
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -