XTLS / Xray-core

Xray, Penetrates Everything. Also the best v2ray-core, with XTLS support. Fully compatible configuration.
https://t.me/projectXray
Mozilla Public License 2.0
24.62k stars 3.85k forks source link

有没有大佬帮助一下配置文件问题,只代理指定的域名,其他的全部直连 / Does anyone have any help with the configuration file problem, only proxy specified domains, all other direct connection #3327

Closed ysn2382617094wsw closed 5 months ago

ysn2382617094wsw commented 5 months ago

.xboxlive.com .microsoft.com .makecode.com .azureedge.net *.google.com 只代理这些,有没有大佬帮帮忙 How do I change my config file if I only proxy the above? { "policy": { "system": { "statsOutboundUplink": true, "statsOutboundDownlink": true } }, "log": { "access": "", "error": "", "loglevel": "warning" }, "inbounds": [ { "tag": "socks", "port": 10808, "listen": "127.0.0.1", "protocol": "socks", "sniffing": { "enabled": true, "destOverride": [ "http", "tls" ] }, "settings": { "auth": "noauth", "udp": true, "allowTransparent": false } }, { "tag": "http", "port": 10809, "listen": "127.0.0.1", "protocol": "http", "sniffing": { "enabled": true, "destOverride": [ "http", "tls" ] }, "settings": { "auth": "noauth", "udp": true, "allowTransparent": false } }, { "tag": "socks2", "port": 10810, "listen": "0.0.0.0", "protocol": "socks", "sniffing": { "enabled": true, "destOverride": [ "http", "tls" ] }, "settings": { "auth": "noauth", "udp": true, "allowTransparent": false } }, { "tag": "http2", "port": 10811, "listen": "0.0.0.0", "protocol": "http", "sniffing": { "enabled": true, "destOverride": [ "http", "tls" ] }, "settings": { "auth": "noauth", "udp": true, "allowTransparent": false } }, { "tag": "api", "port": 14630, "listen": "127.0.0.1", "protocol": "dokodemo-door", "settings": { "udp": false, "address": "127.0.0.1", "allowTransparent": false } } ], "outbounds": [ { "tag": "proxy", "protocol": "vmess", "settings": { "vnext": [ { "address": "xxx.xxx.xxx.xxx", "port": xxxxx, "users": [ { "id": "xxxxxxxxxxxxxxxxxxxxxxx", "alterId": 0, "email": "t@t.tt", "security": "auto" } ] } ] }, "streamSettings": { "network": "tcp" }, "mux": { "enabled": false, "concurrency": -1 } }, { "tag": "direct", "protocol": "freedom", "settings": {} }, { "tag": "block", "protocol": "blackhole", "settings": { "response": { "type": "http" } } } ], "stats": {}, "api": { "tag": "api", "services": [ "StatsService" ] }, "routing": { "domainStrategy": "IPIfNonMatch", "domainMatcher": "linear", "rules": [ { "type": "field", "inboundTag": [ "api" ], "outboundTag": "api", "enabled": true }, { "type": "field", "outboundTag": "direct", "domain": [ "domain:example-example.com", "domain:example-example2.com" ], "enabled": true }, { "type": "field", "outboundTag": "block", "domain": [ "geosite:category-ads-all" ], "enabled": true }, { "type": "field", "outboundTag": "direct", "domain": [ "geosite:cn" ], "enabled": true }, { "type": "field", "outboundTag": "direct", "ip": [ "geoip:private", "geoip:cn" ], "enabled": true }, { "type": "field", "port": "0-65535", "outboundTag": "proxy", "enabled": true } ] } }

yuhan6665 commented 5 months ago

Please read document https://xtls.github.io/config/routing.html