mirror of
https://github.com/sot-tech/mochi.git
synced 2026-04-30 09:30:00 -07:00
(tested) preserve all addresses of peer
* add multiple addresses in request structures and frontend parsers * move per-ip peer fetch/store from storage to internal hooks * fetch/store both v1 and v2 info hashes
This commit is contained in:
@@ -14,6 +14,6 @@ func DeriveEntropyFromRequest(req *bittorrent.AnnounceRequest) (v0 uint64, v1 ui
|
||||
if len(req.InfoHash) >= bittorrent.InfoHashV1Len {
|
||||
v0 = binary.BigEndian.Uint64([]byte(req.InfoHash[:8])) + binary.BigEndian.Uint64([]byte(req.InfoHash[8:16]))
|
||||
}
|
||||
v1 = binary.BigEndian.Uint64(req.Peer.ID[:8]) + binary.BigEndian.Uint64(req.Peer.ID[8:16])
|
||||
v1 = binary.BigEndian.Uint64(req.ID[:8]) + binary.BigEndian.Uint64(req.ID[8:16])
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user