From d56b6126732c55cb465c6f997ae69054b1f42c06 Mon Sep 17 00:00:00 2001 From: stalkerok Date: Wed, 10 Jul 2024 21:56:48 +0300 Subject: [PATCH] Add a flag about the connection peers are using UDP hole punching --- src/base/bittorrent/peerinfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/base/bittorrent/peerinfo.cpp b/src/base/bittorrent/peerinfo.cpp index cf27ba3026d6..637228f8fe2a 100644 --- a/src/base/bittorrent/peerinfo.cpp +++ b/src/base/bittorrent/peerinfo.cpp @@ -367,6 +367,10 @@ void PeerInfo::determineFlags() if (useUTPSocket()) updateFlags(u'P', C_UTP); + // h = Peer is using UDP hole punching + if (isHolepunched()) + updateFlags(u'h', tr("Peer was found by using a NAT hole punch")); + m_flags.chop(1); m_flagsDescription.chop(1); }