mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-10 23:41:27 +00:00
2020-06-19 11:53:23
This commit is contained in:
@@ -12,7 +12,6 @@ if [ "$enable" == '1' ]; then
|
|||||||
readsh "请输入${appname}媒体服务器名称" "servername" "mixbox-dms"
|
readsh "请输入${appname}媒体服务器名称" "servername" "mixbox-dms"
|
||||||
# readsh "请输入${appname}外网访问配置[1/0]" "openport" "0"
|
# readsh "请输入${appname}外网访问配置[1/0]" "openport" "0"
|
||||||
readsh "重启${appname}服务[1/0] " "res" "1"
|
readsh "重启${appname}服务[1/0] " "res" "1"
|
||||||
[ "$res" = '1' -o -z "$res" ] && return 0
|
[ "$res" != '0' ] && exit 0
|
||||||
else
|
fi
|
||||||
return 1
|
exit 1
|
||||||
fi
|
|
||||||
@@ -4,5 +4,5 @@ needver="0.0.1"
|
|||||||
backupfiles="bin/dropbear,config/dropbear_dss_host_key,config/dropbear_rsa_host_key"
|
backupfiles="bin/dropbear,config/dropbear_dss_host_key,config/dropbear_rsa_host_key"
|
||||||
supports="linux_aarch64,linux_arm,linux_mips"
|
supports="linux_aarch64,linux_arm,linux_mips"
|
||||||
appinfo="移植小米的SSH功能到工具箱"
|
appinfo="移植小米的SSH功能到工具箱"
|
||||||
newinfo="添加备份功能支持"
|
newinfo="移除dss证书,支持一些新的路由型号"
|
||||||
version="0.0.2"
|
version="0.0.3"
|
||||||
|
|||||||
@@ -7,12 +7,8 @@ eval `mbdb export dropbear`
|
|||||||
get_config() {
|
get_config() {
|
||||||
|
|
||||||
logsh "【$service】" "检查${appname}配置文件中..."
|
logsh "【$service】" "检查${appname}配置文件中..."
|
||||||
[ ! -f ${mbroot}/apps/${appname}/config/dropbear_rsa_host_key -a ! -f /etc/dropbear/dropbear_rsa_host_key ] && logsh "【$service】" "缺失证书文件无法启动!" && exit 1
|
[ ! -f ${mbroot}/apps/${appname}/bin/${appname} ] && cp -rf /usr/sbin/dropbear ${mbroot}/apps/${appname}/bin/${appname} && logsh "【$service】" "移植主程序文件成功!"
|
||||||
[ ! -f ${mbroot}/apps/${appname}/config/dropbear_dss_host_key -a ! -f /etc/dropbear/dropbear_dss_host_key ] && logsh "【$service】" "缺失证书文件无法启动!" && exit 1
|
[ ! -f ${mbroot}/apps/${appname}/config/dropbear_rsa_host_key ] && cp -rf /etc/dropbear/dropbear_rsa_host_key ${mbroot}/apps/${appname}/config/dropbear_rsa_host_key && logsh "【$service】" "移植证书成功!"
|
||||||
[ ! -f ${mbroot}/apps/${appname}/bin/${appname} ] && cp -rf /usr/sbin/dropbear ${mbroot}/apps/${appname}/bin/${appname}
|
|
||||||
# [ ! -f ${mbroot}/apps/${appname}/bin/dropbearkey ] && cp -rf /usr/bin/dropbearkey ${mbroot}/apps/${appname}/bin/dropbearkey
|
|
||||||
[ ! -f ${mbroot}/apps/${appname}/config/dropbear_rsa_host_key ] && cp -rf /etc/dropbear/dropbear_rsa_host_key ${mbroot}/apps/${appname}/config/dropbear_rsa_host_key
|
|
||||||
[ ! -f ${mbroot}/apps/${appname}/config/dropbear_dss_host_key ] && cp -rf /etc/dropbear/dropbear_dss_host_key ${mbroot}/apps/${appname}/config/dropbear_dss_host_key
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ needver="0.0.1"
|
|||||||
supports="linux_arm,linux_mips,linux_x86_64,darwin_x86_64"
|
supports="linux_arm,linux_mips,linux_x86_64,darwin_x86_64"
|
||||||
backupfiles="bin/fastdick"
|
backupfiles="bin/fastdick"
|
||||||
appinfo="迅雷快鸟,宽带提速工具"
|
appinfo="迅雷快鸟,宽带提速工具"
|
||||||
newinfo=""
|
newinfo="加入判断没有vim则使用vi"
|
||||||
version="0.0.2"
|
version="0.0.3"
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
#------------------【FastDick】--------------------
|
|
||||||
fastdick() {
|
|
||||||
|
|
||||||
eval `mbdb export fastdick`
|
|
||||||
source /etc/mixbox/bin/base
|
|
||||||
echo "********* $service ***********"
|
|
||||||
echo "[${appinfo}]"
|
|
||||||
[ -z "$(mbdb show entware)" ] && echo "请先安装Entware插件!" && return
|
|
||||||
readsh "启动${appname}服务[1/0] " "enable" "1"
|
|
||||||
if [ "$enable" == '1' ]; then
|
|
||||||
uid=$(mbdb get ${appname}.main.uid) || uid="空"
|
|
||||||
pwd=$(mbdb get ${appname}.main.pwd) || pwd="空"
|
|
||||||
peerid=$(mbdb get ${appname}.main.peerid) || peerid="空"
|
|
||||||
echo "[请按https://github.com/fffonion/Xunlei-Fastdick这里的教程运行swjsq.py并找到运行成功后生成的swjsq_wget.sh文件,复制其所有内容编辑到配置里]"
|
|
||||||
read -p "修改${appname}配置(将开始使用vim编辑快鸟运行脚本)?[1/0]" res
|
|
||||||
if [ "$res" == '1' ]; then
|
|
||||||
echo "[提示]按i开始编辑,编辑完按ESC键再按:wq即可保存退出[注意冒号]"
|
|
||||||
read -p "清空文件之后再编辑?[1/0]" res
|
|
||||||
[ "$res" = '1' ] && cat /dev/null > ${mbroot}/apps/${appname}/bin/${appname}
|
|
||||||
vim ${mbroot}/apps/${appname}/bin/${appname}
|
|
||||||
fi
|
|
||||||
readsh "请输入${appname}外网访问配置[1/0]" "openport" "1"
|
|
||||||
|
|
||||||
${mbroot}/apps/${appname}/scripts/${appname}.sh restart
|
|
||||||
else
|
|
||||||
${mbroot}/apps/${appname}/scripts/${appname}.sh stop
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
|
||||||
#------------------【FastDick】--------------------
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
1.0.6
|
|
||||||
27
apps/fastdick/scripts/config.sh
Normal file
27
apps/fastdick/scripts/config.sh
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
eval `mbdb export fastdick`
|
||||||
|
source /etc/mixbox/bin/base
|
||||||
|
echo "********* $service ***********"
|
||||||
|
echo "[${appinfo}]"
|
||||||
|
[ -z "$(mbdb show entware)" ] && echo "请先安装Entware插件!" && return
|
||||||
|
readsh "启动${appname}服务[1/0] " "enable" "1"
|
||||||
|
if [ "$enable" == '1' ]; then
|
||||||
|
uid=$(mbdb get ${appname}.main.uid) || uid="空"
|
||||||
|
pwd=$(mbdb get ${appname}.main.pwd) || pwd="空"
|
||||||
|
peerid=$(mbdb get ${appname}.main.peerid) || peerid="空"
|
||||||
|
echo "[请按https://github.com/fffonion/Xunlei-Fastdick这里的教程运行swjsq.py并找到运行成功后生成的swjsq_wget.sh文件,复制其所有内容编辑到配置里]"
|
||||||
|
read -p "修改${appname}配置(将开始使用vim编辑快鸟运行脚本)?[1/0]" res
|
||||||
|
if [ "$res" == '1' ]; then
|
||||||
|
echo "[提示]按i开始编辑,编辑完按ESC键再按:wq即可保存退出[注意冒号]"
|
||||||
|
read -p "清空文件之后再编辑?[1/0]" res
|
||||||
|
[ "$res" = '1' ] && cat /dev/null > ${mbroot}/apps/${appname}/bin/${appname}
|
||||||
|
if type vim &> /dev/null; then
|
||||||
|
vim ${mbroot}/apps/${appname}/bin/${appname}
|
||||||
|
else
|
||||||
|
vi ${mbroot}/apps/${appname}/bin/${appname}
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
readsh "请输入${appname}外网访问配置[1/0]" "openport" "1"
|
||||||
|
readsh "重启${appname}服务[1/0] " "res" "1"
|
||||||
|
[ "$res" != '0' ] && exit 0
|
||||||
|
fi
|
||||||
|
exit 1
|
||||||
@@ -194,7 +194,7 @@ remove_firewall_start(){
|
|||||||
|
|
||||||
daemon() {
|
daemon() {
|
||||||
local binname="$(basename "${1}")"
|
local binname="$(basename "${1}")"
|
||||||
if type nohup >/dev/null 2>&1; then
|
if type nohup &>/dev/null; then
|
||||||
nohup $@ &> ${mbroot}/var/log/${binname}.log &
|
nohup $@ &> ${mbroot}/var/log/${binname}.log &
|
||||||
else
|
else
|
||||||
$@ &> ${mbroot}/var/log/${binname}.log &
|
$@ &> ${mbroot}/var/log/${binname}.log &
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ if [ "$enable" == '1' ]; then
|
|||||||
|
|
||||||
# readsh "请输入${appname}外网访问配置[1/0]" "openport" "0"
|
# readsh "请输入${appname}外网访问配置[1/0]" "openport" "0"
|
||||||
readsh "重启${appname}服务[1/0] " "res" "1"
|
readsh "重启${appname}服务[1/0] " "res" "1"
|
||||||
[ "$res" = '1' -o -z "$res" ] && return 0
|
[ "$res" != '0' ] && exit 0
|
||||||
else
|
fi
|
||||||
return 1
|
exit 1
|
||||||
fi
|
|
||||||
@@ -5,5 +5,5 @@ supports="linux_aarch64,linux_arm,linux_mips,linux_x86_64"
|
|||||||
openport="1"
|
openport="1"
|
||||||
backupfiles="config/ssserver.conf,config/sscontrol.conf,config/customize_black.conf,config/customize_white.conf"
|
backupfiles="config/ssserver.conf,config/sscontrol.conf,config/customize_black.conf,config/customize_white.conf"
|
||||||
appinfo="最好的翻墙工具,没有之一,还可以加速国内外游戏"
|
appinfo="最好的翻墙工具,没有之一,还可以加速国内外游戏"
|
||||||
newinfo="v2ray配置测试错误也不停止运行程序"
|
newinfo="更新v2ray配置生成脚本"
|
||||||
version="0.1.10"
|
version="0.1.10"
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ ss_mux_concurrency=`cutsh "$idinfo" 15`
|
|||||||
|
|
||||||
rm -rf "$v2ray_config"
|
rm -rf "$v2ray_config"
|
||||||
logsh "【$service】" "生成V2Ray配置文件..."
|
logsh "【$service】" "生成V2Ray配置文件..."
|
||||||
local kcp="null"
|
kcp="null"
|
||||||
local tcp="null"
|
tcp="null"
|
||||||
local ws="null"
|
ws="null"
|
||||||
local h2="null"
|
h2="null"
|
||||||
local tls="null"
|
tls="null"
|
||||||
|
|
||||||
if [ "$ss_network" != "ws" ]; then
|
if [ "$ss_network" != "ws" ]; then
|
||||||
IFIP=`echo $ss_server | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:"`
|
IFIP=`echo $ss_server | grep -E "([0-9]{1,3}[\.]){3}[0-9]{1,3}|:"`
|
||||||
@@ -61,19 +61,19 @@ get_path(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# tcp和kcp下tlsSettings为null,ws和h2下tlsSettings
|
# tcp和kcp下tlsSettings为null,ws和h2下tlsSettings
|
||||||
[ -z "$ss_mux_enable" ] && local ss_mux_enable=true
|
[ -z "$ss_mux_enable" ] && ss_mux_enable=true
|
||||||
[ -z "$ss_mux_concurrency" ] && local ss_mux_concurrency=8
|
[ -z "$ss_mux_concurrency" ] && ss_mux_concurrency=8
|
||||||
[ "$ss_network_security" == "none" ] && ss_network_security=""
|
[ "$ss_network_security" == "none" ] && ss_network_security=""
|
||||||
#if [ "$ss_network" == "ws" -o "$ss_network" == "h2" ];then
|
#if [ "$ss_network" == "ws" -o "$ss_network" == "h2" ];then
|
||||||
case "$ss_network_security" in
|
case "$ss_network_security" in
|
||||||
tls)
|
tls)
|
||||||
local tls="{
|
tls="{
|
||||||
\"allowInsecure\": true,
|
\"allowInsecure\": true,
|
||||||
\"serverName\": null
|
\"serverName\": null
|
||||||
}"
|
}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
local tls="null"
|
tls="null"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
#fi
|
#fi
|
||||||
@@ -85,7 +85,7 @@ fi
|
|||||||
case "$ss_network" in
|
case "$ss_network" in
|
||||||
tcp)
|
tcp)
|
||||||
if [ "$ss_headtype_tcp" == "http" ];then
|
if [ "$ss_headtype_tcp" == "http" ];then
|
||||||
local tcp="{
|
tcp="{
|
||||||
\"connectionReuse\": true,
|
\"connectionReuse\": true,
|
||||||
\"header\": {
|
\"header\": {
|
||||||
\"type\": \"http\",
|
\"type\": \"http\",
|
||||||
@@ -115,11 +115,11 @@ case "$ss_network" in
|
|||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
else
|
else
|
||||||
local tcp="null"
|
tcp="null"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
kcp)
|
kcp)
|
||||||
local kcp="{
|
kcp="{
|
||||||
\"mtu\": 1350,
|
\"mtu\": 1350,
|
||||||
\"tti\": 50,
|
\"tti\": 50,
|
||||||
\"uplinkCapacity\": 12,
|
\"uplinkCapacity\": 12,
|
||||||
@@ -135,14 +135,14 @@ case "$ss_network" in
|
|||||||
}"
|
}"
|
||||||
;;
|
;;
|
||||||
ws)
|
ws)
|
||||||
local ws="{
|
ws="{
|
||||||
\"connectionReuse\": true,
|
\"connectionReuse\": true,
|
||||||
\"path\": $(get_path $ss_network_path),
|
\"path\": $(get_path $ss_network_path),
|
||||||
\"headers\": $(get_ws_header $ss_network_host)
|
\"headers\": $(get_ws_header $ss_network_host)
|
||||||
}"
|
}"
|
||||||
;;
|
;;
|
||||||
h2)
|
h2)
|
||||||
local h2="{
|
h2="{
|
||||||
\"path\": $(get_path $ss_network_path),
|
\"path\": $(get_path $ss_network_path),
|
||||||
\"host\": $(get_h2_host $ss_network_host)
|
\"host\": $(get_h2_host $ss_network_host)
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ if [ "$enable" == '1' ]; then
|
|||||||
readsh "请输入${appname}端口号" "port" "7681"
|
readsh "请输入${appname}端口号" "port" "7681"
|
||||||
readsh "请输入${appname}外网访问配置[1/0]" "openport" "0"
|
readsh "请输入${appname}外网访问配置[1/0]" "openport" "0"
|
||||||
readsh "重启${appname}服务[1/0] " "res" "1"
|
readsh "重启${appname}服务[1/0] " "res" "1"
|
||||||
[ "$res" = '1' -o -z "$res" ] && return 0
|
[ "$res" != '0' ] && exit 0
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
fi
|
||||||
|
exit 1
|
||||||
Reference in New Issue
Block a user