加速

显示标签为“加速”的博文。显示所有博文
显示标签为“加速”的博文。显示所有博文

2018年12月25日星期二

Linux TCP加速四合一安装脚本



这个脚本,集合了BBR原版、BBR魔改、BBR Plus和锐速,愿用哪个用哪个,只能说:太方便了!

在vultr上Centos 7, Debian 8/9, Ubuntu 16/18测试通过。不支持OVZ和LXC。

建议SSH下,root用户。



安装步骤


安装证书



apt-get -y install ca-certificates

yum -y install ca-certificates

安装



wget "https://github.com/chiakge/Linux-NetSpeed/raw/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

先在[1 – 3]切换内核(第一次显示为bbr内核也要切换一遍),重启



出现这个选no



重启后不用再下载脚本,直接 ./tcp.sh ,在[4 – 8]中选你要开的加速


“1. 安装 BBR/BBR魔改版内核” 对应4,5,6(原版,魔改,暴力魔改)
“2. 安装 BBRplus版内核 ” 对应7(plus)
“3. 安装 Lotserver(锐速)内核” 对应8(锐速)

开启后再 ./tcp.sh , 显示开启成功则启动成功,你也可以自己手动确认

现在你可以自由的切换你想要的加速,直到你不想折腾为止~

相关链接



Github:Linux-NetSpeed

2016年5月13日星期五

使用haproxy实现shadowsocks 国内中转加速


由于晚上高峰时段,电信国际出口缓慢;

为了加快速度,根据shadowsocks的github页面的介绍,使用haproxy对ss做中转。

环境为阿里云ECS ,debian7.5

先添加apt源
vi  /etc/apt/sources.list

然后添加源
deb http://ftp.us.debian.org/debian/ wheezy-backports main

保存后
apt-get update

然后安装haproxy
apt-get install haproxy

centos下请先yum update -y再yum install haproxy -y

编辑haproxy配置文件
vi /etc/haproxy/haproxy.cfg

清空后像下面一样写入配置
global
ulimit-n  51200

defaults
log global
mode    tcp
option  dontlognull
timeout connect 1000ms
timeout client 150000ms
timeout server 150000ms

frontend 110-in
bind *:110
default_backend 110-out

frontend 109-in
bind *:109
default_backend 109-out
frontend 110-in-jp
bind *:1110
default_backend 110-out-jp
backend 110-out
server server1 spg.xx.xx:110 maxconn 20480

backend 109-out
server server1 spg.xx.xx:109 maxconn 20480

backend 110-out-jp
server server1 jp.xx.xx:110 maxconn 20480

 

可以配置多端口。

frontend的端口为要在中转服务器上用的端口

backend的端口是源服务器的ip和端口

每个端口的“frontend” 要对应一个“backend”

文件写的时候要记得一一对应。

运行命令:
haproxy -f /etc/haproxy/haproxy.cfg

我用的阿里云做的中转,速度明显提升。

不过阿里云的流量是真贵。