Skip to content

使用xray代理服务器域名无法解析 #185

@leG09

Description

@leG09

{
"inbounds": [
{
"port": 9898,
"protocol": "dokodemo-door",
"tag": "tproxy-in",
"settings": {
"followRedirect": true,
"network": "tcp,udp"
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
],
"routeOnly": false
},
"streamSettings": {
"sockopt": {
"tproxy": "tproxy"
}
}
}
],
"log": {
"loglevel": "warning"
},
"outbounds": [
{
"mux": {
"enabled": true,
"concurrency": 8
},
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "examplate.com", //此处换成ip正常,换成域名无法使用
"port": 36250,
"users": [
{
"id": "asdasdasd-e966-4363-f921-bdbcea680ea2",
"level": 8,
"security": "auto"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"tcpSettings": {
"header": {
"request": {
"headers": {
"Connection": [
"keep-alive"
],
"Host": [
"www.189.cn"
],
"Pragma": "no-cache",
"Accept-Encoding": [
"gzip, deflate"
],
"User-Agent": [
"Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.6478.122 Mobile Safari/537.36"
]
},
"method": "GET",
"path": [
"/"
],
"version": "1.1"
},
"type": "http"
}
}
},
"tag": "proxy"
},
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"dns": {
"servers": [
{
"address": "114.114.114.114",
"port": 53,
"domains": [
"geosite:cn"
],
"expectIPs": [
"geoip:cn"
]
},
{
"address": "8.8.8.8",
"port": 53,
"domains": [
"geosite:geolocation-!cn"
]
}
]
},
"routing": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"port": 53,
"domain": [
"geosite:cn"
],
"outboundTag": "direct"
},
{
"type": "field",
"port": 53,
"domain": [
"geosite:geolocation-!cn"
],
"outboundTag": "proxy"
},
{
"type": "field",
"network": "tcp,udp",
"outboundTag": "proxy"
}
]
},
"policy": {
"levels": {
"8": {
"connIdle": 300,
"downlinkOnly": 1,
"handshake": 4,
"uplinkOnly": 1,
"bufferSize": 1024
}
},
"system": {
"statsOutboundUplink": true,
"statsOutboundDownlink": true
}
},
"remarks": "vmess+http",
"stats": {}
}

日志报错,2025/05/12 06:25:42 [Warning] [1723005287] app/proxyman/outbound: failed to process outbound traffic > proxy/vmess/outbound: failed to find an available destination > common/retry: [dial tcp: lookup examplate.com on [::1]:53: dial udp [::1]:53: connect: cannot assign requested address dial tcp: lookup examplate.com: operation was canceled] > common/retry: all retry attempts failed

发现代理服务器域名无法解析,走了系统的53解析。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions