V2RY
BT面板:
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh ed8484bec
安装SSL强制HTTPS
网站配置加入:
location /2012 {
proxy_redirect off;
proxy_pass http://127.0.0.1:2012;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
# Show real IP in v2ray access.log
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
开始安装:
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
然后解决报错
systemctl start v2ray
systemctl enable v2ray
sed -i "s/v2ray -config/v2ray run -config/g" /etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf
systemctl daemon-reload
systemctl restart v2ray
systemctl status v2ray
编辑配置:
vi /usr/local/etc/v2ray/config.json
{
"log": {
"loglevel": "info",
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log"
},
"inbounds": [
{
"port": 2012,
"listen":"127.0.0.1",
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "a32c5638-0be9-42b7-8ce6-09ae6c32dd49",
"alterId": 32
}
]
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/2012"
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
安装BBR
原文地址:
https://www.vultr.com/zh/docs/how-to-deploy-google-bbr-on-centos-7/
代码:
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
sudo yum --enablerepo=elrepo-kernel install kernel-ml -y
rpm -qa | grep kernel
如果成果能看到5.19版本核心
查看排序:sudo egrep ^menuentry /etc/grub2.cfg | cut -f 2 -d \'
# 若出现 “grep: /etc/grub2.cfg: No such file or directory” 的错误, # 运行以下命令解决:
grub2-mkconfig -o /boot/grub2/grub.cfg # 再次运行刚才的命令
如果排第一 设置5.19启动顺序是0还是1,重启:
sudo grub2-set-default 0
sudo shutdown -r now
重启后查看是否成功
uname -r
配置BBR
echo 'net.core.default_qdisc=fq' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv4.tcp_congestion_control=bbr' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
确认是否成功
lsmod | grep bbr
防火墙
firewall-cmd --zone=public --add-port=2012/tcp --permanent
firewall-cmd --reload
升级
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh)
移除
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh) --remove