• 折腾
  • 一键脚本安装V2Ray+WebSocket+TLS+Nginx

一、BBR一键安装:

1、BBR一键安装代码:
wget --no-check-certificate https://raw.githubusercontent.com/cx9208/Linux-NetSpeed/master/tcp.sh && chmod +x tcp.sh && ./tcp.sh

>>>若报错运行以下代码,不报错跳过:
debian 或 ubuntu : sudo apt-get install wget
centos :
yum -y install wget
rm -f /var/run/yum.pid

3、重新打开脚本,查看是否运行成功:
./tcp.sh

二、一键脚本安装V2Ray+WebSocket+TLS+Nginx

两个安装方式(不兼容,二选一)推荐2

1.Vmess+websocket+TLS+Nginx+Website:
bash <(curl -L -s https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install.sh) | tee v2ray_ins.log

2.Vmess + HTTP2 over TLS:
bash <(curl -L -s https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install_h2.sh) | tee v2ray_ins_h2.log

如果提示 curl: command not found ,那是因为你的小鸡没装 Curl
ubuntu/debian 系统安装 Curl 方法: apt-get update -y && apt-get install curl -y
centos 系统安装 Curl 方法: yum update -y && yum install curl -y
安装好 curl 之后就能安装脚本了

三、脚本启动方式

启动 V2ray:systemctl start v2ray

停止 V2ray:systemctl stop v2ray

启动 Nginx:systemctl start nginx

停止 Nginx:systemctl stop nginx

四、脚本相关目录

Web 目录:/home/wwwroot/levis

V2ray 服务端配置:/etc/v2ray/config.json

V2ray 客户端配置: 执行安装时所在目录下的 v2ray_info.txt

Nginx 目录: /etc/nginx

证书目录: /data/v2ray.key 和 /data/v2ray.crt

/etc/v2ray/config.json
{
  "log": {
        "access": "/var/log/v2ray/access.log",
        "error": "/var/log/v2ray/error.log",
        "loglevel": "warning"
    },
  "inbounds": [
    {
    "port":15707,
      "listen": "127.0.0.1",
      "tag": "vmess-in",
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
          "id":"8c42eea4-2227-46c8-a5ef-17c1e7b7e916",
          "alterId":2
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
          "path":"/f595fd8d/"
        }
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": { },
      "tag": "direct"
    "port":15707,
      "listen": "127.0.0.1",
      "tag": "vmess-in",
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
          "id":"8c42eea4-2227-46c8-a5ef-17c1e7b7e916",
          "alterId":2
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
          "path":"/f595fd8d/"
        }
      }
    }
  ],
  "outbounds": [
    {
      "protocol": "freedom",
      "settings": { },
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": { },
      "tag": "blocked"
    }
  ],
  "dns": {
    "servers": [
      "https+local://1.1.1.1/dns-query",
          "1.1.1.1",
          "1.0.0.1",
          "8.8.8.8",
          "8.8.4.4",
          "localhost"
    ]
  },
  "routing": {
    "domainStrategy": "AsIs",
    "rules": [
      {
        "type": "field",
        "inboundTag": [
          "vmess-in"
        ],
        "outboundTag": "direct"
      }
    ]
  }
}
/etc/nginx/conf/conf.d# vi v2ray.conf

    server {
        listen 443 ssl http2;
        ssl_certificate       /data/v2ray.crt;
        ssl_certificate_key   /data/v2ray.key;
        ssl_protocols         TLSv1.2 TLSv1.3;
        ssl_ciphers           TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+ECDSA+AES128:EECDH+aRSA+AES128:RSA+AES128:EECDH+ECDSA+AES256:EECDH+aRSA+AES256:RSA+AES256:EECDH+ECDSA+3DES:EECDH+aRSA+3DES:RSA+3DES:!MD5;
        server_name zzz.tssz.ga;
        index index.html index.htm;
        root  /home/wwwroot/3DCEList;
        error_page 400 = /400.html;
        location /f595fd8d/
        {
        proxy_redirect off;
        proxy_pass http://127.0.0.1:15707;
        proxy_http_version 1.1;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $http_host;
        }
}
    server {
        listen 80;
        server_name zzz.tssz.ga;
        return 301 https://zzz.tssz.ga$request_uri;
    }