宝塔 v2ray 腾讯云cdn 联通免流
说明:和套cf一样,只不过这次套的是腾讯云cdn,每个月有免费的10g,新用户注册送50g连送6个月。由于要套腾讯云cdn,所以域名要求是备案过的。
联通适用
宝塔面板添加网站
1.输入自己的网址,ftp、数据库、php都不用
2.申请ssl
点击「设置」——SSL——Let’s Encrypt,成功申请SSL后,保存
3.更改 配置文件
再次点击站点「设置」的「配置文件」选项,在最后一个}前添加如下代码:
location / {
proxy_redirect off;
proxy_pass http://127.0.0.1:25534;#25534是v2ray的端口号,注意和之后安装的一致
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $http_host;
}4.面板首页重启Nignx
安装v2ray
1.安装命令bash <(curl -L -s https://install.direct/go.sh)
2.修改v2ray配置文件,路径/etc/v2ray/config.json,修改后记得重启v2ray
参考配置:
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": 25534,#自己的端口号需要对应
"protocol": "vmess",
"settings": {
"udp": true,
"clients": [
{
"id": "e5cee2d4-d28b-4b8a-83ef-cf788bf1****",#自己的id
"level": 1,
"alterId": 233
}
]
},
"streamSettings": {
"network": "ws"
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}3.重启V2Rayservice v2ray restart
腾讯云cdn设置
1.添加域名 https://console.cloud.tencent.com/cdn/access
2.源站填写IP,需要注意的是:加速类型选择流媒体点播加速
3.https配置
高级配置,添加Https。
ssl证书直接从之前的宝塔面板复制过来,腾讯云的‘证书内容’对应宝塔的‘证书(PEM格式)’注意复制过来之后中间有一行空格需要手动删除;腾讯云的‘私钥内容’对应宝塔的‘密钥(KEY)’
回源记得选择协议跟随
4.访问控制-把过滤参数关闭
缓存配置-全部改成0
回源设置-关闭Range回源
域名解析
在自己的域名解析服务商添加‘CNAME’记录
使用
开全局模式
参考:
https://sumrday.net/exp/lt-xyml.html
https://jdbblog.top/84.html

