From 01eeb1b347cbcd812c945f86b607746f3f145efc Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 9 Sep 2023 00:56:49 +0300 Subject: [PATCH] disable port check quotas for administrators and connected host owner --- src/public/peer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/public/peer.php b/src/public/peer.php index 1459183..ea1b54a 100644 --- a/src/public/peer.php +++ b/src/public/peer.php @@ -130,7 +130,8 @@ if ($requestPort) { // Check requests quota $lastPeerPortStatus = $db->findLastPeerPortStatusByPeerId($requestPeerId); - if ($lastPeerPortStatus && + if (!Access::address(array_merge([$peerInfo->address], ADMIN_REMOTE_ADDRESS_WHITELIST)) && + $lastPeerPortStatus && $lastPeerPortStatus->timeAdded > time() - WEBSITE_PEER_PORT_CHECK_TIMEOUT) { $responsePort = (object)