fix https_announce_url

This commit is contained in:
xiaomlove
2021-06-05 22:41:27 +08:00
parent d11215b10b
commit 6b7fb5000e
3 changed files with 12 additions and 6 deletions
+5 -5
View File
@@ -11,6 +11,7 @@ use App\Repositories\ExamRepository;
use App\Repositories\SearchBoxRepository; use App\Repositories\SearchBoxRepository;
use App\Repositories\TorrentRepository; use App\Repositories\TorrentRepository;
use Carbon\Carbon; use Carbon\Carbon;
use Doctrine\DBAL\Schema\Schema;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Encryption\Encrypter; use Illuminate\Encryption\Encrypter;
use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\DB;
@@ -50,11 +51,10 @@ class Test extends Command
*/ */
public function handle() public function handle()
{ {
$torrentRep = new TorrentRepository(); // $r = \Illuminate\Support\Facades\Schema::getColumnListing('torrents');
$r = $torrentRep->getTrackerReportAuthKey(1, 1, true); $r = urldecode('bm9wZQ%3D%3D');
// $r = $torrentRep->resetTrackerReportAuthKeySecret(1); $r = base64_decode($r);
// dd($r); dd($r);
dd($r, $torrentRep->checkTrackerReportAuthKey($r));
} }
} }
+6
View File
@@ -228,4 +228,10 @@ class DB
return Capsule::schema(self::ELOQUENT_CONNECTION_NAME); return Capsule::schema(self::ELOQUENT_CONNECTION_NAME);
} }
public static function table($table): \Illuminate\Database\Query\Builder
{
return Capsule::table($table);
}
} }
+1 -1
View File
@@ -64,7 +64,7 @@ if (@ini_get('output_handler') == 'ob_gzhandler' AND @ob_get_length() !== false)
header('Content-Encoding:'); header('Content-Encoding:');
} }
*/ */
if (isset($_COOKIE["c_secure_tracker_ssl"]) && $_COOKIE["c_secure_tracker_ssl"] == base64("yeah")) if ((isset($_COOKIE["c_secure_tracker_ssl"]) && $_COOKIE["c_secure_tracker_ssl"] == base64("yeah")) || !empty($https_announce_urls))
$tracker_ssl = true; $tracker_ssl = true;
else else
$tracker_ssl = false; $tracker_ssl = false;