Skip to content

如何解决使用非默认 outbound DNS 似乎就无法按预期解析的情况? (配置错误) #4056

Closed Answered by lslqtz
lslqtz asked this question in Q&A
Discussion options

You must be logged in to vote

问题已经解决, 属于配置问题: direct 部分 domainStrategy 应位于 settingsObject 内. domainStrategy: ForceIP 的情况会导致 Wireguard 尝试使用网络不支持的 IPv6 去连接实际上也可能是 Xray 本身或 AsIs 的问题.

解决完后的配置文件如下, 改善了如下问题:

  1. 使用 Cloudflare Warp 做 DNS 解析, 以进一步完全使用;
  2. 使用本机 DNS 解析 Cloudflare Warp 入口点, 并指定仅使用 IPv4 (只返回 A 记录), 以避免 sendto: network is unreachable 问题;
  3. 修复配置文件, 正确指定 direct 部分的 domainStrategy;
{
	"log": {
		"logLevel": "warning",
		"error": "/var/log/xray/error.log",
		"access": "/var/log/xray/access.log"
	},
	"dns": {
		"servers": [
			"https://1.1.1.1/dns-query",
			"https://1.0.0.1/dns-query",
			"localhost",
			{
				"tag": "cloudflare-warp",
				"address": "localhost",
				"port": 53,
				"domains": [
					"engage.cloudflareclient…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lslqtz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant