mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-11 07:51:54 +00:00
28 lines
1.3 KiB
Plaintext
28 lines
1.3 KiB
Plaintext
#------------------【SSServer】--------------------
|
|
ssserver() {
|
|
|
|
eval `mbdb export ssserver`
|
|
source /etc/mixbox/bin/base
|
|
echo "********* $service ***********"
|
|
echo "[${appinfo}]"
|
|
readsh "启动${appname}服务[1/0] " "enable" "1"
|
|
|
|
if [ "$enable" == '1' ]; then
|
|
# Scripts Here
|
|
read -p "修改${appname}配置信息?[1/0] " res
|
|
if [ "$res" = '1' ]; then
|
|
ciphers="aes-256-gcm aes-192-gcm aes-128-gcm aes-256-ctr aes-192-ctr aes-128-ctr aes-256-cfb aes-192-cfb aes-128-cfb camellia-128-cfb camellia-192-cfb camellia-256-cfb xchacha20-ietf-poly1305 chacha20-ietf-poly1305 chacha20-ietf chacha20 salsa20 rc4-md5"
|
|
readsh "请输入${appname}端口号" "port" "1020"
|
|
readsh "请输入${appname}密码" "password" "tools"
|
|
echo $ciphers | tr " " "\n" | grep -n . | sed -e "s/:/) /g"
|
|
readsh "请输入${appname}加密方式(勿输入数字)" "method" "chacha20"
|
|
fi
|
|
readsh "请输入${appname}外网访问配置[1/0]" "openport" "1"
|
|
${mbroot}/apps/${appname}/scripts/${appname}.sh restart
|
|
else
|
|
${mbroot}/apps/${appname}/scripts/${appname}.sh stop
|
|
fi
|
|
|
|
}
|
|
#------------------【SSServer】--------------------
|