NAT users' real port (#1027)

This commit is contained in:
Cønstantine Kovalensky 2023-11-03 20:03:44 +04:00 committed by GitHub
commit 5005474b1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -132,6 +132,9 @@ $peer_hash = hash('xxh128', $passkey . $info_hash_hex . $port);
// Events
$stopped = ($event === 'stopped');
// Get the real port to help NAT users
$port = $_SERVER['REMOTE_PORT'];
// Set seeder & complete
$complete = $seeder = ($left == 0) ? 1 : 0;