tun模式存在dns泄漏

Open
#6,454 109 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go

Research direction

Start by reproducing the reported command, .\xray.exe -c config.json, with the supplied TUN configuration and reviewing the linked client log. Trace how DNS traffic from tun-in is routed to dns-out; done means DNS leak checks no longer show requests bypassing the configured routing.

Written by the indexing model from the issue text.

Description

PR welcome
完整性要求
  • 我读完了 issue 模板中的所有注释,确保填写符合要求。
  • 我保证阅读了文档,了解所有我编写的配置文件项的含义,而不是大量堆砌看似有用的选项或默认值。
  • 我提供了完整的配置文件和日志,而不是出于自己的判断只给出截取的部分。
  • 我搜索了 issues, 没有发现已提出的类似问题。
  • 问题在 Release 最新的版本上可以成功复现
描述

开启tun模式会出现dns泄漏的问题

重现方式

把v2rayN的config.json 文件复制到xray目录下面 用 .\xray.exe -c config.json 然后访问各种检测dns泄漏网站会出现dns泄漏的问题

Image
客户端配置

{
"log": {
"loglevel": "debug",
"dnsLog": true
},
"dns": {
"servers": [
{
"address": "223.5.5.5",
"domains": [
"geosite:cn",
"geosite:private"
],
"skipFallback": true
},
{
"address": "8.8.8.8"
}
],
"queryStrategy": "UseIPv4",
"disableCache": false
},
"inbounds": [
{
"tag": "tun-in",
"protocol": "tun",
"settings": {
"name": "xray0",
"mtu": 1500,
"gateway": [
"10.0.0.1/16",
"fc00::1/64"
],
"dns": [
"1.1.1.1",
"8.8.8.8"
],
"userLevel": 0,
"autoSystemRoutingTable": [
"0.0.0.0/0",
"::/0"
],
"autoOutboundsInterface": "auto"
},
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls",
"quic"
]
}
},
{
"tag": "mixed-in",
"protocol": "socks",
"listen": "127.0.0.1",
"port": 16890,
"settings": {
"auth": "noauth",
"udp": true
}
}
],
"outbounds": [
{
"tag": "proxy",
"protocol": "shadowsocks",
"settings": {
"servers": [
{
"address": "",
"port": ,
"method": "2022-blake3-aes-128-gcm",
"password": ""
}
]
},
"streamSettings": {
"network": "tcp"
}
},
{
"tag": "direct",
"protocol": "freedom",
"settings": {}
},
{
"tag": "block",
"protocol": "blackhole",
"settings": {}
},
{
"tag": "dns-out",
"protocol": "dns"
}
],
"routing": {
"domainStrategy": "AsIs",
"rules": [
{
"type": "field",
"inboundTag": [
"tun-in"
],
"port": "53",
"outboundTag": "dns-out"
},
{
"type": "field",
"outboundTag": "direct",
"process": [
"self/",
"xray/"
]
},
{
"type": "field",
"outboundTag": "block",
"network": "udp",
"port": "443"
},
{
"type": "field",
"outboundTag": "proxy",
"domain": [
"geosite:google"
]
},
{
"type": "field",
"outboundTag": "direct",
"domain": [
"geosite:cn",
"geosite:private"
]
},
{
"type": "field",
"outboundTag": "direct",
"ip": [
"geoip:cn",
"geoip:private"
]
},
{
"type": "field",
"outboundTag": "proxy",
"network": "tcp,udp"
}
]
}
}

服务端配置

由于是机场无法提供

客户端日志

新建 文本文档.txt
太大超过65536个字符

服务端日志

机场节点无法提供

Dominant language
Go
Stars
41.7k
Forks
5.9k
Avg merge
3d 10h
Merged PRs (30d)
29

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from XTLS/Xray-core

All issues in XTLS/Xray-core

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.