mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 02:27:09 -07:00
parent
bfbc7ef28a
commit
6e5a969e2d
1 changed files with 3 additions and 1 deletions
|
@ -148,7 +148,9 @@ void Tracker::respondToAnnounceRequest()
|
|||
TrackerAnnounceRequest annonceReq;
|
||||
|
||||
// IP
|
||||
annonceReq.peer.ip = m_env.clientAddress;
|
||||
// Use the "ip" parameter provided from tracker request first, then fall back to client IP if invalid
|
||||
const QHostAddress paramIP {QString::fromLatin1(queryParams.value("ip"))};
|
||||
annonceReq.peer.ip = paramIP.isNull() ? m_env.clientAddress : paramIP;
|
||||
|
||||
// 1. Get info_hash
|
||||
if (!queryParams.contains("info_hash")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue