saizarul/iproxy

一个 Laravel 包,用于轻松配置和管理代理服务器,支持 HTTP、HTTPS、SOCKS4 和 SOCKS5 代理,具有认证、日志记录和自定义路由规则。

v1.0.0 2024-06-04 13:30 UTC

This package is auto-updated.

Last update: 2024-09-04 14:11:42 UTC


README

Laravel IProxy 包提供了方便的方式与 iProxy API 交互,用于管理 Laravel 应用程序中的代理配置。

安装

您可以通过 Composer 安装此包

composer require sazharul/iproxy

使用 Artisan 发布包配置文件

php artisan vendor:publish --provider="Sazharul\Iproxy\IproxyServiceProvider"

使用方法

use Sazharul\Iproxy\Facades\Iproxy;

// Get the list of connections
$connections = Iproxy::getConnectionList();

// Get proxies for a specific connection
$proxies = Iproxy::getProxiesByConnectionId($connectionId);

// Create a new proxy
$newProxy = Iproxy::createProxy($connectionId);

// Delete a proxy
$deleteResponse = Iproxy::deleteProxy($connectionId, $proxyId);

// Update a proxy
$updateResponse = Iproxy::updateProxy($connectionId, $proxyId, $data);

// Change the password of a proxy
$passwordChangeResponse = Iproxy::changeProxyPassword($connectionId, $proxyId, $newPassword);

// Change the login of a proxy
$loginChangeResponse = Iproxy::changeProxyLogin($connectionId, $proxyId, $newLogin);

请确保将 Sazharul 替换为您包的供应商名称,将 Iproxy 替换为您包的名称。

配置

您需要在 config/iproxy.php 文件中设置您的 iProxy API 密钥。

return [
    'api_key' => env('IPROXY_KEY'),
];

许可证

Laravel IProxy 包是开源软件,遵循 MIT 许可协议


Feel free to modify this documentation as needed, adding more details, examples, or instructions specific to your package.