大概就是这样,我举例的inbound和outbound都是用的 "ws+tls"+"tcp",根据你实际修改
- {
- "log": {
- "access": "/var/log/“v-2-r-a-y”/access.log",
- "error": "/var/log/“v-2-r-a-y”/error.log",
- "loglevel": "warning"
- },
- "dns": {
- "servers": [
- "https+local://1.1.1.1/dns-query",
- "1.1.1.1",
- "1.0.0.1",
- "8.8.8.8",
- "8.8.4.4",
- "localhost"
- ]
- },
- "inbounds": [
- { ##1号inbound,tls+ws为例
- "port":11800,
- "listen": "127.0.0.1",
- "tag": "vmess-in-1", ##1号inbound tag
- "protocol": "vmess",
- "settings": {
- "clients": [
- {
- "id":"uuidxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", ##uuid
- "alterId":0
- }
- ]
- },
- "streamSettings": {
- "network": "ws",
- "wsSettings": {
- "path": "/path/", ##反代路径
- "headers": {
- "Host": "test.test.com" ##你的站点域名
- }
- }
- }
- },
- { ##2号inbound tcp为例
- "listen": "127.0.0.1",
- "port": 8080,
- "tag": "vmess-in-2", ##2号inbound tag
- "protocol": "vmess",
- "settings": {
- "clients": [
- {
- "id": "uuidxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", ##uuid
- "alterId":0
- }
- ]
- },
- "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": [
- { ##1号解锁机outbound,以tls+ws为例,站内大佬提供的nf解锁sg区,真实可用
- "tag": "nf-1", ##1号outbound解锁机tag
- "protocol": "vmess",
- "settings": {
- "vnext": [
- {
- "address": "free-sg-01.gonetflix.xyz",
- "port": 443,
- "users": [
- {
- "id": "402d7490-6d4b-42d4-80ed-e681b0e6f1f9",
- "alterId": 0,
- "email": "[email protected]",
- "security": "auto"
- }
- ]
- }
- ]
- },
- "streamSettings": {
- "network": "ws",
- "security": "tls",
- "tlsSettings": {
- "allowInsecure": false
- },
- "wsSettings": {
- "path": "ws"
- }
- },
- "mux": {
- "enabled": true,
- "concurrency": 8
- }
- },
- { ##2号解锁机outbound,以tcp协议为例
- "tag": "nf-2", ##2号outbound解锁机tag
- "protocol": "vmess",
- "settings": {
- "vnext": [
- {
- "address": "ip地址", ## 2号机ip地址
- "port": 8080,
- "users": [
- {
- "id": "uuidxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", ##uuid
- "alterId": 0,
- "email": "[email protected]",
- "security": "auto"
- }
- ]
- }
- ]
- },
- "streamSettings": {
- "network": "tcp",
- "tcpSettings": {
- "header": {
- "type": "http",
- "request": {
- "version": "1.1",
- "method": "GET",
- "path": [
- "/"
- ],
- "headers": {
- "Host": [
- "www.microsoft.com/zh-cn"
- ],
- "User-Agent": [
- "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.75 Safari/537.36",
- "Mozilla/5.0 (iPhone; CPU iPhone OS 10_0_2 like Mac OS X) AppleWebKit/601.1 (KHTML, like Gecko) CriOS/53.0.2785.109 Mobile/14A456 Safari/601.1.46"
- ],
- "Accept-Encoding": [
- "gzip, deflate"
- ],
- "Connection": [
- "keep-alive"
- ],
- "Pragma": "no-cache"
- }
- }
- }
- }
- },
- "mux": {
- "enabled": true,
- "concurrency": 8
- }
- },
- {
- "protocol": "freedom",
- "settings": { },
- "tag": "direct"
- },
- {
- "protocol": "blackhole",
- "settings": { },
- "tag": "blocked"
- }
- ],
- "routing": {
- "domainStrategy": "IPIfNonMatch",
- "domainMatcher": "mph",
- "rules": [
- {
- "type": "field",
- "inboundTag": ["vmess-in-1,vmess-in-2"],
- "domain": ["geosite:category-ads-all"],
- "outboundTag": "blocked"
- },
- { ##分流说明: 1号inbound进,1号outbound出
- "type": "field",
- "inboundTag": ["vmess-in-1"],
- "domain": ["geosite:netflix"],
- "outboundTag": "nf-1"
- },
- { ##分流说明: 2号inbound进,2号outbound出
- "type": "field",
- "inboundTag": ["vmess-in-2"],
- "domain": ["geosite:netflix"],
- "outboundTag": "nf-2"
- },
- {
- "type": "field",
- "inboundTag": ["vmess-in-1,vmess-in-2"],
- "outboundTag": "direct"
- }
- ]
- }
- }
复制代码
|