diff --git a/CHANGELOG.md b/CHANGELOG.md index c57360af..12b1f20f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # 📖 Change Log +## [v2.1.5-2024.01 [Final v2]](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2024.01) +[Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.10-HotFix...v2.1.5-2024.01) + +- Release v2.1.5-2024.01 🎉 +- Some improvements in default template +- Fixed void function result used +- Feature to ban specific torrent clients +- Get SERVER_NAME variable for cron tasks +- Improved handling errors while uploading +- Hide vote button in poll if user already voted +- Fixed broken captcha check on login.php +- Fixed broken sorting in group.php +- Fixed extensions issue +- Some enhancements for dl.php +- Some other changes / improvements +- Some reported bugfixes +- Updated translations + ## [v2.1.5-2023.10-HotFix [Final]](https://github.com/torrentpier/torrentpier-lts/tree/v2.1.5-2023.10-HotFix) (2023-11-20) [Full Changelog](https://github.com/torrentpier/torrentpier-lts/compare/v2.1.5-2023.10...v2.1.5-2023.10-HotFix) diff --git a/bt/announce.php b/bt/announce.php index 6e6efffa..f9385012 100644 --- a/bt/announce.php +++ b/bt/announce.php @@ -103,6 +103,18 @@ if (!verify_id($passkey, BT_AUTH_KEY_LENGTH)) msg_die('Invalid passkey: ' . $passkey); } +// Check for client ban +if ($bb_cfg['client_ban']['enabled']) +{ + foreach (array_keys($bb_cfg['client_ban']['clients']) as $client) + { + if (substr($peer_id, 0, strlen($client)) === $client) + { + msg_die($bb_cfg['client_ban']['clients'][$client]); + } + } +} + // IP $ip = $_SERVER['REMOTE_ADDR']; diff --git a/library/config.php b/library/config.php index 14458939..395db710 100644 --- a/library/config.php +++ b/library/config.php @@ -94,6 +94,16 @@ $bb_cfg['passkey_key'] = 'uk'; // Passkey key name in GET re $bb_cfg['ignore_reported_ip'] = false; // Ignore IP reported by client $bb_cfg['verify_reported_ip'] = true; // Verify IP reported by client against $_SERVER['HTTP_X_FORWARDED_FOR'] $bb_cfg['allow_internal_ip'] = false; // Allow internal IP (10.xx.. etc.) +$bb_cfg['client_ban'] = array( + 'enabled' => false, + // Clients to be blocked, for example, peer id '-UT' will block all uTorrent clients, '-UT2' will block builds starting with 2 (default: false) + // The second argument is being shown in the torrent client as a failure message + // Handy client list: https://github.com/transmission/transmission/blob/f85c3b6f8db95d5363f6ec38eee603f146c6adb6/libtransmission/clients.cc#L504 + 'clients' => array( + '-UT' => "uTorrent — NOT ad-free and open-source", + '-MG' => 'Mostly leeching client' + ) +); // Ocelot $bb_cfg['ocelot']['port'] = 34000;