dagelijksdutchgaming/flock-control
Composer 安装命令:
composer require dagelijksdutchgaming/flock-control
包简介
A Pterodactyl Panel addon that allows users to start and stop all their servers at once
README 文档
README
A Pterodactyl Panel addon that allows users to start and stop all their servers at once.
Features
- Start/stop all servers owned by the user
- Support for subusers with proper permissions
- Rate limiting to prevent server overload
- Direct Wings daemon integration
- Easy to use interface
- Debug-friendly with GET endpoints for testing
Requirements
- PHP 8.2 or higher
- Pterodactyl Panel 1.0 or higher
- Laravel Framework 10.0 or higher
Installation
Add the repository to your
composer.json:{ "repositories": [ { "type": "vcs", "url": "https://gitlab.com/dagelijksdutchgaming/flockcontrol.git" } ] }Install the package:
composer require dagelijksdutchgaming/flock-control:^1.1Publish the assets:
php artisan vendor:publish --provider="FlockControl\Providers\BulkServerControlServiceProvider" --tag="flock-control"Clear the cache:
php artisan config:clear php artisan cache:clear php artisan view:clear
Configuration
The package can be configured in config/flock-control.php:
return [
'route_prefix' => 'flock-control',
'middleware' => ['web', 'auth'],
'actions' => [
'max_concurrent' => env('FLOCK_CONTROL_MAX_CONCURRENT', 10),
'delay_between' => env('FLOCK_CONTROL_ACTION_DELAY', 1),
],
];
Usage
Browser Testing
You can test the functionality directly in your browser:
http://your-panel/flock-control/power/start-all
http://your-panel/flock-control/power/stop-all
Both endpoints support both GET and POST requests for flexible testing.
JavaScript Integration
// Start all servers
fetch('/flock-control/power/start-all', {
method: 'POST',
headers: {
'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').content
}
});
// Stop all servers
fetch('/flock-control/power/stop-all', {
method: 'POST',
headers: {
'X-CSRF-TOKEN': document.querySelector('meta[name="csrf-token"]').content
}
});
Response Format
The endpoints return a JSON response with the following structure:
{
"status": "success|partial",
"message": "X servers successfully started/stopped, Y servers failed",
"total_servers": 10,
"successful_actions": 8,
"failed_actions": 2,
"results": [
{
"server_id": 1,
"name": "Server 1",
"status": "success|error",
"message": "Server start/stop action successful|Error message",
"timestamp": "2024-03-27T12:00:00Z"
}
],
"timestamp": "2024-03-27T12:00:00Z"
}
Security
- All routes are protected by authentication
- Rate limiting prevents abuse
- Proper permission checks for subusers
- Direct Wings daemon integration for better security
Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
License
This package is open-sourced software licensed under the MIT license.
Support
If you discover any security-related issues, please email info@dagelijksdutchgaming.nl instead of using the issue tracker.
For general issues, please use the GitHub issue tracker.
Credits
Changelog
Please see CHANGELOG for more information on what has changed recently.
dagelijksdutchgaming/flock-control 适用场景与选型建议
dagelijksdutchgaming/flock-control 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 20 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 03 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 dagelijksdutchgaming/flock-control 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 dagelijksdutchgaming/flock-control 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 20
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-25