Update config examples

This commit is contained in:
loyalsoldier 2021-04-20 16:46:15 +08:00
parent 2af1272d91
commit 6961566065
No known key found for this signature in database
GPG Key ID: 23829BBC1ACF2C90

126
README.md
View File

@ -168,9 +168,7 @@ steamstatic.com.8686c.com @cn
{ {
"type": "field", "type": "field",
"outboundTag": "Reject", "outboundTag": "Reject",
"domain": [ "domain": ["geosite:category-ads-all"]
"geosite:category-ads-all"
]
}, },
{ {
"type": "field", "type": "field",
@ -186,21 +184,17 @@ steamstatic.com.8686c.com @cn
{ {
"type": "field", "type": "field",
"outboundTag": "Proxy", "outboundTag": "Proxy",
"domain": [ "domain": ["geosite:geolocation-!cn"]
"geosite:geolocation-!cn"
]
}, },
{ {
"type": "field", "type": "field",
"outboundTag": "Direct", "outboundTag": "Direct",
"domain": [ "domain": ["geosite:cn"]
"geosite:cn"
]
}, },
{ {
"type": "field", "type": "field",
"outboundTag": "Proxy", "outboundTag": "Proxy",
"network": "tcp,udp" "network": "tcp,udp"
} }
] ]
} }
@ -214,30 +208,22 @@ steamstatic.com.8686c.com @cn
{ {
"type": "field", "type": "field",
"outboundTag": "Reject", "outboundTag": "Reject",
"domain": [ "domain": ["geosite:category-ads-all"]
"geosite:category-ads-all"
]
}, },
{ {
"type": "field", "type": "field",
"outboundTag": "Proxy", "outboundTag": "Proxy",
"domain": [ "domain": ["geosite:tld-!cn", "geosite:gfw", "geosite:greatfire"]
"geosite:tld-!cn",
"geosite:gfw",
"geosite:greatfire"
]
}, },
{ {
"type": "field", "type": "field",
"outboundTag": "Proxy", "outboundTag": "Proxy",
"ip": [ "ip": ["geoip:telegram"]
"geoip:telegram"
]
}, },
{ {
"type": "field", "type": "field",
"outboundTag": "Direct", "outboundTag": "Direct",
"network": "tcp,udp" "network": "tcp,udp"
} }
] ]
} }
@ -247,26 +233,30 @@ steamstatic.com.8686c.com @cn
```json ```json
"dns": { "dns": {
"hosts": {
"dns.google": "8.8.8.8",
"dns.pub": "119.29.29.29",
"dns.alidns.com": "223.5.5.5",
"geosite:category-ads-all": "127.0.0.1"
},
"servers": [ "servers": [
{
"address": "https://1.1.1.1/dns-query",
"domains": ["geosite:geolocation-!cn"],
"expectIPs": ["geoip:!cn"]
},
"8.8.8.8",
{ {
"address": "114.114.114.114", "address": "114.114.114.114",
"port": 53, "port": 53,
"domains": [ "domains": ["geosite:cn", "geosite:category-games@cn"],
"geosite:cn", "expectIPs": ["geoip:cn"],
"geosite:category-games@cn" "skipFallback": true
],
"expectIPs": [
"geoip:cn"
]
}, },
{ {
"address": "https://1.1.1.1/dns-query", "address": "localhost",
"domains": [ "skipFallback": true
"geosite:geolocation-!cn" }
]
},
"https+local://223.5.5.5/dns-query",
"119.29.29.29"
] ]
} }
``` ```
@ -275,9 +265,9 @@ steamstatic.com.8686c.com @cn
注意事项: 注意事项:
- 由于下面客户端配置使用了 DoH (DNS over HTTPS) 功能,所以必须使用 v4.22.0 或更新版本的 [V2Ray](https://github.com/v2fly/v2ray-core/releases) - 由于下面客户端配置的 DNS 使用了 `skipFallback` 选项,所以必须使用 v4.37.2 或更新版本的 [V2Ray](https://github.com/v2fly/v2ray-core/releases)
- 下面客户端配置使 V2Ray 在本机开启 SOCKS 代理(监听 1080 端口)和 HTTP 代理(监听 2080 端口),允许局域网内其他设备连接并使用代理 - 下面客户端配置使 V2Ray 在本机开启 SOCKS 代理(监听 1080 端口)和 HTTP 代理(监听 2080 端口),允许局域网内其他设备连接并使用代理
- BT 流量统统直连(实测依然会有部分 BT 流量走代理,尚不清楚是不是 V2Ray 的 bug。如果服务商禁止 BT 下载的话,请不要为下载软件设置代理) - BT 流量统统直连(实测依然会有部分 BT 流量走代理,如果服务商禁止 BT 下载,请不要为下载软件设置代理)
- 最后,不命中任何路由规则的请求和流量,统统走代理 - 最后,不命中任何路由规则的请求和流量,统统走代理
- `outbounds` 里的第一个大括号内的配置,即为 V2Ray 代理服务的配置。请根据自身需求进行修改,并参照 V2Ray 官网配置文档中的 [配置 > Outbounds > OutboundObject](https://www.v2fly.org/config/outbounds.html#outboundobject) 部分进行补全 - `outbounds` 里的第一个大括号内的配置,即为 V2Ray 代理服务的配置。请根据自身需求进行修改,并参照 V2Ray 官网配置文档中的 [配置 > Outbounds > OutboundObject](https://www.v2fly.org/config/outbounds.html#outboundobject) 部分进行补全
@ -289,26 +279,31 @@ steamstatic.com.8686c.com @cn
"dns": { "dns": {
"hosts": { "hosts": {
"dns.google": "8.8.8.8", "dns.google": "8.8.8.8",
"doh.pub": "119.29.29.29" "dns.pub": "119.29.29.29",
"dns.alidns.com": "223.5.5.5",
"geosite:category-ads-all": "127.0.0.1"
}, },
"servers": [ "servers": [
"https://dns.google/dns-query",
{ {
"address": "https+local://223.5.5.5/dns-query", "address": "https://1.1.1.1/dns-query",
"domains": ["geosite:geolocation-!cn", "geosite:google@cn"],
"expectIPs": ["geoip:!cn"]
},
"8.8.8.8",
{
"address": "114.114.114.114",
"port": 53,
"domains": [ "domains": [
"geosite:cn", "geosite:cn",
"geosite:icloud", "geosite:icloud",
"geosite:category-games@cn" "geosite:category-games@cn"
], ],
"expectIPs": [ "expectIPs": ["geoip:cn"],
"geoip:cn" "skipFallback": true
]
}, },
{ {
"address": "https://1.1.1.1/dns-query", "address": "localhost",
"domains": [ "skipFallback": true
"geosite:geolocation-!cn"
]
} }
] ]
}, },
@ -372,6 +367,7 @@ steamstatic.com.8686c.com @cn
], ],
"routing": { "routing": {
"domainStrategy": "IPIfNonMatch", "domainStrategy": "IPIfNonMatch",
"domainMatcher": "mph",
"rules": [ "rules": [
{ {
"type": "field", "type": "field",
@ -381,26 +377,22 @@ steamstatic.com.8686c.com @cn
{ {
"type": "field", "type": "field",
"outboundTag": "Dns-Out", "outboundTag": "Dns-Out",
"inboundTag": [ "inboundTag": ["Socks-In", "Http-In"],
"Socks-In",
"Http-In"
],
"network": "udp", "network": "udp",
"port": 53 "port": 53
}, },
{ {
"type": "field", "type": "field",
"outboundTag": "Reject", "outboundTag": "Reject",
"domain": [ "domain": ["geosite:category-ads-all"]
"geosite:category-ads-all"
]
}, },
{ {
"type": "field", "type": "field",
"outboundTag": "Proxy", "outboundTag": "Proxy",
"domain": [ "domain": [
"full:www.icloud.com", "full:www.icloud.com",
"domain:icloud-content.com" "domain:icloud-content.com",
"geosite:google"
] ]
}, },
{ {
@ -415,25 +407,17 @@ steamstatic.com.8686c.com @cn
{ {
"type": "field", "type": "field",
"outboundTag": "Proxy", "outboundTag": "Proxy",
"domain": [ "domain": ["geosite:geolocation-!cn"]
"geosite:geolocation-!cn"
]
}, },
{ {
"type": "field", "type": "field",
"outboundTag": "Direct", "outboundTag": "Direct",
"domain": [ "domain": ["geosite:cn", "geosite:private"]
"geosite:cn",
"geosite:private"
]
}, },
{ {
"type": "field", "type": "field",
"outboundTag": "Direct", "outboundTag": "Direct",
"ip": [ "ip": ["geoip:cn", "geoip:private"]
"geoip:cn",
"geoip:private"
]
}, },
{ {
"type": "field", "type": "field",