nassirian/laravel-tunnel-manager
Composer 安装命令:
composer require nassirian/laravel-tunnel-manager
包简介
Manage Cloudflare tunnels and subdomains in Laravel.
README 文档
README
A Laravel package to manage Cloudflare Tunnels and automatically create subdomains via Artisan commands.
Features
- ✅ Create new subdomains dynamically
- ✅ Point subdomains to an existing Cloudflare Tunnel
- ✅ Compatible with Laravel 9, 10, 11, and 12
- ✅ Fully tested with PHPUnit
- ✅ Easy installation and usage
Installation
Require the package via Composer:
composer require nassirian/laravel-tunnel-manager
Publish the configuration file
php artisan vendor:publish --tag=tunnelmanager-config
Set your .env
TUNNEL_MANAGER_API_TOKEN=your_cloudflare_api_token TUNNEL_MANAGER_ZONE_ID=your_cloudflare_zone_id TUNNEL_MANAGER_DOMAIN=yourdomain.com TUNNEL_MANAGER_TUNNEL_UUID=your_tunnel_uuid
Usage
Create a new subdomain
php artisan tunnel:add-subdomain your-subdomain
This will create a DNS CNAME record:
your-subdomain.yourdomain.com → your-tunnel-uuid.cfargotunnel.com
Configuration
The configuration file is located at config/tunnelmanager.php. You can customize the following options:
api_token: Your Cloudflare API token.zone_id: Your Cloudflare zone ID.domain: Your domain name.tunnel_uuid: The UUID of the tunnel you want to point the subdomain to.
Testing
The package is fully tested. To run the tests, use the following command:
./vendor/bin/phpunit --configuration packages/Nassirian/TunnelManager/phpunit.xml
Or if running inside your main Laravel app:
phpunit
Requirements:
- PHP 8.1 or higher
- Laravel 9, 10, 11, or 12
- Cloudflare account with API token and zone ID
License
This package is licensed under the MIT License. See the LICENSE file for more information.
nassirian/laravel-tunnel-manager 适用场景与选型建议
nassirian/laravel-tunnel-manager 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 04 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 nassirian/laravel-tunnel-manager 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nassirian/laravel-tunnel-manager 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-27