mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-25 20:57:43 +08:00
feat: add AnyTLS support and improve system functionality
- Add AnyTLS protocol support - Add system logs viewing in admin panel - Refactor client subscription delivery code - Refactor hook mechanism - Add plugin support for Shadowsocks protocol - Add CSV export option for batch user creation - Fix mobile admin login page width display issue
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Support\ProtocolManager;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class ProtocolServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* 注册服务
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->scoped('protocols.manager', function ($app) {
|
||||
return new ProtocolManager($app);
|
||||
});
|
||||
|
||||
$this->app->scoped('protocols.flags', function ($app) {
|
||||
return $app->make('protocols.manager')->getAllFlags();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 启动服务
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
// 在启动时预加载协议类并缓存
|
||||
$this->app->make('protocols.manager')->registerAllProtocols();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 提供的服务
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function provides()
|
||||
{
|
||||
return [
|
||||
'protocols.manager',
|
||||
'protocols.flags',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user