参考链接:
宝塔+V2RAY+WS+TLS, 充分利用VPS性能,富强与网站共存
宝塔面板+V2RAY,博客与V2RAY+Nginx+Ws+Tls共存
用宝塔面板实现WordPress+V2ray+ws+tls,网站和V2ray共存
宝塔面板+V2RAY,博客与V2RAY+Nginx+Ws+Tls共存
1)先安装宝塔面板,并添加网站,配置ssl,强制开启https;
2)安装v2ray,自动配置tsl选择N,否则会和宝塔有冲突,安装完成后编辑v2ray配置文件。
vi /etc/v2ray/config.json
删除当前所有内容,粘贴下面的内容:
- {
- "inbounds": [{
- "port": 65432, //此处为安装时生成的端口
- "listen":"127.0.0.1",
- "protocol": "vmess",
- "settings": {
- "clients": [
- {
- "id": "xxxxxxxxx", //此处为安装时生成的id
- "level": 1,
- "alterId": 64 //此处为安装时生成的alterId
- }
- ]
- },
- "streamSettings": {
- "network": "ws",
- "wsSettings": {
- "path": "/blog" //此处为路径,需要和下面NGINX上面的路径配置一样
- }
- }
- }],
- "outbounds": [{
- "protocol": "freedom",
- "settings": {}
- },{
- "protocol": "blackhole",
- "settings": {},
- "tag": "blocked"
- }],
- "routing": {
- "rules": [
- {
- "type": "field",
- "ip": ["geoip:private"],
- "outboundTag": "blocked"
- }
- ]
- }
- }
评论
发表评论