diff --git a/plugins/bbr/ico.png b/plugins/bbr/ico.png new file mode 100644 index 000000000..727041fcc Binary files /dev/null and b/plugins/bbr/ico.png differ diff --git a/plugins/bbr/index.html b/plugins/bbr/index.html new file mode 100755 index 000000000..a53f8768e --- /dev/null +++ b/plugins/bbr/index.html @@ -0,0 +1,9 @@ + \ No newline at end of file diff --git a/plugins/bbr/index.py b/plugins/bbr/index.py new file mode 100755 index 000000000..9780ba8c3 --- /dev/null +++ b/plugins/bbr/index.py @@ -0,0 +1,20 @@ +# coding: utf-8 + +import time +import random +import os +import json +import re +import sys + +sys.path.append(os.getcwd() + "/class/core") +import public + + +def status(): + return 'start' + +if __name__ == "__main__": + func = sys.argv[1] + if func == 'status': + print status() diff --git a/plugins/bbr/info.json b/plugins/bbr/info.json new file mode 100755 index 000000000..139e75cce --- /dev/null +++ b/plugins/bbr/info.json @@ -0,0 +1,15 @@ +{ + "id":4, + "title":"BBR[DEV]", + "tip":"soft", + "name":"bbr", + "type":"软件", + "ps":"BBR是Google提出的一种新型拥塞控制算法,可以使Linux服务器显著地提高吞吐量和减少TCP连接的延迟", + "versions":"1.0", + "shell":"install.sh", + "checks":"server/bbr", + "author":"Google", + "home":"https://github.com/google/bbr", + "date":"2019-03-29", + "pid":"4" +} \ No newline at end of file diff --git a/plugins/bbr/install.sh b/plugins/bbr/install.sh new file mode 100755 index 000000000..9de7c64cd --- /dev/null +++ b/plugins/bbr/install.sh @@ -0,0 +1,34 @@ +#!/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin +export PATH + + +curPath=`pwd` +rootPath=$(dirname "$curPath") +rootPath=$(dirname "$rootPath") +serverPath=$(dirname "$rootPath") + +install_tmp=${rootPath}/tmp/mw_install.pl + +Install_bbr() +{ + echo '正在安装脚本文件...' > $install_tmp + + + mkdir -p $serverPath/bbr + echo '1.0' > $serverPath/bbr/version.pl + echo '安装完成' > $install_tmp +} + +Uninstall_bbr() +{ + rm -rf $serverPath/bbr + echo "卸载完成" > $install_tmp +} + +action=$1 +if [ "${1}" == 'install' ];then + Install_bbr +else + Uninstall_bbr +fi diff --git a/plugins/bbr/js/bbr.js b/plugins/bbr/js/bbr.js new file mode 100755 index 000000000..e69de29bb