跳至主要内容

搬瓦工OpenVZ安装BBR+SSR

首先你要有个搬瓦工的VPS.......(废话了),其次还要是OpneVZ的内核.(又一次废话)

如图.

第一步,安装Centos7 以上版本.记住一定要Centos7 以上版本不然装不了BBR

第二部,安装SSR和修改配置

 

谷歌TCP-BBR加速你的搬瓦工OpenVZ

之前网上有通过UML来使OpenVZ用上TCP-BBR的教程,但是UML还是存在不少问题,这边参考了知名博主91yun的openVZ下的BBR一键安装包。简单的说 LKL 相比 uml 有着一定程度上的优化,但是据网友的反馈, LKL的加速效果达不到UML的水平,这边爱鱼客也尚未进行测试,所以喜欢倒腾的同学可以自己搭建了试试看。

再次声明,OpenVZ环境下不建议使用TCP-BBR加速,OpenVZ下强行安装TCP-BBR可能造成问题。建议使用新机器安装测试TCP-BBR,这样也不至于生产环境下出现严重问题无法恢复。如果先要快速的KVM服务器推荐或者梯子服务,都可以联系我。

至此,你的搬瓦工也能用上谷歌的bbr了,是不是很开心呀,不过安装还是有一些要求:

  1. LKL 要求 ldd 的版本在 2.14以上 ,64位系统,建议安装 CentOS7 , Debian8 或 Ubuntu16;
  2. 默认的端口转发只转发了 9000-9999 的端口,如需修改请参照下面教程;
  3. 只适用 OpenVZ 虚拟化主机 .

OpenVZ下安装TCP-BBR一键安装包命令

wget --no-check-certificate https://github.com/91yun/uml/raw/master/lkl/install.sh && bash install.sh

修改转发端口

  1. 修改 /root/lkl/run.sh,查找 9000-9999 ,改成你想要的端口;
  2. 修改 /root/lkl/haproxy.cfg,查找 9000-9999 ,改成你想要的端口;
  3. 重启 VPS

要卸载TCP-BBR的唯一办法就是重装内核或重装系统,所以没有在新机器中测试成功之前不建议在生成环境中使用!

 

 

评论

此博客中的热门博文

阿里云通过Nginx中转Linode/digitalocean/AWS的V2ray协议,实现负载均衡

开篇文的废话.原因是Sandy做站服务器太多了,发现利用率不高,皮又痒了又想折腾了.v2ray是利器但是给人的感觉就是只能用一台服务器,官方也说不支持负载均衡,不会A服务器挂机,自动跳转到B服务器.这里就有点折磨人了.每个服务器挂了都要自己去改配置文件. 我们访问国外的服务器,如果没CN2的线路是非常慢的,起码不快!哈哈~现在VPS都便宜起码人手一个人有5台以上吧?这样的话我们就可以开整. 开整条件:国内VPS或者阿里云有CN2线路的机器最好是100MB-200MB的带宽的.保证你爽歪歪.但是Sandy在阿里云HK30MB下也测试了也可以达到30000KB以上,羡慕吧~我们可以开始了! 老规则工具先出: 没被gwf和谐的服务器1台(下文统称:主服务器) 国外服务器2台以上(下文统称:从服务器) nginx 1.9.5版本以上(推荐:lnmp1.4) v2ray croe 第一步: 在 主服务器 安装lnmp1.4,这里就不细说教程了.直接去 官方 看教程 安装完毕以后我们来升级Nginx让他支持stream模块 cd lnmp1.4 vi lnmp.conf 在Nginx_Modules_Options=‘’里面加入--with-stream Nginx_Modules_Options='--with-stream’ 然后执行升级命令 ./upgrade.sh nginx  第二步 修改nginx.conf文件 cd /usr/local/nginx/conf/nginx.conf 在 events { use epoll; worker_connections 51200; multi_accept on; } 下面加入 stream{ server{ listen 0.0.0.0:8080; proxy_pass v2ray_backend; proxy_timeout 10m; proxy_connect_timeout 5000ms; } upstream v2ray_backend{ server ...

利用haproxy来做V2RAY负载均衡

Sandy在之前有说过 阿里云通过Nginx中转Linode/digitalocean/AWS的V2ray协议,实现负载均衡 ,有些学童不想折腾nginx,那么我们可以用haproxy来折腾,不管是haproxy还是Nginx都可以在树莓派和局域网的PC机器折腾! 安装haproxy的教程就移步到-> haproxy安装教程 apt-get install haproxy 安装完毕,我们来修改haproxy的配置 vi /etc/haproxy/haproxy.cfg 里面内容全部删除,加入下面的内容 global ulimit-n 51200 log /dev/log local0 log /dev/log local1 notice chroot /var/lib/haproxy pidfile /var/run/haproxy.pid user haproxy group haproxy daemon defaults log global mode tcp retries 3 option dontlognull option redispatch #上游TCP服务器连接等待时间 timeout connect 5s timeout client 24h timeout server 24h #以下为Web管理页面设置,如不需要可以删除 listen admin_stats bind 0.0.0.0:8888 mode http log 127.0.0.1 local0 err stats refresh 30s stats uri /haproxy stats realm welcome login\ Haproxy stats auth admin:admin stats hide-version stat...

ssh over socks5:通过socks5 proxy来连接ssh服务器[转载]

最近因为不可描述的原因,我在aws soul的云主机访问不了,ssh、80、ss全部都被禁掉了。 80端口在chrome配置SwitchyOmega就可以了,但ssh不太好办,shell上配置http_proxy对ssh没什么用。 其实ssh自己就支持proxy。 注意这跟在ssh端口转发:远程和本地中介绍过使用ssh作为proxy的方法不同,ssh -D是为了用ssh做proxy,而不是通过proxy来连接ssh服务器。 TL;DR ssh -o ProxyCommand='nc -x 192.0.2.0:1080 %h %p' user@awshost 原理解析 $ man ssh_config ProxyCommand Specifies the command to use to connect to the server. The command string extends to the end of the line, and is executed using the user's shell ‘exec’ directive to avoid a lingering shell process. In the command string, any occurrence of ‘%h’ will be substituted by the host name to connect, ‘%p’ by the port, and ‘%r’ by the remote user name. The command can be basically anything, and should read from its standard input and write to its standard output. It should eventually connect an sshd(8) server running on some machine, or execute sshd -i somewhere. Host key management will be done using the HostName of the host being connected (defa...