Compare commits

...

2 Commits
3.4.1 ... 3.4.2

Author SHA1 Message Date
flucout
56f6a3242b update 2025-09-24 18:57:28 +08:00
flucout
ab322ca6e1 update 2025-08-11 15:30:56 +08:00
17 changed files with 104 additions and 23 deletions

View File

@@ -143,10 +143,10 @@ class CleanViteJs extends Command
if($code){
$file = str_replace($code, '{}', $file);
}
$file = preg_replace('!\w+\(\(\(\)=>"calc"===\w+\.\w+\.type\)\)!', '!1', $file);
$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);
$file = preg_replace('!computed\(\(\)=>"calc"===\w+\.\w+\.type\)!', '!1', $file);
$file = preg_replace('!computed\(\(\)=>"input"===\w+\.\w+\.type\)!', '!1', $file);
$file = preg_replace('!computed\(function\(\)\{return"calc"===\w+\.\w+\.type\}\)!', '!1', $file);
$file = preg_replace('!computed\(function\(\)\{return"input"===\w+\.\w+\.type\}\)!', '!1', $file);
$code = $this->getExtendCode($file, '"自动部署"', 2);
if($code){
$file = str_replace($code, '', $file);
@@ -201,8 +201,6 @@ class CleanViteJs extends Command
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);
@@ -249,12 +247,12 @@ class CleanViteJs extends Command
$flag = true;
}
}
$code = $this->getExtendCode($file, '("需求反馈")', 1, '[', ']');
$code = $this->getExtendCode($file, '("需求反馈",-1)', 1, '[', ']');
if($code){
$file = str_replace($code, '[]', $file);
$flag = true;
}
$code = $this->getExtendCode($file, '(" 需求反馈 ")', 1, '[', ']');
$code = $this->getExtendCode($file, '(" 需求反馈 ",-1)', 1, '[', ']');
if($code && strpos($filepath, 'vue_vue_type_') === false){
$file = str_replace($code, '[]', $file);
$flag = true;
@@ -265,7 +263,7 @@ class CleanViteJs extends Command
$flag = true;
}
if(strpos('暂无搜索结果,<span class="text-primary cursor-pointer NpsDialog">提交需求反馈</span>', $file)!==false){
if(strpos($file, '暂无搜索结果,<span class="text-primary cursor-pointer NpsDialog">提交需求反馈</span>')!==false){
$file = str_replace('暂无搜索结果,<span class="text-primary cursor-pointer NpsDialog">提交需求反馈</span>', '暂无搜索结果', $file);
$flag = true;
}

View File

@@ -100,6 +100,7 @@ class Admin extends BaseController
View::assign('conf', config('sys'));
$runtime = Db::name('config')->where('key','runtime')->value('value') ?? '<font color="red">未运行</font>';
View::assign('runtime', $runtime);
View::assign('is_user_www', isset($_SERVER['USER']) && $_SERVER['USER'] == 'www');
return view();
}

View File

@@ -328,6 +328,49 @@ class Api extends BaseController
return json(['status'=>true,'err_no'=>0,'msg'=>'获取成功','data'=>$data]);
}
//宝塔云控版本信息
public function cloudc_version_info(){
return json(['status'=>true,'msg'=>'获取成功','data'=>[
'version' => '1.0.5',
'download' => '',
'uptime' => '2025/06/16',
'upmsg' => '暂无更新日志'
]]);
}
//宝塔云控版本信息
public function cloudc_get_version(){
return json(['status'=>true,'msg'=>'','oid'=>'','data'=>[
'officialVersion' => [
'version' => '1.0.5',
'download' => '',
'uptime' => '2025/06/16',
'updateMsg' => '暂无更新日志'
],
]]);
}
//宝塔云控授权信息
public function cloudc_order_status(){
$data = [
'status' => true,
'msg' => '获取成功',
'oid' => '',
'data' => [
'id' => 1,
'address' => real_ip(),
'buytime' => time(),
'endtime' => time() + 86400 * 3650,
'num' => 9999,
'max_num' => 9999,
'pid' => 100000023,
'renew_price' => 0,
'state' => 1,
]
];
return json($data);
}
//获取内测版更新日志
public function get_beta_logs(){
return json(['beta_ps'=>'当前暂无内测版', 'list'=>[]]);

View File

@@ -1,9 +1,9 @@
#!/bin/bash
Linux_Version="11.0.0"
Linux_Version="11.1.0"
Windows_Version="8.2.2"
Aapanel_Version="7.0.21"
Btm_Version="2.3.1"
Aapanel_Version="7.0.25"
Btm_Version="2.3.2"
FILES=(
public/install/src/panel6.zip

View File

@@ -273,7 +273,7 @@ $("select[name='enbt_type']").change(function(){
<div class="panel-body">
<form onsubmit="return saveSetting(this)" method="post" class="form" role="form">
<div class="alert alert-info">使用以下命令可以从宝塔官方获取最新的插件列表并批量下载插件包(增量更新)。<br/>你也可以将此命令添加到crontab以使此云端的插件保持最新建议1天执行1次。</div>
<div class="alert alert-danger">使用命令执行之后,可能会导致 /data 目录下文件权限不对,后台插件列表下载插件覆盖会报错,需要手动循环设置 /data 目录权限。</div>
{if $is_user_www}<div class="alert alert-danger">计划任务执行用户必须选择www用户</div>{/if}
<div class="alert alert-warning">上次运行时间:{$runtime|raw}</div>
<div class="list-group-item">php {:app()->getRootPath()}think updateall</div><br/>
</form>

View File

@@ -12,18 +12,18 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES
('bt_key', ''),
('whitelist', '0'),
('download_page', '1'),
('new_version', '11.0.0'),
('new_version', '11.1.0'),
('update_msg', '暂无更新日志'),
('update_date', '2025-07-24'),
('update_date', '2025-09-21'),
('new_version_win', '8.2.2'),
('update_msg_win', '暂无更新日志'),
('update_date_win', '2024-12-30'),
('new_version_en', '7.0.21'),
('new_version_en', '7.0.25'),
('update_msg_en', '暂无更新日志'),
('update_date_en', '2025-07-22'),
('new_version_btm', '2.3.0'),
('update_date_en', '2025-09-10'),
('new_version_btm', '2.3.2'),
('update_msg_btm', '暂无更新日志'),
('update_date_btm', '2024-04-24'),
('update_date_btm', '2025-08-12'),
('updateall_type', '0'),
('syskey', 'UqP94LtI8eWAIgCP');

View File

@@ -316,6 +316,21 @@ Auto_Swap()
echo "$swapFile swap swap defaults 0 0" >> /etc/fstab
swap=`free |grep Swap|awk '{print $2}'`
if [ $swap -gt 1 ];then
KERNEL_MAJOR_VERSION=$(uname -r | cut -d '-' -f1 | awk -F. '{print $1}')
KERNEL_MINOR_VERSION=$(uname -r | cut -d '-' -f1 | awk -F. '{print $2}')
if [ -f "/etc/sysctl.conf" ]; then
sed -i "/vm.swappiness/d" /etc/sysctl.conf
fi
if [ "$KERNEL_MAJOR_VERSION" -lt 3 ]; then
sysctl -w vm.swappiness=1
echo "vm.swappiness=1" >> /etc/sysctl.conf
elif [ "$KERNEL_MAJOR_VERSION" = "3" ] && [ "$KERNEL_MINOR_VERSION" -lt 5 ]; then
sysctl -w vm.swappiness=1
echo "vm.swappiness=1" >> /etc/sysctl.conf
else
sysctl -w vm.swappiness=0
echo "vm.swappiness=0" >> /etc/sysctl.conf
fi
echo "Swap total sizse: $swap";
return;
fi
@@ -569,7 +584,7 @@ Install_RPM_Pack(){
#尝试同步时间(从bt.cn)
echo 'Synchronizing system time...'
getBtTime=$(curl -sS --connect-timeout 3 -m 60 http://www.bt.cn/api/index/get_time)
getBtTime=$(curl -sS --connect-timeout 3 -m 60 https://www.bt.cn/api/index/get_time)
if [ "${getBtTime}" ];then
date -s "$(date -d @$getBtTime +"%Y-%m-%d %H:%M:%S")"
fi
@@ -1060,6 +1075,7 @@ Install_Bt(){
wget -O /www/server/panel/init.sh ${download_Url}/install/src/bt7.init -T 15
wget -O /www/server/panel/data/softList.conf ${download_Url}/install/conf/softListtls10.conf
rm -rf /www/server/panel/plugin/webssh/
rm -f /www/server/panel/class/*.so
if [ ! -f /www/server/panel/data/not_workorder.pl ]; then
echo "True" > /www/server/panel/data/not_workorder.pl
@@ -1439,6 +1455,12 @@ else
HTTP_S="http"
fi
echo "安装基础网站流量统计程序..."
wget -O site_new_total.sh ${download_Url}/site_total/install.sh &> /dev/null
bash site_new_total.sh &> /dev/null
rm -f site_new_total.sh
echo "安装基础网站流量统计程序完成"
echo > /www/server/panel/data/bind.pl
echo -e "=================================================================="
echo -e "\033[32mCongratulations! Installed successfully!\033[0m"

Binary file not shown.

Binary file not shown.

View File

@@ -1 +0,0 @@
{"hash": "d869ee4b8bdcfae324c4fdef9ec647db4a1529e7f6890b8cb4693f40b8a24626", "update_time": "1748242787"}

View File

@@ -237,6 +237,13 @@ fi
echo "修复面板依赖完成!"
echo "==========================================="
echo "安装基础网站流量统计程序..."
wget -O site_new_total.sh ${download_Url}/site_total/install.sh &> /dev/null
bash site_new_total.sh &> /dev/null
rm -f site_new_total.sh
echo "安装基础网站流量统计程序完成"
RE_UPDATE=$(cat /www/server/panel/data/db/update)
if [ "$RE_UPDATE" -ge "4" ];then
echo "2" > /www/server/panel/data/db/update

View File

@@ -152,6 +152,11 @@ Route::group('api', function () {
Route::get('/panel/getLatestOfficialVersion', 'api/get_version_en');
Route::post('/cert/user/list', 'api/nps_questions');
Route::post('/Auth/GetCloudToken', 'api/get_auth_token');
Route::post('/cloudtro/version_info', 'api/cloudc_version_info');
Route::post('/cloudtro/get_version', 'api/cloudc_get_version');
Route::post('/cloudtro/get_product_order_status_v1', 'api/cloudc_order_status');
Route::miss('api/return_error');
});

View File

@@ -78,6 +78,8 @@
- 去除无用的定时任务task.py 文件 删除以下几行
"check_site_monitor": check_site_monitor,
"update_software_list": update_software_list,
"malicious_file_scanning": malicious_file_scanning,
@@ -100,7 +102,7 @@
- [可选]去除各种计算题将bt.js里面的内容复制到 BTPanel/static/vite/oldjs/public_backup.js 末尾
- [可选]去除创建网站自动创建的垃圾文件在class/panelSite.py分别删除
- [可选]去除创建网站自动创建的垃圾文件在class/panelSite.py、class_v2/panel_site_v2.py,分别删除
htaccess = self.sitePath + '/.htaccess'
@@ -110,7 +112,7 @@
这3行及分别接下来的4行代码
- [可选]关闭未绑定域名提示页面在class/panelSite.pyroot /www/server/nginx/html改成return 400
- [可选]关闭未绑定域名提示页面在class/panelSite.py、class_v2/panel_site_v2.pyroot /www/server/nginx/html改成return 400
- [可选]上传文件默认选中覆盖在BTPanel/static/vite/oldjs/upload-drog.jsid="all_operation"加checked属性

View File

@@ -113,6 +113,8 @@
"update_software_list": self.update_software_list,
"get_view_title_file": self.get_view_title_file,
PluginLoader.daemon_panel()
check_node_status()
@@ -137,6 +139,8 @@
这3行及分别接下来的4行代码
def get_view_title_content(self, get): 下面加上 return public.returnMsg(True, '')
- [可选]关闭未绑定域名提示页面在class/panelSite.pyroot /www/server/nginx/html改成return 400
- [可选]关闭自动生成访问日志:在 BTPanel/\_\_init\_\_.py 删除public.write_request_log这一行