V2Ray官方脚本科學上網最佳配置三件套nginx+ws+tls+mKCP,兼具速度&穩定&安全2019.12.24指令小結

安裝環境
VPS平臺digitalocean
操作系統debian10.2

一、新建VPS並做好cloudflare解析(略)

二、常用軟件包

#apt-get -y update && apt-get -y install unzip zip wget curl  nano sudo ufw socat ntp ntpdate gcc git

三、BBR加速
修改系统变量
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf
echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf
保存生效
sysctl -p
查看内核是否已开启BBR

#lsmod | grep bbr
返回值有 tcp_bbr 模块即说明 bbr 已启动

四、安裝NGINX和僞裝站點
#apt install -y nginx

#systemctl stop nginx

安装伪站
#wget https://github.com/mikewubox/mikewubox.github.io/archive/master.zip

#unzip master.zip

#cp -rf mikewubox.github.io-master/* /var/www/html

五、安裝V2Ray
#bash <(curl -Ls https://install.direct/go.sh)

六、安裝TLS證書
#curl  https://get.acme.sh | sh

安装成功后执行
source ~/.bashrc
以确保脚本所设置的命令别名生效。

生成ECC证书:
#sudo ~/.acme.sh/acme.sh --issue -d ZZZ007.ml --standalone -k ec-256

将ECC证书和密钥安装到 /etc/v2ray 中
#sudo ~/.acme.sh/acme.sh --installcert -d ZZZ007.ml --fullchainpath /etc/v2ray/v2ray.crt --keypath /etc/v2ray/v2ray.key --ecc


七、配置NGINX和V2Ray
nginx配置文件
#nano  /etc/nginx/conf.d/v2ray.conf

V2ray配置文件
#nano  /etc/v2ray/config.json

相關參考見https://github.com/mikewubox/V2Ray3/tree/master/nginx%2Bws%2Btls%2Bmkcp

八、啓動
啓動NGINX
#systemctl enable nginx
#systemctl start nginx
#systemctl status nginx

啓動V2Ray
#systemctl enable v2ray
#systemctl start v2ray
#systemctl status v2ray

九、云防火墻
開啓常用端口(開22端口TCP,80端口TCP,443端口TCP,53端口TCP,UDP)
開啓V2ray端口UDP,mKCP

评论

  1. freessl.cn申请域名可以用一年,为什么还用三个月已申请的证书,
    您的伪站这样我感觉不好用,有时抽风,为什么不转接到一个网址那.

    server {
    listen 443 ssl;
    server_name www.zzz007.ml zzz007.ml;
    ssl_certificate /etc/v2ray/zzz007.ml_chain.crt;
    ssl_certificate_key /etc/v2ray/zzz007.ml_key.key;

    location /1d334713-b88f-4c4e-a4f5-0d1eba52fed5/ {
    proxy_redirect off;
    proxy_pass http://127.0.0.1:15174;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_set_header Host $http_host;
    }
    }
    server {
    listen 80;
    server_name www.zzz007.ml zzz007.ml;
    return 301 https://hao.360.com$request_uri;
    }

    回复删除

发表评论

此博客中的热门博文

搭建v2ray服务器双剑合一科学上网相关命令小结参考

V2ray基于Nginx的神器WS+TLS+伪装网站+CDN相关指令小结

新版Trojan官方脚本手動純净安裝科學上網服務器,配置TLS1.3+NGINX+偽站2019.12.29指令小結