Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
flucout committed Jan 19, 2025
1 parent 7010d79 commit 53a4840
Show file tree
Hide file tree
Showing 16 changed files with 378 additions and 81 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

网站后台管理可一键同步宝塔官方的插件列表与增量更新插件包,还有云端使用记录、IP黑白名单、操作日志、定时任务等功能。

本项目自带 宝塔Linux面板宝塔Windows面板aaPanel面板宝塔云监控 的最新版安装包和更新包,已修改适配此第三方云端,并且全开源,无so等加密文件
本项目自带 **宝塔Linux面板****宝塔Windows面板****aaPanel面板****宝塔云监控** 的最新版安装包和更新包,已修改适配此第三方云端,并且全开源,无.so等加密文件

觉得该项目不错的可以给个Star~

Expand Down
35 changes: 34 additions & 1 deletion app/command/CleanViteJs.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,10 @@ private function handlefile($filepath){
$file = preg_replace('!\w+\(\(\(\)=>"input"===\w+\.\w+\.type\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(function\(\)\{return"calc"===\w+\.\w+\.type\}\)\)!', '!1', $file);
$file = preg_replace('!\w+\(\(function\(\)\{return"input"===\w+\.\w+\.type\}\)\)!', '!1', $file);
$code = $this->getExtendCode($file, '"自动部署"', 2);
if($code){
$file = str_replace($code, '', $file);
}
$flag = true;
}

Expand Down Expand Up @@ -193,6 +197,25 @@ private function handlefile($filepath){
$file = str_replace('"busSslList"', '"currentCertInfo"', $file);
$flag = true;
}

if(strpos($file, '"商用SSL"')!==false){ //ssl
$code = $this->getExtendFunction($file, '"商用SSL"', '{', '}');
$file = str_replace($code, '', $file);
$code = $this->getExtendFunction($file, '"宝塔证书"', '{', '}');
$file = str_replace($code, '', $file);
$code = $this->getExtendCode($file, ',"联系客服"', 2, '[', ']');
if($code){
$file = str_replace($code, '[]', $file);
}
$code = $this->getExtendCode($file, ',"联系客服"', 2, '[', ']');
if($code){
$file = str_replace($code, '[]', $file);
}
}
if(strpos($file, '"SSL-CERTIFICATE-STORE"')!==false){ //ssl
$file = str_replace('("ssl")', '("encrypt")', $file);
$flag = true;
}

if(strpos($file, '如果您希望添加其它Docker应用')!==false){
$code = $this->getExtendCode($file, '如果您希望添加其它Docker应用', 1, '[', ']');
Expand All @@ -217,7 +240,12 @@ private function handlefile($filepath){
for($i=0;$i<5;$i++){
$code = $this->getExtendCode($file, ',"需求反馈"', 1, '[', ']');
if($code){
$file = str_replace($code, '[]', $file);
if(strpos($code, 'svgtofont-desired')){
$file = str_replace($code, '[]', $file);
}else{
$code = $this->getExtendFunction($code, ',"需求反馈"');
$file = str_replace($code, '', $file);
}
$flag = true;
}
}
Expand All @@ -231,6 +259,11 @@ private function handlefile($filepath){
$file = str_replace($code, '[]', $file);
$flag = true;
}
$code = $this->getExtendFunction($file, '," 需求反馈 "');
if($code){
$file = str_replace($code, '', $file);
$flag = true;
}

if(strpos('暂无搜索结果,<span class="text-primary cursor-pointer NpsDialog">提交需求反馈</span>', $file)!==false){
$file = str_replace('暂无搜索结果,<span class="text-primary cursor-pointer NpsDialog">提交需求反馈</span>', '暂无搜索结果', $file);
Expand Down
11 changes: 10 additions & 1 deletion app/command/UpdateAll.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ protected function execute(Input $input, Output $output)
if(!config_get('wbt_type') && config_get('wbt_url') || config_get('wbt_type')==1 && config_get('wbt_surl')){
$this->process_plugins($input, $output, 'Windows');
}
if(!config_get('enbt_type') && config_get('enbt_url') || config_get('enbt_type')==1 && config_get('enbt_surl')){
$this->process_plugins($input, $output, 'en');
}

config_set('runtime', date('Y-m-d H:i:s'));
}
Expand All @@ -43,7 +46,13 @@ private function process_plugins(Input $input, Output $output, $os){

$count = 0;

$type = intval(config_get($os=='Windows'?'updateall_type_win':'updateall_type'));
if($os=='Windows'){
$type = intval(config_get('updateall_type_win'));
}elseif($os=='en'){
$type = intval(config_get('updateall_type_en'));
}else{
$type = intval(config_get('updateall_type'));
}

$json_arr = Plugins::get_plugin_list($os);
//循环下载缺少的插件
Expand Down
43 changes: 43 additions & 0 deletions app/controller/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,22 @@ public function get_panel_version(){
return json($data);
}

public function get_panel_version_v2(){
$version = config_get('new_version');
$down_url = request()->root(true).'/install/update/LinuxPanel-'.$version.'.zip';
$data = [
'OfficialVersion' => [
'version' => $version,
'downUrl' => $down_url,
'updateMsg' => config_get('update_msg'),
'uptime' => config_get('update_date'),
],
'OfficialVersionLatest' => [],
'AccountVersion' => [],
];
return json($data);
}

//安装统计
public function setup_count(){
return 'ok';
Expand Down Expand Up @@ -486,6 +502,10 @@ public function nps_submit(){
return json(['err_no'=>0, 'success'=>true, 'res'=>'Success', 'nonce'=>time()]);
}

public function get_user_give_away(){
return json(['no_exceed_limit'=>false, 'user_give'=>true]);
}

//获取所有蜘蛛IP列表
public function btwaf_getspiders(){
try{
Expand All @@ -504,6 +524,29 @@ public function get_spider(){
return json($result);
}

//检查是否国内IP
public function check_cnip(){
$clientip = bindec(decbin(ip2long($this->clientip)));
$json_file = app()->getBasePath().'lib/cn.json';
$arr = json_decode(file_get_contents($json_file), true);
if(!$arr) return 'False';
foreach($arr as $ip_arr){
if($clientip >= $ip_arr[0] && $clientip <= $ip_arr[1]){
return 'True';
}
}
return 'False';
}

//邮件配额
public function email_user_surplus(){
$data = [
'free' => ['surplus' => '120000', 'total' => '120000', 'used' => '0'],
'period' => ['surplus' => '2000000', 'total' => '2000000', 'used' => '0'],
];
return json(['success'=>true, 'msg'=>'获取成功', 'res'=>$data]);
}

//检查黑白名单
private function checklist(){
if(config_get('whitelist') == 1){
Expand Down
1 change: 1 addition & 0 deletions app/lib/cn.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions app/script/convert.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

Linux_Version="9.3.0"
Windows_Version="8.2.1"
Linux_Version="9.4.0"
Windows_Version="8.2.2"
Aapanel_Version="7.0.13"
Btm_Version="2.3.0"

Expand Down
8 changes: 4 additions & 4 deletions install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES
('bt_key', ''),
('whitelist', '0'),
('download_page', '1'),
('new_version', '9.3.0'),
('new_version', '9.4.0'),
('update_msg', '暂无更新日志'),
('update_date', '2024-12-06'),
('new_version_win', '8.2.1'),
('update_date', '2025-01-09'),
('new_version_win', '8.2.2'),
('update_msg_win', '暂无更新日志'),
('update_date_win', '2024-12-06'),
('update_date_win', '2024-12-30'),
('new_version_en', '7.0.13'),
('update_msg_en', '暂无更新日志'),
('update_date_en', '2024-11-17'),
Expand Down
Loading

0 comments on commit 53a4840

Please sign in to comment.