承接 obrainwave/siteagent-laravel 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

obrainwave/siteagent-laravel

Composer 安装命令:

composer require obrainwave/siteagent-laravel

包简介

Silent enforcement SDK for remote website control.

README 文档

README

License: MIT

SiteAgent is a lightweight, cryptographically secure enforcement SDK for Laravel applications. It is the Core Website Manager to remotely manage the website status.

🚀 Installation

Install the package via Composer:

composer require obrainwave/siteagent-laravel

⚙️ Configuration

Initialize the SDK with the built-in installation command:

php artisan siteagent:install

This command will:

  1. Publish the siteagent.php config file.
  2. Publish the customizable 503 suspension views.
  3. Initialize the local siteagent.state.json file.

Alternatively, you can manually publish specific assets:

php artisan vendor:publish --tag="siteagent-config"
php artisan vendor:publish --tag="siteagent-views"

Then, configure your credentials in your .env file:

SITE_AGENT_API_KEY=your_public_key
SITE_AGENT_SECRET=your_signing_secret
SITE_AGENT_ENABLED=true

🛠 Integration

1. Automated Setup

Add the SiteAgent middleware by running the following command:

php artisan siteagent:install

The command will automatically detect your Laravel version and register the EnforceSiteAgent middleware in the global stack (bootstrap/app.php for Laravel 11+, or app/Http/Kernel.php for earlier versions).

2. Manual Fallback

If you prefer manual registration, add the EnforceSiteAgent middleware to your global middleware stack:

Laravel 11+:

// bootstrap/app.php
->withMiddleware(function (Middleware $middleware) {
    $middleware->append(\ZuqoLab\SiteAgent\Http\Middleware\EnforceSiteAgent::class);
})

Laravel 10 and below:

// app/Http/Kernel.php
protected $middleware = [
    // ...
    \ZuqoLab\SiteAgent\Http\Middleware\EnforceSiteAgent::class,
];

2. Automated Enforcement

Once integrated, the SDK automatically registers a hidden control endpoint at: POST /api/system/control

When the Control Manager sends a suspend command, the middleware will intercept all incoming requests and serve a premium 503 Service Unavailable page.

🔒 Security

All remote commands must be signed using HMAC-SHA256. The SDK automatically validates:

  • API Key: Ensures the command is intended for this site.
  • Signature: Prevents tampering with command payloads.
  • Timestamp: Rejects requests older than 5 minutes to prevent replay attacks.

📄 License

The MIT License (MIT). Please see License File for more information.

obrainwave/siteagent-laravel 适用场景与选型建议

obrainwave/siteagent-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 14 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 04 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 obrainwave/siteagent-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 obrainwave/siteagent-laravel 我们能提供哪些服务?
定制开发 / 二次开发

基于 obrainwave/siteagent-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 31
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-04-19