From ca9c456fd70c558042c77cb7fcb8ef6d7e7f9dfe Mon Sep 17 00:00:00 2001 From: midoks Date: Fri, 29 Mar 2019 01:02:58 +0800 Subject: [PATCH] BBR[DEV] --- plugins/bbr/ico.png | Bin 0 -> 777 bytes plugins/bbr/index.html | 9 +++++++++ plugins/bbr/index.py | 20 ++++++++++++++++++++ plugins/bbr/info.json | 15 +++++++++++++++ plugins/bbr/install.sh | 34 ++++++++++++++++++++++++++++++++++ plugins/bbr/js/bbr.js | 0 6 files changed, 78 insertions(+) create mode 100644 plugins/bbr/ico.png create mode 100755 plugins/bbr/index.html create mode 100755 plugins/bbr/index.py create mode 100755 plugins/bbr/info.json create mode 100755 plugins/bbr/install.sh create mode 100755 plugins/bbr/js/bbr.js diff --git a/plugins/bbr/ico.png b/plugins/bbr/ico.png new file mode 100644 index 0000000000000000000000000000000000000000..727041fcc255bae532c79d754ddac538e64a33d6 GIT binary patch literal 777 zcmV+k1NQuhP)kI$PMmxApL4Ie;7rcmdwqL<>s#OY_vsyzu@Lv; zN?eYA@f!}|1H6wvx~1vsvM?2^u@vKKPm&zQ7-apD`u{Jyffw*=XTBzYd+|2L<11{! zCpg-1_%hsu<+vWF@en?2-`5H76xQQUJc%v16#=~&XD}9j*K0nl%RGu#F%eH=LkpxG zU_L&=FLkqj@Mb;xbtKtP9Sq2|Na9&ogxjzNS5)1SOA8>+P0@0*8*ot-ZyCNEK?pb1 zD_$uozo|N16*05`-og?*j6L`mdC`#(l4m)!+K3x553{iiTk%K$rWc?4F%!E>5us!> zk()mPa4{l;R-_378md#jp#VfVX{g98of@E# zBE7M*_8#ll{8QOV#4-?oG*wUouot)V$li}r_!{qEWy9X@t4IC^i2lw2?2fXcj?^oZNV#)l<^y2v zxsJ>haEAJGc)Vlir+E?=H1yl)h#c>0_-x5*B8teg=V!}*J}stLHR#KA00000NkvXX Hu0mjfmpEvB literal 0 HcmV?d00001 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