Skip to content

Commit

Permalink
optimize perpare scripts, update simple-term-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Paper-Dragon committed Dec 7, 2024
1 parent 7629653 commit 5b8a1a2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def config_init(args):
disable_aead_verify = "N"
# 选择传输层协议
protocol_options = ["socks5", "vmess", "trojan", "shadowsocks", "vmess-socks5"]
protocol_menu = TerminalMenu(protocol_options, title="请选择你要制作的协议").show()
protocol_menu = TerminalMenu(protocol_options, title="请选择你要制作的协议(按上下键移动,回车选择)").show()
protocol = protocol_options[protocol_menu]

advanced_configuration = "N"
Expand Down
10 changes: 7 additions & 3 deletions prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,16 @@ basic_optimization() {

ulimit -SHn 10240
ulimit -SHs unlimited
echo '500000' > /proc/sys/net/nf_conntrack_max
echo '500000' > /proc/sys/net/netfilter/nf_conntrack_max

# 关闭 Selinux
if [[ "${ID}" == "centos" ]]; then
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
setenforce 0 && echo -e "${OK} ${Green} 已经关闭selinux ${Font}" || echo -e "${Error} ${RedBG} 关闭selinux出错 ${Font}"
if command -v getenforce &> /dev/null; then
sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
setenforce 0 && echo "已经关闭selinux" || echo "关闭selinux出错"
else
echo "SELinux 未安装,无需关闭"
fi
fi

}
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
psutil==6.1.0
simple-term-menu==1.6.4
simple-term-menu==1.6.6

0 comments on commit 5b8a1a2

Please sign in to comment.