V2fly|V2ray+CDN+Nginx+wS+TLS+宝塔共存节点构建

工具准备
域名1个;VPS一台;cloudflare帐号一个;系统镜像CENTOS7+

1:BT安装

1
yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh

2:登陆宝塔安装Nginx

3:添加网站;添加域名;申请SSL证书
在「设置」——「配置文件」选项,在ssl最后一个}前添加如下代码:

1
2
3
4
5
6
7
8
location /ray {   
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:V2Ray端口须与V2ray配置文件一致;
}

4:安装V2ray
V2Fly项目地址

1
2
3
4
5
6
yum makecache
yum install curl
curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh
curl -O https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-dat-release.sh
bash install-release.sh
bash install-dat-release.sh

5:编辑V2ray配置文件
cd /usr/local/etc/v2ray
创建配置文件
vi config.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{
"inbounds": [{
"port": 1688,
"listen":"127.0.0.1",
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "a038c874-f959-4c3b-94e3-a276ce2acf50",
"level": 1,
"alterId": 64
}
]
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/ray"
}
}
}],
"outbounds": [{
"protocol": "freedom",
"settings": {}
},{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}],
"routing": {
"rules": [
{
"type": "field",
"ip": ["geoip:private"],
"outboundTag": "blocked"
}
]
}
}

V2ray管理命令

1
2
3
4
5
systemctl enable v2ray
service v2ray start #启动 V2Ray
service v2ray stop #停止运行 V2Ray
service v2ray restart #重启 V2Ray
service v2ray status #查看 V2Ray 状态

END

TG交流群

支付宝收款签约

年付81元G口VPS

SiemensTutorials

VTURAY网络加速

亚马逊测评资源网|

美国住宅动态