mirror of
https://github.com/cedar2025/Xboard.git
synced 2025-01-22 18:48:14 -05:00
fix: correct know file issues
Some checks are pending
Docker Build and Publish / build (push) Waiting to run
Some checks are pending
Docker Build and Publish / build (push) Waiting to run
This commit is contained in:
parent
d5c24ed3d1
commit
3efdeaa9c9
@ -28,7 +28,7 @@ Xboard New是基于Xboard二次开发,重写后台管理并优化系统架构
|
|||||||
使用以下命令快速部署并体验 Xboard(基于 Docker + SQLite):
|
使用以下命令快速部署并体验 Xboard(基于 Docker + SQLite):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone -b docker-compose --depth 1 https://github.com/cedar2025/Xboard && \
|
git clone -b compose-new --depth 1 https://github.com/cedar2025/Xboard && \
|
||||||
cd Xboard && \
|
cd Xboard && \
|
||||||
docker compose run -it --rm \
|
docker compose run -it --rm \
|
||||||
-e enable_sqlite=true \
|
-e enable_sqlite=true \
|
||||||
|
@ -108,6 +108,7 @@ class ConfigController extends Controller
|
|||||||
'default_remind_expire' => (bool) admin_setting('default_remind_expire', 1),
|
'default_remind_expire' => (bool) admin_setting('default_remind_expire', 1),
|
||||||
'default_remind_traffic' => (bool) admin_setting('default_remind_traffic', 1),
|
'default_remind_traffic' => (bool) admin_setting('default_remind_traffic', 1),
|
||||||
'remind_mail_enable' => (bool) admin_setting('remind_mail_enable', false),
|
'remind_mail_enable' => (bool) admin_setting('remind_mail_enable', false),
|
||||||
|
'subscribe_path' => admin_setting('subscribe_path', 's'),
|
||||||
|
|
||||||
],
|
],
|
||||||
'frontend' => [
|
'frontend' => [
|
||||||
|
@ -45,6 +45,7 @@ class ConfigSave extends FormRequest
|
|||||||
'show_info_to_server_enable' => '',
|
'show_info_to_server_enable' => '',
|
||||||
'show_protocol_to_server_enable' => '',
|
'show_protocol_to_server_enable' => '',
|
||||||
'remind_mail_enable' => '',
|
'remind_mail_enable' => '',
|
||||||
|
'subscribe_path' => '',
|
||||||
// server
|
// server
|
||||||
'server_token' => 'nullable|min:16',
|
'server_token' => 'nullable|min:16',
|
||||||
'server_pull_interval' => 'integer',
|
'server_pull_interval' => 'integer',
|
||||||
|
@ -12,21 +12,21 @@ class StaffRoute
|
|||||||
'middleware' => 'staff'
|
'middleware' => 'staff'
|
||||||
], function ($router) {
|
], function ($router) {
|
||||||
// Ticket
|
// Ticket
|
||||||
$router->get ('/ticket/fetch', 'V1\\Staff\\TicketController@fetch');
|
// $router->get ('/ticket/fetch', 'V1\\Staff\\TicketController@fetch');
|
||||||
$router->post('/ticket/reply', 'V1\\Staff\\TicketController@reply');
|
// $router->post('/ticket/reply', 'V1\\Staff\\TicketController@reply');
|
||||||
$router->post('/ticket/close', 'V1\\Staff\\TicketController@close');
|
// $router->post('/ticket/close', 'V1\\Staff\\TicketController@close');
|
||||||
// User
|
// // User
|
||||||
$router->post('/user/update', 'V1\\Staff\\UserController@update');
|
// $router->post('/user/update', 'V1\\Staff\\UserController@update');
|
||||||
$router->get ('/user/getUserInfoById', 'V1\\Staff\\UserController@getUserInfoById');
|
// $router->get ('/user/getUserInfoById', 'V1\\Staff\\UserController@getUserInfoById');
|
||||||
$router->post('/user/sendMail', 'V1\\Staff\\UserController@sendMail');
|
// $router->post('/user/sendMail', 'V1\\Staff\\UserController@sendMail');
|
||||||
$router->post('/user/ban', 'V1\\Staff\\UserController@ban');
|
// $router->post('/user/ban', 'V1\\Staff\\UserController@ban');
|
||||||
// Plan
|
// // Plan
|
||||||
$router->get ('/plan/fetch', 'V1\\Staff\\PlanController@fetch');
|
// $router->get ('/plan/fetch', 'V1\\Staff\\PlanController@fetch');
|
||||||
// Notice
|
// // Notice
|
||||||
$router->get ('/notice/fetch', 'V1\\Admin\\NoticeController@fetch');
|
// $router->get ('/notice/fetch', 'V1\\Admin\\NoticeController@fetch');
|
||||||
$router->post('/notice/save', 'V1\\Admin\\NoticeController@save');
|
// $router->post('/notice/save', 'V1\\Admin\\NoticeController@save');
|
||||||
$router->post('/notice/update', 'V1\\Admin\\NoticeController@update');
|
// $router->post('/notice/update', 'V1\\Admin\\NoticeController@update');
|
||||||
$router->post('/notice/drop', 'V1\\Admin\\NoticeController@drop');
|
// $router->post('/notice/drop', 'V1\\Admin\\NoticeController@drop');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,51 +87,6 @@ class AdminRoute
|
|||||||
$router->post('/sort', [ManageController::class, 'sort']);
|
$router->post('/sort', [ManageController::class, 'sort']);
|
||||||
});
|
});
|
||||||
|
|
||||||
$router->group([
|
|
||||||
'prefix' => 'server/trojan'
|
|
||||||
], function ($router) {
|
|
||||||
$router->post('save', [TrojanController::class, 'save']);
|
|
||||||
$router->post('drop', [TrojanController::class, 'drop']);
|
|
||||||
$router->post('update', [TrojanController::class, 'update']);
|
|
||||||
$router->post('copy', [TrojanController::class, 'copy']);
|
|
||||||
});
|
|
||||||
|
|
||||||
$router->group([
|
|
||||||
'prefix' => 'server/vmess'
|
|
||||||
], function ($router) {
|
|
||||||
$router->post('save', [VmessController::class, 'save']);
|
|
||||||
$router->post('drop', [VmessController::class, 'drop']);
|
|
||||||
$router->post('update', [VmessController::class, 'update']);
|
|
||||||
$router->post('copy', [VmessController::class, 'copy']);
|
|
||||||
});
|
|
||||||
|
|
||||||
$router->group([
|
|
||||||
'prefix' => 'server/shadowsocks'
|
|
||||||
], function ($router) {
|
|
||||||
$router->post('save', [ShadowsocksController::class, 'save']);
|
|
||||||
$router->post('drop', [ShadowsocksController::class, 'drop']);
|
|
||||||
$router->post('update', [ShadowsocksController::class, 'update']);
|
|
||||||
$router->post('copy', [ShadowsocksController::class, 'copy']);
|
|
||||||
});
|
|
||||||
|
|
||||||
$router->group([
|
|
||||||
'prefix' => 'server/hysteria'
|
|
||||||
], function ($router) {
|
|
||||||
$router->post('save', [HysteriaController::class, 'save']);
|
|
||||||
$router->post('drop', [HysteriaController::class, 'drop']);
|
|
||||||
$router->post('update', [HysteriaController::class, 'update']);
|
|
||||||
$router->post('copy', [HysteriaController::class, 'copy']);
|
|
||||||
});
|
|
||||||
|
|
||||||
$router->group([
|
|
||||||
'prefix' => 'server/vless'
|
|
||||||
], function ($router) {
|
|
||||||
$router->post('save', [VlessController::class, 'save']);
|
|
||||||
$router->post('drop', [VlessController::class, 'drop']);
|
|
||||||
$router->post('update', [VlessController::class, 'update']);
|
|
||||||
$router->post('copy', [VlessController::class, 'copy']);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Order
|
// Order
|
||||||
$router->group([
|
$router->group([
|
||||||
'prefix' => 'order'
|
'prefix' => 'order'
|
||||||
|
@ -13,6 +13,7 @@ class ThemeService
|
|||||||
private const THEME_DIR = 'theme/';
|
private const THEME_DIR = 'theme/';
|
||||||
private const CONFIG_FILE = 'config.json';
|
private const CONFIG_FILE = 'config.json';
|
||||||
private const SETTING_PREFIX = 'theme_';
|
private const SETTING_PREFIX = 'theme_';
|
||||||
|
private const CANNOT_DELETE_THEMES = ['Xboard', 'v2board'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取所有可用主题列表
|
* 获取所有可用主题列表
|
||||||
@ -24,6 +25,7 @@ class ThemeService
|
|||||||
->mapWithKeys(function ($dir) {
|
->mapWithKeys(function ($dir) {
|
||||||
$name = basename($dir);
|
$name = basename($dir);
|
||||||
$config = $this->readConfigFile($name);
|
$config = $this->readConfigFile($name);
|
||||||
|
$config['can_delete'] = !in_array($name, self::CANNOT_DELETE_THEMES) && $name != admin_setting('current_theme');
|
||||||
return $config ? [$name => $config] : [];
|
return $config ? [$name => $config] : [];
|
||||||
})->toArray();
|
})->toArray();
|
||||||
}
|
}
|
||||||
@ -129,7 +131,7 @@ class ThemeService
|
|||||||
*/
|
*/
|
||||||
public function delete(string $theme): bool
|
public function delete(string $theme): bool
|
||||||
{
|
{
|
||||||
if ($theme === admin_setting('current_theme') || in_array($theme, ['Xboard', 'v2board'])) {
|
if ($theme === admin_setting('current_theme') || in_array($theme, self::CANNOT_DELETE_THEMES)) {
|
||||||
throw new Exception('Cannot delete active theme');
|
throw new Exception('Cannot delete active theme');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ return new class extends Migration {
|
|||||||
'rate' => (int) $server->rate,
|
'rate' => (int) $server->rate,
|
||||||
'tags' => $server->tags ?: "[]",
|
'tags' => $server->tags ?: "[]",
|
||||||
'host' => $server->host,
|
'host' => $server->host,
|
||||||
'port' => (int) $server->port,
|
'port' => $server->port,
|
||||||
'server_port' => $server->server_port,
|
'server_port' => $server->server_port,
|
||||||
'protocol_settings' => json_encode([
|
'protocol_settings' => json_encode([
|
||||||
'version' => $server->version,
|
'version' => $server->version,
|
||||||
|
@ -62,7 +62,7 @@ apt update && apt install -y git
|
|||||||
yum update && yum install -y git
|
yum update && yum install -y git
|
||||||
|
|
||||||
# 克隆代码
|
# 克隆代码
|
||||||
git clone -b docker-compose --depth 1 https://github.com/cedar2025/Xboard ./
|
git clone -b compose-new --depth 1 https://github.com/cedar2025/Xboard ./
|
||||||
|
|
||||||
# 安装依赖并初始化
|
# 安装依赖并初始化
|
||||||
docker compose run -it --rm web php artisan xboard:install
|
docker compose run -it --rm web php artisan xboard:install
|
||||||
|
@ -17,7 +17,7 @@ systemctl start docker
|
|||||||
|
|
||||||
1. 获取项目文件:
|
1. 获取项目文件:
|
||||||
```bash
|
```bash
|
||||||
git clone -b docker-compose --depth 1 https://github.com/cedar2025/Xboard
|
git clone -b compose-new --depth 1 https://github.com/cedar2025/Xboard
|
||||||
cd Xboard
|
cd Xboard
|
||||||
```
|
```
|
||||||
|
|
||||||
|
2
public/assets/admin/assets/index.css
vendored
2
public/assets/admin/assets/index.css
vendored
File diff suppressed because one or more lines are too long
18
public/assets/admin/assets/index.js
vendored
18
public/assets/admin/assets/index.js
vendored
File diff suppressed because one or more lines are too long
117
public/assets/admin/assets/vendor.js
vendored
117
public/assets/admin/assets/vendor.js
vendored
File diff suppressed because one or more lines are too long
@ -14,7 +14,6 @@ use Illuminate\Http\Request;
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Route::get('/s/{token}', [\App\Http\Controllers\V1\Client\ClientController::class, 'subscribe'])->middleware('client')->name('client.subscribe');
|
|
||||||
|
|
||||||
Route::get('/', function (Request $request) {
|
Route::get('/', function (Request $request) {
|
||||||
if (admin_setting('app_url') && admin_setting('safe_mode_enable', 0)) {
|
if (admin_setting('app_url') && admin_setting('safe_mode_enable', 0)) {
|
||||||
@ -53,3 +52,7 @@ Route::get('/' . admin_setting('secure_path', admin_setting('frontend_admin_path
|
|||||||
'secure_path' => admin_setting('secure_path', admin_setting('frontend_admin_path', hash('crc32b', config('app.key'))))
|
'secure_path' => admin_setting('secure_path', admin_setting('frontend_admin_path', hash('crc32b', config('app.key'))))
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Route::get('/' . (admin_setting('subscribe_path', 's')) . '/{token}', [\App\Http\Controllers\V1\Client\ClientController::class, 'subscribe'])
|
||||||
|
->middleware('client')
|
||||||
|
->name('client.subscribe');
|
@ -2,7 +2,9 @@
|
|||||||
"name": "Xboard",
|
"name": "Xboard",
|
||||||
"description": "Xboard",
|
"description": "Xboard",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"images": "",
|
"images": [
|
||||||
|
"https://raw.githubusercontent.com/cedar2025/Xboard/new/docs/images/dashboard.png"
|
||||||
|
],
|
||||||
"configs": [
|
"configs": [
|
||||||
{
|
{
|
||||||
"label": "主题色",
|
"label": "主题色",
|
||||||
|
Loading…
Reference in New Issue
Block a user