BBR,SSR,FRP等小玩意

逆流的鱼 阅读:2205 2018-01-12 11:58:10 评论:0

最近时间非常有限,玩的东西不多。

3.jpg

1.0 BBR

Google 开源了其 TCP BBR 拥塞控制算法,并提交到了 Linux 内核,最新的 4.9 版内核已经用上了该算法。根据以往的传统,Google 总是先在自家的生产环境上线运用后,才会将代码开源,此次也不例外。
根据理论,在部署了最新版内核并开启了 TCP BBR 的机器上,网速甚至可以提升好几个数量级。

实际部署下来的使用感受,有提高,但并不是数量级的。


使用root用户登录,运行以下命令:

wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh
chmod +x bbr.sh./bbr.sh

安装完成后,脚本会提示需要重启 VPS,输入 y 并回车后重启。
重启完成后,进入 VPS,验证一下是否成功安装最新内核并开启 TCP BBR,输入以下命令:

uname -r

查看内核版本,含有 4.9 就表示 OK 了

sysctl net.ipv4.tcp_available_congestion_control

返回值一般为:
net.ipv4.tcp_available_congestion_control = bbr cubic reno

sysctl net.ipv4.tcp_congestion_control

返回值一般为:
net.ipv4.tcp_congestion_control = bbr

sysctl net.core.default_qdisc

返回值一般为:
net.core.default_qdisc = fq

lsmod | grep bbr

返回值有 tcp_bbr 模块即说明bbr已启动。


2.0 SS

不多说了,翻墙。

用root用户登录,运行以下命令:

wget --no-check-certificate -O shadowsocks-all.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh
chmod +x shadowsocks-all.sh
./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log


安装完成后,脚本提示如下

Congratulations, your_shadowsocks_version install completed!
Your Server IP        :your_server_ip
Your Server Port      :your_server_port
Your Password         :your_password
Your Encryption Method:your_encryption_method

Your QR Code: (For Shadowsocks Windows, OSX, Android and iOS clients)
 ss://your_encryption_method:your_password@your_server_ip:your_server_port


卸载方法

若已安装多个版本,则卸载时也需多次运行(每次卸载一种)

使用root用户登录,运行以下命令:

./shadowsocks-all.sh uninstall


启动脚本

启动脚本后面的参数含义,从左至右依次为:启动,停止,重启,查看状态。

Shadowsocks-Python 版:
/etc/init.d/shadowsocks-python start | stop | restart | status

ShadowsocksR 版:
/etc/init.d/shadowsocks-r start | stop | restart | status

Shadowsocks-Go 版:
/etc/init.d/shadowsocks-go start | stop | restart | status

Shadowsocks-libev 版:
/etc/init.d/shadowsocks-libev start | stop | restart | status


3.0 FRP

frp 是一个高性能的反向代理应用,可以帮助您轻松地进行内网穿透,对外网提供服务,支持 tcp, http, https 等协议类型,并且 web 服务支持根据域名进行路由转发。

一、安装命令

  1. wget --no-check-certificate https://raw.githubusercontent.com/clangcn/onekey-install-shell/master/frps/install-frps.sh -O ./install-frps.sh

  2. chmod 700 ./install-frps.sh

  3. ./install-frps.sh install


二、更新命令

  1. ./install-frps.sh update

复制代码



三、卸载命令

  1. ./install-frps.sh uninstall

复制代码



四、服务器端管理命令

  1. /etc/init.d/frps start

  2. /etc/init.d/frps stop

  3. /etc/init.d/frps restart

  4. /etc/init.d/frps status

  5. /etc/init.d/frps config

  6. /etc/init.d/frps version


声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

发表评论