pixovoid/laravel-cloudflared
Composer 安装命令:
composer require pixovoid/laravel-cloudflared
包简介
A Laravel package to create and manage Cloudflare Tunnels for local development (fork by PixoVoid)
README 文档
README
A Laravel package for creating and managing Cloudflare Tunnels to provide secure public access to local development environments. This solution offers an alternative to services like ngrok or Expose, leveraging Cloudflare's infrastructure for tunneling requests directly to your local Laravel application.
Key Features
- Create and manage Cloudflare Tunnels directly from Laravel Artisan commands
- Automatic DNS record configuration for custom subdomains
- Integration with Laravel Herd for local development environments
- Secure tunneling with Cloudflare's global network
- Seamless integration with Vite development server via companion package
Disclaimer and Limitation of Liability
This software is provided "as is", without warranty of any kind, express or implied. The maintainers and contributors shall not be liable for any damages or losses, including but not limited to direct, indirect, incidental, special, exemplary, or consequential damages, arising from the use of this package. Users are solely responsible for ensuring the security, reliability, and compliance of their development and production environments. Use at your own risk.
Prerequisites
Before using this package, ensure you have:
- Cloudflared CLI: Install from Cloudflare's downloads page
- Cloudflare Authentication: Run
cloudflared tunnel loginto authenticate with your Cloudflare account and domain - Laravel Herd: Install Laravel Herd for optimal local development experience
Installation
Install the package via Composer:
composer require pixovoid/laravel-cloudflared
Usage
Creating a Tunnel
Create a Cloudflare tunnel for your project with a single command. This command will:
- Create a new Cloudflare tunnel
- Configure DNS records for your specified subdomain
- Set up a Herd link for local access
- Save configuration to
.cloudflared.yamlin your project root
php artisan cloudflared:install
Note: Running this command again will modify the existing installation. You can change the subdomain, repair DNS records, or recreate the tunnel as needed.
Running the Tunnel
Start the tunnel to make your local development environment publicly accessible:
php artisan cloudflared:run
Removing a Tunnel
Clean up all resources when the tunnel is no longer needed:
php artisan cloudflared:uninstall
Development Setup
Local Development with Path Repository
For developing or modifying the package, you can use Composer's path repository:
- Add the path repository to your Laravel application's
composer.json:
{
"repositories": [
{
"type": "path",
"url": "../path/to/laravel-cloudflared",
"options": {
"symlink": true
}
}
]
}
- Require the package from the local path:
composer require pixovoid/laravel-cloudflared:dev-main
Testing
The package includes PHPUnit tests and uses orchestra/testbench for Laravel integration testing.
Run the test suite after installing development dependencies:
composer install --dev
composer test
Platform Compatibility
Windows Support
This fork implements best-effort Windows compatibility with the following considerations:
- Automatic detection and fallback for TTY unsupported environments
- Normalized home directory detection supporting
HOME,USERPROFILE, andHOMEDRIVE/HOMEPATHenvironment variables - Graceful fallback for process signal handling when
pcntlextension is unavailable - Process cleanup mechanisms for Windows environments
For Windows usage, ensure:
cloudflaredCLI is installed and available in your system PATH- Laravel Herd is installed and configured
- Required environment variables are properly set
Attribution and Licensing
This repository is a fork of the original project aerni/laravel-cloudflared (https://github.com/aerni/laravel-cloudflared).
Original Project
- Author: Michael Aerni
- License: MIT
- Repository: https://github.com/aerni/laravel-cloudflared
Fork Maintainer
- Maintainer: PixoVoid (PixoVoid.dev, PixoVoid.net)
- Package Name:
pixovoid/laravel-cloudflared - Key Changes: Windows compatibility improvements, maintenance updates, and platform-specific fixes
License Information
This software is licensed under the MIT License. See the LICENSE file for the full license text.
Copyright for the original work belongs to Michael Aerni. PixoVoid is listed as the fork maintainer.
For a detailed summary of changes made in this fork, please refer to the NOTICE.md file.
Support
For issues, feature requests, or questions, please use the GitHub Issues page of this repository.
Related Packages
For seamless integration with Vite development server, consider using Cloudflared for Vite, which provides tunneled access to both your Laravel application and Vite's hot module replacement server, facilitating frontend debugging on real devices.
pixovoid/laravel-cloudflared 适用场景与选型建议
pixovoid/laravel-cloudflared 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「cloudflare」 「tunnel」 「herd」 「cloudflared」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 pixovoid/laravel-cloudflared 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pixovoid/laravel-cloudflared 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 pixovoid/laravel-cloudflared 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Async SSH proxy connector and forwarder, tunnel any TCP/IP-based protocol through an SSH server, built on top of ReactPHP
Symfony bundle for Cloudflare integration: trusted proxies, real client IP detection, forwarded headers.
Cloudflare Middleware For Guzzle
Library for helping bypass the Cloudflare IUAM page
A fast reverse proxy that helps to expose your local services to the internet
A ZF2 plugin to fix global variables when using CloudFlare
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 28
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-08