[#1] added last_tested_at column to proxies and added json to the command to fetch proxies

This commit is contained in:
2025-03-30 20:24:01 +03:00
parent c3686cbf5c
commit 7c56f25053
5 changed files with 78 additions and 98 deletions
@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('proxies', function (Blueprint $table) {
$table->timestamp('last_tested_at')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('proxies', function (Blueprint $table) {
$table->dropColumn('last_tested_at');
});
}
};
+7
View File
@@ -43,6 +43,13 @@ class ProxiesListSeeder extends Seeder
'https://raw.githubusercontent.com/Tsprnay/Proxy-lists/master/proxies/https.txt'
];
// Add JSON proxy list
ProxiesList::create([
'url' => 'https://cdn.jsdelivr.net/gh/proxifly/free-proxy-list@main/proxies/all/data.json',
'scrape_type' => 'json',
'proxy_type' => 'http'
]);
// SOCKS4 proxies with new_line scrape type
$socks4Urls = [
'https://api.proxyscrape.com/v3/free-proxy-list/get?request=displayproxies&protocol=socks4&proxy_format=ipport&format=text&timeout=20000',