简单记录一下openlitespeed + cf + v(3-1)ray

首先安装v(3-1)ray,直接用命令行下载官方的脚本,执行之就可以。
wget https://install.direct/go.sh
sudo bash go.sh
PS:需要有unzip。

下载安装openlitespeed,具体安装方法找一下博客之前的记录。

弄一个域名套上cloudflare,并将源站指向openlitespeed的站点。

进openlitespeed的后台,做如下图的设置(具体:虚拟主机-网络套接字代理)

然后修改/etc/v2ray/config.json
参考代码如下:
{
“inbounds”: [{
“port”: 17400,
“listen”: “localhost”,
“protocol”: “vmess”,
“settings”: {
“clients”: [
{
“id”: “7029741d-b5ed-4f5e-8db2-123”,//你的uuid,客户端也要用。
“level”: 1,
“alterId”: 64
}
]
},
“streamSettings”: {
“network”: “ws”,
“wsSettings”: {
“path”: “/china”//openlitespeed里也有。
}
}
}],
“outbounds”: [{
“tag”: “direct”,
“protocol”: “freedom”
}]
}

客户端的配置也类似,发一段备查:

{
“log”: {
“loglevel”: “warning”
},
“inbounds”: [{
“port”: 1080,
“listen”: “127.0.0.1”,
“tag”: “socks-inbound”,
“protocol”: “socks”,
“settings”: {
“auth”: “noauth”,
“udp”: false
},
“sniffing”: {
“enabled”: true,
“destOverride”: [“http”, “tls”]
}
}],
“outbounds”: [{
“protocol”: “vmess”,
“settings”: {
“vnext”: [{
“address”: “你的域名”,
“port”: 443,
“users”: [{
“id”: “7029741d-b5ed-4f5e-8db2-123”,
“alterId”: 64
}]
}]
},
“streamSettings”: {
“network”: “ws”,
“security”: “tls”,
“wsSettings”: {
“path”: “/china”
}
}
}],
“routing”: {
“domainStrategy”: “IPOnDemand”,
“rules”: [{
“type”: “field”,
“ip”: [“geoip:private”],
“outboundTag”: “blocked”
},
{
“type”: “field”,
“domain”: [“geosite:category-ads”],
“outboundTag”: “blocked”
}
]
},

“dns”: {
“servers”: [
“1.1.1.1”,
{
“address”: “114.114.114.114”,
“port”: 53,
“domains”: [
“geosite:cn”
]
},
“8.8.8.8”,
“localhost”
]
},

“policy”: {
“levels”: {
“0”: {
“uplinkOnly”: 0,
“downlinkOnly”: 0
}
},
“system”: {
“statsInboundUplink”: false,
“statsInboundDownlink”: false
}
},
“other”: {}
}