上次有人提起v2ray免流配置,今天就说说吧。
先安装v2ray:
bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
服务端免流配置,可以选择tcp配置或者ws配置,二选一
vi /usr/local/etc/v2ray/config.json
1、tcp配置文件如下:
{
"inbounds": [
{
"port": 80,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "uuid"
}
]
},
"streamSettings": {
"network": "tcp",
"tcpSettings": {
"header": {
"type": "http",
"response": {
"version": "1.1",
"status": "200",
"reason": "OK",
"headers": {
"Content-Type": ["application/octet-stream", "video/mpeg"],
"Transfer-Encoding": ["chunked"],
"Connection": ["keep-alive"],
"Pragma": "no-cache"
}
}
}
}
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
2、ws配置如下:
{
"inbounds": [
{
"port": 8080,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "uuid"
}
]
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/posts/wss_ray.html"
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {}
}
]
}
3、客户端配置
地址:服务端IP或域名
端口:80 这里必须要80或8080端口,同服务端
加密方式:aes-128-gcm
传输协议:tcp或者ws协议
伪装类型:http
伪装网址:这里填写各isp商免流链接,联通,移动等