Skip to content

Commit

Permalink
1.更新frps 版本到 v3.2
Browse files Browse the repository at this point in the history
2.新增.gitignore 文件
Fix:
1. 修复在 ubuntu 系统下 openssl 的默认配置文件地址错误的bug
2.修复在 ubuntu 系统下 frps 启动命令中 \n 字符导致读取pid 出错的bug
  • Loading branch information
mail@szhcloud.cn authored and mail@szhcloud.cn committed Apr 3, 2023
1 parent c15e031 commit 7a5e1f9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.idea/
.git/
3 changes: 2 additions & 1 deletion frps_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,8 @@ def _start_force_frps(self):
# 强制终止所有后台正在运行的frps 进程
os.system('pkill -9 frps')
self._format_config()
pid = public.ExecShell('nohup ./bin/frps -c ./data/conf/frps.ini & \n echo $! ', None, True, plugin_path)
# fix 修复 命令中 \n 导致ubuntu 执行失败的bug
pid = public.ExecShell('nohup ./bin/frps -c ./data/conf/frps.ini & echo $! ', None, True, plugin_path)
pid = pid[0].replace("\n", "")
db_obj = self.__db()
db_obj.table('global_config').where('`group` = ? and `name` = ?', ('frps', 'run_status')).update(
Expand Down
2 changes: 1 addition & 1 deletion info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"title": "frp服务端",
"name": "frps",
"ps": "基于 https://github.com/fatedier/frp 开发的GUI 管理工具, 可提供可视化的服务端管理配置功能",
"versions": "3.1.beta",
"versions": "3.2.beta",
"checks": "/www/server/panel/plugin/frps",
"author": "IW3C",
"home": "https://www.atonal.cn"
Expand Down
8 changes: 7 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ Install()
mkdir ${install_path}/data/tls/ca/
mkdir ${install_path}/data/tls/server/
echo '生成服务器CA 证书中'
cp /etc/pki/tls/openssl.cnf $install_path/data/tls/openssl.cnf
# centos 的 openssl.cnf 文件地址 /etc/pki/tls/openssl.cnf
# ubuntu 的 openssl.cnf 文件地址 usr/lib/ssl/openssl.cnf
if [ ! -f /etc/pki/tls/openssl.cnf ];then
cp /etc/pki/tls/openssl.cnf $install_path/data/tls/openssl.cnf
else:
cp /usr/lib/ssl/openssl.cnf $install_path/data/tls/openssl.cnf
fi
openssl genrsa -out $install_path/data/tls/ca/ca.key 2048
openssl req -x509 -new -nodes -key $install_path/data/tls/ca/ca.key -subj "/CN=${server_ip}.frp.plugin.bt.cn" -days 5000 -out $install_path/data/tls/ca/ca.crt
echo '生成服务器证书中'
Expand Down

0 comments on commit 7a5e1f9

Please sign in to comment.