Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2ray 作为中转服务器, 配置的域名没有走对应的出口 #2966

Open
whale-fall-wh opened this issue Apr 8, 2024 · 1 comment

Comments

@whale-fall-wh
Copy link

你正在使用哪个版本的 V2Ray?

docker部署的,最新版本

你的使用场景是什么?

在docker里部署了一个V2ray,
入站配置了两个,一个是socks,一个是vmess,出站配置了两个,一个是默认的,另一个tag为LY
指定的域名和IP走一个LY出站,其他都走默认的出站口

你看到的异常现象是什么?

用socks 代理时,指定的域名能正常命中LY出站口,但是用vmess入站时,就无法走代理了,也走了默认的出站口,是Vmess不支持吗?还是需要特殊配置

请附上你的配置

服务端配置:

'''
{
"log": {
"access": "",
"error": "",
"loglevel": "info"
},
"inbounds": [{
"port": 1081,
"listen": "0.0.0.0",
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true,
"ip": "127.0.0.1",
"clients": null
},
"streamSettings": null
},
{
"listen": "0.0.0.0",
"port": 1080,
"protocol": "vmess",
"settings": {
"clients": [{
"id": "dcd8eb99-a80a-4bcf-b61f-2c38b8d5c1f3",
"security": "auto",
"alterId": 0
}]
}
}
],
"outbounds": [{
"protocol": "vmess",
"settings": {
"vnext": [{
"address": "xxx",
"port": 443,
"users": [{
"id": "xxx",
"alterId": 0,
"email": "t@t.tt",
"security": "auto"
}]
}]
},
"streamSettings": {
"network": "ws",
"security": "tls",
"tlsSettings": {
"allowInsecure": false,
"serverName": "xxx"
},
"wsSettings": {
"path": "/neqqvws",
"headers": {
"Host": "xxx"
}
}
},
"mux": {
"enabled": false,
"concurrency": -1
}
},
{
"protocol": "HTTP",
"settings": {
"servers": [{
"address": "192.168.50.211",
"port": 8888,
"users": []
}]
},
"tag": "LY"
}
],
"dns": {
"servers": [
"8.8.8.8",
"8.8.4.4",
"localhost"
]
},
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [{
"type": "field",
"ip": [
"10.0.0.0/8"
],
"outboundTag": "LY"
},
{
"type": "field",
"domain": [
"domain:test.com"
],
"outboundTag": "LY"
}
]
}
}
'''

// 在这里附上服务器端配置文件
@whale-fall-wh
Copy link
Author

这是配置

{
	"log": {
		"access": "",
		"error": "",
		"loglevel": "info"
	},
	"inbounds": [{
			"port": 1081,
			"listen": "0.0.0.0",
			"protocol": "socks",
			"settings": {
				"auth": "noauth",
				"udp": true,
				"ip": "127.0.0.1",
				"clients": null
			},
			"streamSettings": null
		},
		{
			"listen": "0.0.0.0",
			"port": 1080,
			"protocol": "vmess",
			"settings": {
				"clients": [{
					"id": "dcd8eb99-a80a-4bcf-b61f-2c38b8d5c1f3",
					"security": "auto",
					"alterId": 0
				}]
			}
		}
	],
	"outbounds": [{
			"protocol": "vmess",
			"settings": {
				"vnext": [{
					"address": "xxx",
					"port": 443,
					"users": [{
						"id": "xxx",
						"alterId": 0,
						"email": "t@t.tt",
						"security": "auto"
					}]
				}]
			},
			"streamSettings": {
				"network": "ws",
				"security": "tls",
				"tlsSettings": {
					"allowInsecure": false,
					"serverName": "xxx"
				},
				"wsSettings": {
					"path": "/neqqvws",
					"headers": {
						"Host": "xxx"
					}
				}
			},
			"mux": {
				"enabled": false,
				"concurrency": -1
			}
		},
		{
			"protocol": "HTTP",
			"settings": {
				"servers": [{
					"address": "192.168.50.211",
					"port": 8888,
					"users": []
				}]
			},
			"tag": "LY"
		}
	],
	"dns": {
		"servers": [
			"8.8.8.8",
			"8.8.4.4",
			"localhost"
		]
	},
	"routing": {
		"domainStrategy": "IPIfNonMatch",
		"rules": [{
				"type": "field",
				"ip": [
					"10.0.0.0/8"
				],
				"outboundTag": "LY"
			},
			{
				"type": "field",
				"domain": [
					"domain:test.com"
				],
				"outboundTag": "LY"
			}
		]
	}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant