2019-01-19

This commit is contained in:
monlor
2019-01-19 12:02:30 +08:00
parent 62e6f5266e
commit 968acc1d90
23 changed files with 40 additions and 35 deletions
+2 -2
View File
@@ -19,12 +19,12 @@ mixbox|一款支持多平台,多架构的Shell工具箱|修复由于mbdb导致
ngrok|轻量级的内网穿透工具||0.0.2|Ngrok|linux_arm,linux_mips ngrok|轻量级的内网穿透工具||0.0.2|Ngrok|linux_arm,linux_mips
pptpd|简单但并不安全的VPN服务器||0.0.2|PPTPD|linux_arm,linux_mips,linux_x86_64 pptpd|简单但并不安全的VPN服务器||0.0.2|PPTPD|linux_arm,linux_mips,linux_x86_64
qiandao|koolshare merlin 自动签到程序||0.0.2|QianDao|linux_arm,linux_x86_64 qiandao|koolshare merlin 自动签到程序||0.0.2|QianDao|linux_arm,linux_x86_64
shadowsocks|最好的翻墙工具,没有之一,还可以加速国内外游戏|1.修复回国模式的未添加ipset规则的bug,\n\ 2.修复其余设备运行模式一直显示科学上网的bug\n\ 3.修复vray配置文件安全方式为空时的错误|0.0.7|ShadowSocks|linux_arm,linux_mips,linux_x86_64 shadowsocks|最好的翻墙工具,没有之一,还可以加速国内外游戏|1.修复回国模式的未添加ipset规则的bug\n\ 2.修复其余设备运行模式一直显示科学上网的bug\n\ 3.修复vray配置文件安全方式为空时的错误|0.0.7|ShadowSocks|linux_arm,linux_mips,linux_x86_64
smartdns|DNS加速工具,从多个上游DNS服务器查询,避免DS污染|更新smartdns程序版本|0.0.3|SmartDNS|linux_arm,linux_mips,linux_x86_64 smartdns|DNS加速工具,从多个上游DNS服务器查询,避免DS污染|更新smartdns程序版本|0.0.3|SmartDNS|linux_arm,linux_mips,linux_x86_64
ssserver|快速搭建ss服务端程序||0.0.2|SSServer|linux_arm,linux_x86_64 ssserver|快速搭建ss服务端程序||0.0.2|SSServer|linux_arm,linux_x86_64
tinyproxy|轻量级的Http代理工具||0.0.2|TinyProxy|linux_arm,linux_mips,linux_x86_64 tinyproxy|轻量级的Http代理工具||0.0.2|TinyProxy|linux_arm,linux_mips,linux_x86_64
transmission|一款BT下载神器||0.0.3|Transmission|linux_arm,linux_mips,linux_x86_64 transmission|一款BT下载神器||0.0.3|Transmission|linux_arm,linux_mips,linux_x86_64
verysync|基于p2p的文件同步工具,局域网同步速度快||0.0.3|VerySync|linux_arm,linux_mips,linux_x86_64 verysync|基于p2p的文件同步工具,局域网同步速度快||0.0.4|VerySync|linux_arm,linux_mips,linux_x86_64
vsftpd|快速搭建Ftp服务器,局域网文件共享||0.0.3|VsFtpd|linux_arm,linux_mips,linux_x86_64 vsftpd|快速搭建Ftp服务器,局域网文件共享||0.0.3|VsFtpd|linux_arm,linux_mips,linux_x86_64
webd|一款只有40k大小的mini个人网盘||0.0.2|WebD|linux_arm,linux_mips,linux_x86_64,darwin_linux_x86_64 webd|一款只有40k大小的mini个人网盘||0.0.2|WebD|linux_arm,linux_mips,linux_x86_64,darwin_linux_x86_64
webshell|网页ssh工具,可在网页上管理路由器||0.0.2|WebShell|linux_arm,linux_mips,linux_x86_64 webshell|网页ssh工具,可在网页上管理路由器||0.0.2|WebShell|linux_arm,linux_mips,linux_x86_64
+1 -1
View File
@@ -178,7 +178,7 @@ readsh() {
mbdb set $appname.main.$uciname="$default" || echo "设置key:"$uciname"等于value:"$default"出错!" mbdb set $appname.main.$uciname="$default" || echo "设置key:"$uciname"等于value:"$default"出错!"
fi fi
else else
if [ "$uciname" = "port" -a -n "$(netstat -tunpl 2> /dev/null | grep -w "$res")" ]; then if [ "$uciname" = "port" ] && [ -n "$(netstat -tunpl 2> /dev/null | grep -w "$res")" ]; then
echo "端口已被占用!请重新输入!" echo "端口已被占用!请重新输入!"
readsh $@ readsh $@
else else
+1 -1
View File
@@ -5,7 +5,7 @@ supports="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="1.修复回国模式的未添加ipset规则的bug,\n\ newinfo="1.修复回国模式的未添加ipset规则的bug\n\
2.修复其余设备运行模式一直显示科学上网的bug\n\ 2.修复其余设备运行模式一直显示科学上网的bug\n\
3.修复vray配置文件安全方式为空时的错误" 3.修复vray配置文件安全方式为空时的错误"
version="0.0.7" version="0.0.7"
+1 -1
View File
@@ -4,4 +4,4 @@ needver="0.0.1"
supports="linux_arm,linux_mips,linux_x86_64" supports="linux_arm,linux_mips,linux_x86_64"
appinfo="基于p2p的文件同步工具,局域网同步速度快" appinfo="基于p2p的文件同步工具,局域网同步速度快"
newinfo="" newinfo=""
version="0.0.3" version="0.0.4"
+3 -3
View File
@@ -22,10 +22,10 @@ start () {
logsh "【$service】" "正在启动${appname}服务... " logsh "【$service】" "正在启动${appname}服务... "
cru a "${appname}" "0 6 * * * ${mbroot}/apps/${appname}/scripts/${appname}.sh restart" cru a "${appname}" "0 6 * * * ${mbroot}/apps/${appname}/scripts/${appname}.sh restart"
[ -f "${mbroot}/apps/${appname}/bin/${appname}".old ] && rm -rf "${mbroot}/apps/${appname}/bin/${appname}".old [ -f "${mbroot}/apps/${appname}/bin/${appname}".old ] && rm -rf "${mbroot}/apps/${appname}/bin/${appname}".old
[ ! -d "${mbroot}/apps/${appname}/config" ] && mkdir ${mbroot}/apps/${appname}/config [ ! -d "${CONF}" ] && mkdir ${CONF}
open_ports open_ports
write_firewall_start write_firewall_start
daemon ${mbroot}/apps/${appname}/bin/${appname} -home "${mbroot}/apps/${appname}/config" -gui-address :${port} -no-browser -logfile ${mbroot}/var/log/${appname}.log daemon ${mbroot}/apps/${appname}/bin/${appname} -home "${CONF}" -gui-address :${port} -no-browser -logfile ${mbroot}/var/log/${appname}.log
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
logsh "【$service】" "启动${appname}服务失败!" logsh "【$service】" "启动${appname}服务失败!"
else else
@@ -42,7 +42,7 @@ stop () {
close_port close_port
remove_firewall_start remove_firewall_start
killall -9 ${appname} &> /dev/null killall -9 ${appname} &> /dev/null
logsh "【$service】" "卸载插件后可删除${mbroot}/apps/${appname}/config文件夹" logsh "【$service】" "卸载插件后可删除${CONF}文件夹"
[ "$enable" == '0' ] && destroy [ "$enable" == '0' ] && destroy
} }
+3 -3
View File
@@ -53,10 +53,10 @@ vsftpd() {
[ "$res" == '1' ] && vsftpdAdd [ "$res" == '1' ] && vsftpdAdd
read -p "删除${appname}用户?[1/0] " res read -p "删除${appname}用户?[1/0] " res
[ "$res" == '1' ] && vsftpdDel [ "$res" == '1' ] && vsftpdDel
# if [ "$(mbdb get entware.main.enable)" = '1' ]; then if [ "$(mbdb get entware.main.enable)" = '1' ]; then
# readsh "使用entware安装插件程序[1/0]" "entware" "1" readsh "使用entware安装插件程序[1/0]" "entware" "1"
# [ "$entware" = '1' ] && mv ${mbroot}/apps/${appname}/bin/${appname} ${mbroot}/apps/${appname}/bin/${appname}.bak &> /dev/null # [ "$entware" = '1' ] && mv ${mbroot}/apps/${appname}/bin/${appname} ${mbroot}/apps/${appname}/bin/${appname}.bak &> /dev/null
# fi fi
readsh "请输入${appname}外网访问配置[1/0]" "openport" "1" readsh "请输入${appname}外网访问配置[1/0]" "openport" "1"
${mbroot}/apps/${appname}/scripts/${appname}.sh restart ${mbroot}/apps/${appname}/scripts/${appname}.sh restart
+1 -1
View File
@@ -9,7 +9,7 @@ anon_umask=022
check_shell=NO check_shell=NO
allow_writeable_chroot=YES allow_writeable_chroot=YES
session_support=NO session_support=NO
userlist_file=/etc/vsftpd.users userlist_file=/etc/mixbox/apps/vsftpd/config/vsftpd.users
xferlog_file=/etc/mixbox/var/log/vsftpd.log xferlog_file=/etc/mixbox/var/log/vsftpd.log
deny_file={*.scr} deny_file={*.scr}
write_enable=YES write_enable=YES
+26 -21
View File
@@ -5,6 +5,13 @@ eval `mbdb export vsftpd`
port=21 port=21
FTPUSER=${mbroot}/apps/vsftpd/config/ftpuser.conf FTPUSER=${mbroot}/apps/vsftpd/config/ftpuser.conf
# binname="${appname} ${appname}-ext" # binname="${appname} ${appname}-ext"
userpath=/etc/mixbox/apps/vsftpd/config/vsftpd.users
[ "$entware" = '1' ] && configpath=/opt/etc/vsftpd/vsftpd.conf || configpath=/etc/vsftpd.conf
[ ! -d /var/run/vsftpd ] && mkdir -p /var/run/vsftpd
[ -z "$port" ] && port=21
[ -z "$anon_root" ] && anon_root=/var/ftp
[ ! -f "${configpath}" ] && touch ${configpath}
add(){ add(){
sed -i "/$1/"d /etc/passwd sed -i "/$1/"d /etc/passwd
@@ -25,7 +32,7 @@ add(){
del(){ del(){
sed -i "/^$1/"d /etc/passwd sed -i "/^$1/"d /etc/passwd
sed -i "/^$1/"d /etc/shadow sed -i "/^$1/"d /etc/shadow
sed -i "/^$1/"d /etc/vsftpd.users &> /dev/null sed -i "/^$1/"d ${userpath} &> /dev/null
} }
# init_mount() { # init_mount() {
@@ -41,7 +48,7 @@ set_config() {
logsh "【$service】" "加载${appname}设置... " logsh "【$service】" "加载${appname}设置... "
[ ! -f $FTPUSER ] && logsh "【$service】" "未配置ftp用户!" && exit [ ! -f $FTPUSER ] && logsh "【$service】" "未配置ftp用户!" && exit
cat /etc/vsftpd.users 2> /dev/null | while read line cat ${userpath} 2> /dev/null | while read line
do do
[ ! -z "${line}" ] && del ${line} [ ! -z "${line}" ] && del ${line}
done done
@@ -50,13 +57,12 @@ set_config() {
username=`cutsh ${line} 1` username=`cutsh ${line} 1`
passwd=`cutsh ${line} 2` passwd=`cutsh ${line} 2`
ftppath=`cutsh ${line} 3` ftppath=`cutsh ${line} 3`
echo $username >> /etc/vsftpd.users echo $username >> ${userpath}
[ ! -z $username ] && add $username $passwd $ftppath [ ! -z $username ] && add $username $passwd $ftppath
done done
if [ `mbdb get ${appname}.main.anon_enable` = "1" ]; then if [ "$anon_enable" = "1" ]; then
anon_enable=YES anon_enable=YES
anon_root=`mbdb get ${appname}.main.anon_root` || anon_root=/var/ftp
[ ! -d $anon_root ] && mkdir -p $anon_root [ ! -d $anon_root ] && mkdir -p $anon_root
[ ! -d $anon_root/Share ] && mkdir -p $anon_root/Share [ ! -d $anon_root/Share ] && mkdir -p $anon_root/Share
chmod 755 $anon_root chmod 755 $anon_root
@@ -67,10 +73,9 @@ set_config() {
else else
anon_enable=NO anon_enable=NO
fi fi
port=`mbdb get ${appname}.main.ftp_port` || port=21
cp -rf ${mbroot}/apps/${appname}/config/${appname}.conf /etc/vsftpd.conf mount --bind ${mbroot}/apps/${appname}/config/${appname}.conf ${configpath}
[ ! -d /var/run/vsftpd ] && mkdir -p /var/run/vsftpd echo -e "anonymous_enable=$anon_enable\nanon_root=$anon_root\nlisten_port=${port}" >> ${configpath}
echo -e "anonymous_enable=$anon_enable\nanon_root=$anon_root\nlisten_port=${port}" >> /etc/vsftpd.conf
} }
@@ -82,16 +87,16 @@ start () {
exit 1 exit 1
fi fi
logsh "【$service】" "正在启动${appname}服务... " logsh "【$service】" "正在启动${appname}服务... "
# if [ ! -f ${mbroot}/apps/${appname}/bin/${appname} ]; then if [ ! -f ${mbroot}/apps/${appname}/bin/${appname} ]; then
# bincheck ${binname} bincheck ${binname}
# if [ $? -eq 0 ]; then if [ $? -eq 0 ]; then
# logsh "【$service】" "安装程序成功,链接程序到工具箱..." logsh "【$service】" "安装程序成功,链接程序到工具箱..."
# ln -sf $(which $binname) ${mbroot}/apps/${appname}/bin/${appname} ln -sf $(which $binname) ${mbroot}/apps/${appname}/bin/${appname}
# else else
# logsh "【$service】" "程序安装失败!" logsh "【$service】" "程序安装失败!"
# end end
# fi fi
# fi fi
# init_mount # init_mount
set_config set_config
@@ -112,11 +117,11 @@ stop () {
close_port close_port
remove_firewall_start remove_firewall_start
# 删除用户 # 删除用户
cat /etc/vsftpd.users 2> /dev/null | while read line cat ${userpath} 2> /dev/null | while read line
do do
[ ! -z "${line}" ] && del ${line} [ ! -z "${line}" ] && del ${line}
done done
rm -rf /etc/vsftpd.conf rm -rf ${configpath}
killall -9 ${appname} &> /dev/null killall -9 ${appname} &> /dev/null
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -17,7 +17,7 @@ logsh "【Tools】" "请按任意键安装工具箱(Ctrl + C 退出)."
read answer read answer
#check root #check root
# [ "$USER" != "root" ] && logsh "【Tools】" "请使用root用户安装工具箱!" && exit 1 # [ "$USER" != "root" ] && logsh "【Tools】" "请使用root用户安装工具箱!" && exit 1
mburl="https://dev.tencent.com/u/monlor/p/MIXBOX-BETA/git/raw/master" mburl="https://raw.githubusercontent.com/MIXBOX/master"
mbtmp="/tmp/mbtmp" mbtmp="/tmp/mbtmp"
[ ! -d "${mbtmp}" ] && mkdir -p ${mbtmp} [ ! -d "${mbtmp}" ] && mkdir -p ${mbtmp}
model=$(uname -ms | tr ' ' '_' | tr '[A-Z]' '[a-z]') model=$(uname -ms | tr ' ' '_' | tr '[A-Z]' '[a-z]')