Browse Source

update

tags/1.9 1.9
flucout 1 year ago
parent
commit
57ecdb7401
  1. 4
      app/controller/Api.php
  2. 2
      app/script/convert.sh
  3. 4
      install.sql
  4. 52
      public/install/install_6.0.sh
  5. 11
      public/install/install_btmonitor.sh
  6. BIN
      public/install/src/bt-monitor-2.2.8.zip
  7. BIN
      public/install/src/panel6.zip
  8. BIN
      public/install/update/LinuxPanel-8.0.1.zip
  9. 2
      public/install/update6.sh
  10. 2
      public/install/update_panel.sh
  11. BIN
      public/static/file/kaixin.zip
  12. BIN
      public/win/panel/panel_7.9.0.zip
  13. 3
      route/app.php
  14. 4
      wiki/btmonitor.md

4
app/controller/Api.php

@ -333,6 +333,10 @@ class Api extends BaseController
public function return_error(){ public function return_error(){
return json(['status'=>false, 'msg'=>'不支持当前操作']); return json(['status'=>false, 'msg'=>'不支持当前操作']);
} }
public function return_error2(){
return json(['success'=>false, 'res'=>'不支持当前操作']);
}
public function return_empty(){ public function return_empty(){
return ''; return '';

2
app/script/convert.sh

@ -2,7 +2,7 @@
Linux_Version="8.0.1" Linux_Version="8.0.1"
Windows_Version="7.9.0" Windows_Version="7.9.0"
Btm_Version="2.2.5"
Btm_Version="2.2.8"
FILES=( FILES=(
public/install/src/panel6.zip public/install/src/panel6.zip

4
install.sql

@ -18,9 +18,9 @@ INSERT INTO `cloud_config` (`key`, `value`) VALUES
('new_version_win', '7.9.0'), ('new_version_win', '7.9.0'),
('update_msg_win', '暂无更新日志'), ('update_msg_win', '暂无更新日志'),
('update_date_win', '2023-07-20'), ('update_date_win', '2023-07-20'),
('new_version_btm', '2.2.5'),
('new_version_btm', '2.2.8'),
('update_msg_btm', '暂无更新日志'), ('update_msg_btm', '暂无更新日志'),
('update_date_btm', '2023-07-06'),
('update_date_btm', '2023-08-04'),
('updateall_type', '0'), ('updateall_type', '0'),
('syskey', 'UqP94LtI8eWAIgCP'); ('syskey', 'UqP94LtI8eWAIgCP');

52
public/install/install_6.0.sh

@ -421,12 +421,34 @@ Install_Deb_Pack(){
Get_Versions(){ Get_Versions(){
redhat_version_file="/etc/redhat-release" redhat_version_file="/etc/redhat-release"
deb_version_file="/etc/issue" deb_version_file="/etc/issue"
if [[ $(grep Anolis /etc/os-release) ]] && [[ $(grep VERSION /etc/os-release|grep 8.8) ]];then
if [ -f "/usr/bin/yum" ];then
os_type="anolis"
os_version="8"
return
fi
fi
if [ -f $redhat_version_file ];then if [ -f $redhat_version_file ];then
os_type='el' os_type='el'
is_aliyunos=$(cat $redhat_version_file|grep Aliyun) is_aliyunos=$(cat $redhat_version_file|grep Aliyun)
if [ "$is_aliyunos" != "" ];then if [ "$is_aliyunos" != "" ];then
return return
fi fi
if [[ $(grep "Alibaba Cloud" /etc/redhat-release) ]] && [[ $(grep al8 /etc/os-release) ]];then
os_type="ali-linux-"
os_version="al8"
return
fi
if [[ $(grep "TencentOS Server" /etc/redhat-release|grep 3.1) ]];then
os_type="TencentOS-"
os_version="3.1"
return
fi
os_version=$(cat $redhat_version_file|grep CentOS|grep -Eo '([0-9]+\.)+[0-9]+'|grep -Eo '^[0-9]') os_version=$(cat $redhat_version_file|grep CentOS|grep -Eo '([0-9]+\.)+[0-9]+'|grep -Eo '^[0-9]')
if [ "${os_version}" = "5" ];then if [ "${os_version}" = "5" ];then
os_version="" os_version=""
@ -763,14 +785,16 @@ Set_Bt_Panel(){
auth_path=$(cat /dev/urandom | head -n 16 | md5sum | head -c 8) auth_path=$(cat /dev/urandom | head -n 16 | md5sum | head -c 8)
echo "/${auth_path}" > ${admin_auth} echo "/${auth_path}" > ${admin_auth}
chmod -R 700 $pyenv_path/pyenv/bin chmod -R 700 $pyenv_path/pyenv/bin
btpip install docxtpl==0.16.7
/www/server/panel/pyenv/bin/pip3 install pymongo /www/server/panel/pyenv/bin/pip3 install pymongo
/www/server/panel/pyenv/bin/pip3 install psycopg2-binary /www/server/panel/pyenv/bin/pip3 install psycopg2-binary
/www/server/panel/pyenv/bin/pip3 install flask -U /www/server/panel/pyenv/bin/pip3 install flask -U
/www/server/panel/pyenv/bin/pip3 install flask-sock /www/server/panel/pyenv/bin/pip3 install flask-sock
btpip install simple-websocket==0.10.0
auth_path=$(cat ${admin_auth}) auth_path=$(cat ${admin_auth})
cd ${setup_path}/server/panel/ cd ${setup_path}/server/panel/
if [ "$SET_SSL" == true ]; then if [ "$SET_SSL" == true ]; then
btpip install -I pyOpenSSl
btpip install -I pyOpenSSl 2>/dev/null
btpython /www/server/panel/tools.py ssl btpython /www/server/panel/tools.py ssl
fi fi
/etc/init.d/bt start /etc/init.d/bt start
@ -1003,18 +1027,20 @@ fi
echo > /www/server/panel/data/bind.pl echo > /www/server/panel/data/bind.pl
echo -e "==================================================================" echo -e "=================================================================="
echo -e "\033[32mCongratulations! Installed successfully!\033[0m" echo -e "\033[32mCongratulations! Installed successfully!\033[0m"
echo -e "=================================================================="
echo "外网面板地址: ${HTTP_S}://${getIpAddress}:${panelPort}${auth_path}"
echo "内网面板地址: ${HTTP_S}://${LOCAL_IP}:${panelPort}${auth_path}"
echo -e "username: $username"
echo -e "password: $password"
echo -e "\033[33mIf you cannot access the panel,\033[0m"
echo -e "\033[33mrelease the following panel port [${panelPort}] in the security group\033[0m"
echo -e "\033[33m若无法访问面板,请检查防火墙/安全组是否有放行面板[${panelPort}]端口\033[0m"
if [ "${HTTP_S}" == "https" ];then
echo -e "\033[33m因已开启面板自签证书,访问面板会提示不匹配证书,请参考以下链接配置证书\033[0m"
echo -e "\033[33mhttps://www.bt.cn/bbs/thread-105443-1-1.html\033[0m"
fi
echo -e "========================面板账户登录信息=========================="
echo -e ""
echo -e " 外网面板地址: ${HTTP_S}://${getIpAddress}:${panelPort}${auth_path}"
echo -e " 内网面板地址: ${HTTP_S}://${LOCAL_IP}:${panelPort}${auth_path}"
echo -e " username: $username"
echo -e " password: $password"
echo -e " "
echo -e "=========================打开面板前请看==========================="
echo -e ""
echo -e " 【云服务器】请在安全组放行 $panelPort 端口"
echo -e " 因默认启用自签证书https加密访问,浏览器将提示不安全"
echo -e " 点击【高级】-【继续访问】或【接受风险并继续】访问"
echo -e " 教程:https://www.bt.cn/bbs/thread-117246-1-1.html"
echo -e ""
echo -e "==================================================================" echo -e "=================================================================="
endTime=`date +%s` endTime=`date +%s`

11
public/install/install_btmonitor.sh

@ -215,6 +215,7 @@ Install_Python_Lib(){
$pyenv_path/pyenv/bin/pip install backports.lzma $pyenv_path/pyenv/bin/pip install backports.lzma
$pyenv_path/pyenv/bin/pip install pandas $pyenv_path/pyenv/bin/pip install pandas
$pyenv_path/pyenv/bin/pip install msgpack $pyenv_path/pyenv/bin/pip install msgpack
$pyenv_path/pyenv/bin/pip install simple-websocket==0.10.0
fi fi
source $pyenv_path/pyenv/bin/activate source $pyenv_path/pyenv/bin/activate
chmod -R 700 $pyenv_path/pyenv/bin chmod -R 700 $pyenv_path/pyenv/bin
@ -274,6 +275,7 @@ Install_Python_Lib(){
$pyenv_path/pyenv/bin/pip install backports.lzma $pyenv_path/pyenv/bin/pip install backports.lzma
$pyenv_path/pyenv/bin/pip install pandas $pyenv_path/pyenv/bin/pip install pandas
$pyenv_path/pyenv/bin/pip install msgpack $pyenv_path/pyenv/bin/pip install msgpack
$pyenv_path/pyenv/bin/pip install simple-websocket==0.10.0
if [ ! -f $pyenv_path/pyenv/bin/python ];then if [ ! -f $pyenv_path/pyenv/bin/python ];then
rm -f $pyenv_file rm -f $pyenv_file
Red_Error "ERROR: Install python env fielded." "ERROR: 下载堡塔云监控主控端运行环境失败,请尝试重新安装!" Red_Error "ERROR: Install python env fielded." "ERROR: 下载堡塔云监控主控端运行环境失败,请尝试重新安装!"
@ -331,6 +333,7 @@ Install_Python_Lib(){
$pyenv_path/pyenv/bin/pip install backports.lzma $pyenv_path/pyenv/bin/pip install backports.lzma
$pyenv_path/pyenv/bin/pip install pandas $pyenv_path/pyenv/bin/pip install pandas
$pyenv_path/pyenv/bin/pip install msgpack $pyenv_path/pyenv/bin/pip install msgpack
$pyenv_path/pyenv/bin/pip install simple-websocket==0.10.0
source $pyenv_path/pyenv/bin/activate source $pyenv_path/pyenv/bin/activate
is_gevent=$($python_bin -m gevent 2>&1|grep -oE package) is_gevent=$($python_bin -m gevent 2>&1|grep -oE package)
@ -407,7 +410,13 @@ EOF
chmod +x $monitor_path/BT-MONITOR chmod +x $monitor_path/BT-MONITOR
chmod +x $monitor_path/tools.py chmod +x $monitor_path/tools.py
wget -O /etc/init.d/btm ${download_Url}/init/btmonitor.init -t 5 -T 10 wget -O /etc/init.d/btm ${download_Url}/init/btmonitor.init -t 5 -T 10
# \cp -r $monitor_path/init.sh /etc/init.d/btm
tmp_size=$(du -b "/etc/init.d/btm"|awk '{print $1}')
if [ ${tmp_size} == 0 ]; then
\cp -r $monitor_path/init.sh /etc/init.d/btm
fi
if [ ! -f "/etc/init.d/btm" ];then
\cp -r $monitor_path/init.sh /etc/init.d/btm
fi
chmod +x /etc/init.d/btm chmod +x /etc/init.d/btm
ln -sf /etc/init.d/btm /usr/bin/btm ln -sf /etc/init.d/btm /usr/bin/btm

BIN
public/install/src/bt-monitor-2.2.5.zip → public/install/src/bt-monitor-2.2.8.zip

BIN
public/install/src/panel6.zip

BIN
public/install/update/LinuxPanel-8.0.1.zip

2
public/install/update6.sh

@ -42,7 +42,7 @@ download_Url=$NODE_URL
setup_path=/www setup_path=/www
version=$(curl -Ss --connect-timeout 5 -m 2 $Btapi_Url/api/panel/get_version) version=$(curl -Ss --connect-timeout 5 -m 2 $Btapi_Url/api/panel/get_version)
if [ "$version" = '' ];then if [ "$version" = '' ];then
version='7.9.9'
version='8.0.1'
fi fi
armCheck=$(uname -m|grep arm) armCheck=$(uname -m|grep arm)
if [ "${armCheck}" ];then if [ "${armCheck}" ];then

2
public/install/update_panel.sh

@ -78,7 +78,7 @@ install_pack(){
if [ -f /usr/bin/yum ];then if [ -f /usr/bin/yum ];then
yum install libcurl-devel libffi-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y yum install libcurl-devel libffi-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel -y
else else
apt install libcurl4-openssl-dev net-tools swig build-essential libffi-dev zlib1g.dev libbz2-dev libssl-dev libncurses-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libdb++-dev libpcap-dev xz-utils -y
apt install libcurl4-openssl-dev net-tools swig build-essential libffi-dev zlib1g-dev libbz2-dev libssl-dev libncurses-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libdb++-dev libpcap-dev xz-utils -y
fi fi
} }

BIN
public/static/file/kaixin.zip

BIN
public/win/panel/panel_7.9.0.zip

3
route/app.php

@ -21,6 +21,7 @@ Route::any('/bt_monitor/latest_version', 'api/btm_latest_version');
Route::group('authorization', function () { Route::group('authorization', function () {
Route::post('/login', 'api/authorization_login'); Route::post('/login', 'api/authorization_login');
Route::post('/info', 'api/authorization_info'); Route::post('/info', 'api/authorization_info');
Route::post('/info_v2', 'api/authorization_info');
Route::miss('api/return_error'); Route::miss('api/return_error');
}); });
@ -101,6 +102,8 @@ Route::group('api', function () {
Route::get('/panel/get_beta_logs', 'api/get_beta_logs'); Route::get('/panel/get_beta_logs', 'api/get_beta_logs');
Route::get('/wpanel/get_beta_logs', 'api/get_beta_logs'); Route::get('/wpanel/get_beta_logs', 'api/get_beta_logs');
Route::post('/v2/common_v1_authorization/get_pricing', 'api/return_error2');
Route::any('/bt_waf/getSpiders', 'api/btwaf_getspiders'); Route::any('/bt_waf/getSpiders', 'api/btwaf_getspiders');
Route::miss('api/return_error'); Route::miss('api/return_error');

4
wiki/btmonitor.md

@ -10,9 +10,9 @@
极少数文件解密失败是正常现象可无视 极少数文件解密失败是正常现象可无视
- 全局搜索替换 https://api.bt.cn => http://www.example.com(需排除/bt_monitor/latest_agent_version)
- 全局搜索替换 https://api.bt.cn => http://www.example.com(需排除/bt_monitor/latest_agent_version、/bt_monitor/ip_info
- 全局搜索替换 https://www.bt.cn/api/ => http://www.example.com/api/(需排除/panel/get_ip_info)
- 全局搜索替换 https://www.bt.cn/api/ => http://www.example.com/api/
- core/include/public.py 在 - core/include/public.py 在

Loading…
Cancel
Save