是否支持路由规则走不同配置
希望不同domain走不同的代理配置文件,请问是否已经支持,或是否有类似计划
你好,暂时不支持。 可能需要等 xray core 支持 tun 以后才会有计划做
你可以把 v2rayN 导出的完整配置用到 v2rayNG 中,试一试是否可以用
你可以把 v2rayN 导出的完整配置用到 v2rayNG 中,试一试是否可以用
您好:
尝试结果为:直接导入能导入对应outbound tag,但设置只允许proxy,direct和block,故带有tag的规则不生效。
并不是让你导入路由规则,而是直接把 v2rayN 产生的完整配置导入,使用自定义配置的方式
If I understood you correctly, then yes—if you import the full configuration, everything works without any issues. However, I'd prefer to accomplish this in a simpler way using routing rules.
Attached is the configuration:
{
"log": {
"loglevel": "warning"
},
"dns": {
"hosts": {
"dns.google": [
"8.8.8.8",
"8.8.4.4",
"2001:4860:4860::8888",
"2001:4860:4860::8844"
],
"dns.cloudflare.com": [
"1.0.0.1",
"1.1.1.1"
],
"dns.comss.one": [
"212.109.195.93",
"83.220.169.155"
]
},
"servers": [
{
"address": "https://dns.comss.one/dns-query",
"domains": [
"domain:comss.one",
"domain:yandex.net",
"domain-vpn-1.net"
],
"skipFallback": true
},
{
"address": "https://dns.cloudflare.com/dns-query",
"domains": [
"geosite:youtube",
"geosite:category-ai-!cn",
"geosite:category-ai-cn",
"geosite:category-social-media-!cn"
],
"skipFallback": true
},
{
"address": "https://dns.comss.one/dns-query",
"domains": [
"geosite:private",
"geosite:category-ru"
],
"skipFallback": true
},
{
"address": "77.88.8.2",
"domains": [
"full:dns.comss.one",
"full:dns.cloudflare.com"
],
"skipFallback": true
},
"https://dns.cloudflare.com/dns-query"
],
"tag": "dns-module"
},
"inbounds": [
{
"tag": "socks",
"port": 10808,
"listen": "127.0.0.1",
"protocol": "mixed",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
],
"routeOnly": false
},
"settings": {
"auth": "noauth",
"udp": true,
"allowTransparent": false
}
}
],
"outbounds": [
{
"tag": "proxy",
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "domain-vpn-1.net",
"port": 443,
"users": [
{
"id": "09000-000-000-000-00000",
"email": "[email protected]",
"security": "auto",
"encryption": "none",
"flow": "xtls-rprx-vision"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"serverName": "apple.com",
"fingerprint": "chrome",
"show": false,
"publicKey": "Bh6r9-5Kg",
"shortId": "d3b",
"spiderX": "/",
"mldsa65Verify": ""
}
},
"mux": {
"enabled": false,
"concurrency": -1
}
},
{
"tag": "direct",
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIPv4",
"userLevel": 0
}
},
{
"tag": "block",
"protocol": "blackhole"
},
{
"tag": "5150011600264600771-proxy",
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "domain-vpn-2.net",
"port": 443,
"users": [
{
"id": "1111-000-000-000-00000",
"email": "[email protected]",
"security": "auto",
"encryption": "none",
"flow": "xtls-rprx-vision"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"serverName": "apple.com",
"fingerprint": "chrome",
"show": false,
"publicKey": "aSzlR6IejUg",
"shortId": "77",
"spiderX": "/",
"mldsa65Verify": ""
}
},
"mux": {
"enabled": false,
"concurrency": -1
}
},
{
"tag": "5747176251963604720-proxy",
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "domain-vpn-3.net",
"port": 443,
"users": [
{
"id": "22222-3333-444-55-665556",
"email": "[email protected]",
"security": "auto",
"encryption": "none",
"flow": "xtls-rprx-vision"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"serverName": "apple.com",
"fingerprint": "chrome",
"show": false,
"publicKey": "jjjjaSzlR6IejUg",
"shortId": "j44",
"spiderX": "/",
"mldsa65Verify": ""
}
},
"mux": {
"enabled": false,
"concurrency": -1
}
},
{
"tag": "4924857715157615562-proxy",
"protocol": "vless",
"settings": {
"vnext": [
{
"address": "domain-vpn-4.net",
"port": 443,
"users": [
{
"id": "f3332323-f33-a3333-f332-f2223",
"email": "[email protected]",
"security": "auto",
"encryption": "none",
"flow": "xtls-rprx-vision"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"security": "reality",
"realitySettings": {
"serverName": "apple.com",
"fingerprint": "chrome",
"show": false,
"publicKey": "fdwwffffdsn3aSzffdIejUg",
"shortId": "84fffafsss7",
"spiderX": "/",
"mldsa65Verify": ""
}
},
"mux": {
"enabled": false,
"concurrency": -1
}
}
],
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"inboundTag": [
"api"
],
"outboundTag": "api"
},
{
"type": "field",
"port": "443",
"network": "udp",
"outboundTag": "block"
},
{
"type": "field",
"outboundTag": "direct",
"protocol": [
"bittorrent"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"geoip:private"
]
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"geosite:private"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"77.88.8.8",
"77.88.8.1"
]
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"domain:comss.one",
"domain:yandex.net"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"geoip:ru"
]
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"geosite:category-ru"
]
},
{
"type": "field",
"outboundTag": "5150011600264600771-proxy",
"domain": [
"geosite:youtube"
]
},
{
"type": "field",
"outboundTag": "5747176251963604720-proxy",
"domain": [
"geosite:category-ai-!cn",
"geosite:category-ai-cn"
]
},
{
"type": "field",
"outboundTag": "4924857715157615562-proxy",
"domain": [
"geosite:category-social-media-!cn"
]
},
{
"type": "field",
"inboundTag": [
"dns-module"
],
"outboundTag": "proxy"
}
]
}
}
When importing routing rules. Proxies (nodes) are displayed. But in fact, nothing works.