mrethical/http-proxies
最新稳定版本:v1.3.1
Composer 安装命令:
composer require mrethical/http-proxies
包简介
Use http proxies within your Laravel application
README 文档
README
This package help you set up a simple ip proxies management. It can also give you a GuzzleClient with a fresh active proxy configured.
Installation
You can install the package via composer:
composer require mrethical/http-proxies
You can publish and run the migrations with:
php artisan vendor:publish --tag="http-proxies-migrations"
php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="http-proxies-config"
This is the contents of the published config file:
return [ 'model' => Mrethical\HttpProxies\Models\Proxy::class, 'selenium' => [ 'url' => env('SELENIUM_URL', 'http://localhost:4444'), 'timeouts' => [ 'connection' => env('SELENIUM_CONNECTION_TIMEOUT'), 'request' => env('SELENIUM_REQUEST_TIMEOUT'), 'pageload' => env('SELENIUM_PAGELOAD_TIMEOUT', 60), 'script' => env('SELENIUM_SCRIPT_TIMEOUT', 3), ], ], ];
Usage
Add a proxy by calling the http-proxies:add command
php artisan http-proxies:add 1.2.3.4 --port=80
On your code, get a GuzzleClient with a fresh active proxy.
use Mrethical\HttpProxies\HttpProxies; $client = app(HttpProxies::class)->createClient();
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 196
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-30