Repository navigation
XDNS finalmask: Default values for types; name->names; type+addr->addrs - #7090
Conversation
|
绑定domain和resolver我看不到收益啊,还没写,确定要弄改的就不止是配置项 |
|
以及
比如有的 resolver 可能 block 了某个 domain,或者用户就是想指定 domain 走指定 resolver |
|
也就是数组改为object names []*Domain 绑定要加配置项吗,还是默认绑定 |
|
|
|
第一点肯定要弄,第二点你要是觉得没必要的话就先不弄了吧,
|
|
这样后面来的tls只能共用了啊,把type换成name就行了吧,addr按照protocol://host:port来解析 |
|
不对,绑定应该是 names []string
|
|
服务端和客户端: "domains": [
{
"names": ["a.com", "b.com"],
"types": [16, 28],
"edns0": 1232
}
]仅客户端,以后加的 "resolvers": [
{
"addrs": ["1.1.1.1:1234", "tcp://1.1.1.1"]
}
] |
|
单个resolver不能同时tcp和udp,得分两个,addr去掉s可以写 |
配置和架构是两回事,你实际架构上可以分成两个 resolver,这样主要方便 sockopt 的 TCP/UDP 共用设置项比如绑 interface 包括 |
|
要做绑定必须要动架构,可以试试,相当于多包了一层,只是socket数量会不那么清晰,之前可以对应resolvers数量,现在应该是resolvers*addrs数量 |
|
先别做 domain & resolver 绑定了吧我想了一下,最初加多 resolvers 的主要目的是 speed up,先按配置示例改吧方便这个目的
哦你说 resolvers * addrs,为了避免潜在的 QoS 肯定是不复用、开多个 socket 最好啊,之前让你改基于 fm dial 的收益之一 |
|
总之先不用改核心架构,客户端 domains 子项和 resolvers 子项的关系我想了下可以类似于负载均衡策略, |
|
那这样应该没问题了,我上配置测下 |
|
@LjhAUMEM |
|
不做绑定要 names 干啥 |
|
这跟绑定没关系啊, |
|
哦哦,以为是给解析器加的,我测下配置 |
|
底层传输代码里 服务端 用户可以空 |
|
names 允许不了任何,加新域名服务端也得动,比如来个 a.b.c.d.e.com,无法分辨哪个是数据哪个是后缀 |
|
|
|
其他地方只能往扩展方向找了,但希望不大,总不能塞 answer 里去查询 default types 已加,没其他的就 ready 了 |
|
Thank you very much for this work. I mainly use XDNS for bypassing censorship and filtering in Iran, and after these significant changes to the XDNS structure, I’m not entirely sure how the old configuration should be migrated to the new one. Until recently, I was using parameters such as: "cwndMultiplier", "downlinkCapacity", "maxSendingWindow", "mtu", "uplinkCapacity" However, with the new configuration and parameters, I’m not sure about the following:
It would be extremely helpful if this PR could include a complete working example of an XDNS outbound configuration on the client side, including all currently relevant parameters and recommended values. For example, in the configuration provided by LjhAUMEM, I did not see "mtu" on the client side. Previously, this was one of the important parameters for me when tuning XDNS to work under Iranian filtering, so I’m currently not sure whether its role has changed, whether it has been moved somewhere else, or whether it is no longer needed. This is particularly important right now because Iranian filtering has become significantly more aggressive over the past week, and there is a possibility of another widespread disruption of access to the international Internet. In such circumstances, XDNS could be one of the few genuinely effective mechanisms for restoring access. Therefore, a complete client-side configuration example, together with an explanation of the purpose and practical impact of the new parameters, would be extremely valuable not only for me but also for other users trying to use XDNS under severe DPI filtering. Once again, thank you for your excellent work on Xray and for your enormous contribution to keeping the Internet freely accessible. |
|
我看到了这个 https://t.me/projectXhttp/799246
|
So, based on your explanation, the configuration should be built according to the example provided in #6718.
Also, DoT and DoH are not very effective in Iran, especially during an Internet shutdown, so relying on them is not really a viable option in that situation. |
I actually vibe coded this xdrive settings part such as segment bytes and etc... ; told AI to consider API quota limits , i really didn't encounter any limit related response codes though , so we're fine. |
|
I should also add that my server is not appropriate for outgoing connections , therefore I would rule out the speed matter right now. what i would discuss instead is the way Item configurations should look like , I'm using xray-core for over 4 years now , Initially , i thought i have to configure the server for outbound , then i found weird setup in the code that mentioned them here:#6748 (comment) |
This matter is also mentioned by patterniha in https://t.me/patt_channel_x/159 & https://t.me/patt_channel_x/164
|
|
Regarding ECH as one of the possible bypass ways right now, I was discussing with some people recently about it , in-order to keep its usefulness , it somehow needs to be mandatory, meaning Chromium or other browsers use it as a mandatory extension for supported sites , this will help preventing DPI to easily take action against ECH domain , right now , with the limits of cloudflare IPs growing, the usage of ECH for SNI bypass has become more popular & it won't last much. |
如果是 Chrome 的话还真有可能实现,和当年搞 HSTS 一样,网站申请硬编码进 Chrome 的 list,这样 DNS 就不能弄掉 ECH 了
|
|
以及之前提过 #5981 (comment) ,如果浏览器真这么搞的话对于 TUN/TPROXY 来说 FakeDNS 会变得很有用, @Meo597 |
|
|
@Ahmad-2213 @owltrainer 关于 XDNS,你们有没有尝试过 |
|
I've never used XDNS since it needs port 53 on vps and mine is some kind of restrictive one which is only accessible via public https domain; however, during the blackouts, the community experienced some abusive err from resolvers , but i can confirm that using multiple resolvers enhanced the speed but it never got even close to be used for media usage, maybe due to low number of recursive DNS resolvers within the country; though the final verdict can be issued by those who have used this protocol. |
|
The reason i would never use |
This comment was marked as off-topic.
This comment was marked as off-topic.
看了下文档,当下 sniffer 是可以拿到 inner sni 的 realip 如果 xray 有缓存而浏览器没有,上述问题同样存在 65 现在也能带 ip 了 |
|
觉得数组太多碍事可以重新考虑下 #5625 |
|
Test with local iperf3 There is likely still room for optimization; I recall that the initial approach in #6718 achieved speeds of 180 MB/s in a single-threaded test on a live site
Connecting to host 127.0.0.1, port 1080
[ 5] local 127.0.0.1 port 8728 connected to 127.0.0.1 port 1080
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 2.62 MBytes 22.0 Mbits/sec
[ 5] 1.00-2.01 sec 128 KBytes 1.04 Mbits/sec
[ 5] 2.01-3.00 sec 0.00 Bytes 0.00 bits/sec
[ 5] 3.00-4.01 sec 256 KBytes 2.08 Mbits/sec
[ 5] 4.01-5.01 sec 0.00 Bytes 0.00 bits/sec
[ 5] 5.01-6.01 sec 0.00 Bytes 0.00 bits/sec
[ 5] 6.01-7.00 sec 256 KBytes 2.11 Mbits/sec
[ 5] 7.00-8.01 sec 128 KBytes 1.04 Mbits/sec
[ 5] 8.01-9.00 sec 0.00 Bytes 0.00 bits/sec
[ 5] 9.00-10.02 sec 256 KBytes 2.07 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.02 sec 3.62 MBytes 3.04 Mbits/sec sender
[ 5] 0.00-10.20 sec 512 KBytes 411 Kbits/sec receiver
iperf Done.
Connecting to host 127.0.0.1, port 1080
Reverse mode, remote host 127.0.0.1 is sending
[ 5] local 127.0.0.1 port 2355 connected to 127.0.0.1 port 1080
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 0.00 Bytes 0.00 bits/sec
[ 5] 1.00-2.01 sec 256 KBytes 2.08 Mbits/sec
[ 5] 2.01-3.01 sec 384 KBytes 3.17 Mbits/sec
[ 5] 3.01-4.00 sec 896 KBytes 7.37 Mbits/sec
[ 5] 4.00-5.01 sec 896 KBytes 7.26 Mbits/sec
[ 5] 5.01-6.01 sec 512 KBytes 4.22 Mbits/sec
[ 5] 6.01-7.00 sec 256 KBytes 2.11 Mbits/sec
[ 5] 7.00-8.01 sec 256 KBytes 2.08 Mbits/sec
[ 5] 8.01-9.01 sec 768 KBytes 6.31 Mbits/sec
[ 5] 9.01-10.02 sec 768 KBytes 6.23 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.20 sec 7.75 MBytes 6.37 Mbits/sec sender
[ 5] 0.00-10.02 sec 4.88 MBytes 4.08 Mbits/sec receiver
iperf DoneDetails
{
"log": { "loglevel": "debug" },
"inbounds": [
{
"listen": "127.0.0.1",
"port": 1080,
"protocol": "tunnel",
"settings": {
"allowedNetwork": "tcp",
"rewriteAddress": "127.0.0.1",
"rewritePort": 5201
}
}
],
"outbounds": [
{
"protocol": "vless",
"settings": {
"address": "127.0.0.1",
"port": 53,
"id": "5783a3e7-e373-51cd-8642-c83782b807c5",
"encryption": "none"
},
"streamSettings": {
"network": "kcp",
"kcpSettings": {
"tti": 200
},
"finalmask": {
"udp": [
{
"type": "xdns",
"settings": {
"domains": [
{
"names": ["t.example.com"],
"lenLimit": 255,
"labelLimit": 63,
"types": [16],
"edns0": 1232
}
],
"resolvers": [
{
"addrs": ["127.0.0.1"]
}
],
"extraPoll": 1
}
}
]
}
}
}
]
}Details
{
"log": { "loglevel": "debug" },
"inbounds": [
{
"listen": "127.0.0.1",
"port": 53,
"protocol": "vless",
"settings": {
"clients": [
{
"id": "5783a3e7-e373-51cd-8642-c83782b807c5"
}
],
"decryption": "none"
},
"streamSettings": {
"network": "mkcp",
"kcpSettings": {
"tti": 200,
"mtu": 932
},
"finalmask": {
"udp": [
{
"type": "xdns",
"settings": {
"domains": [
{
"names": ["t.example.com"],
"types": [16],
"edns0": 1232
}
]
}
}
]
}
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {
"finalRules": [
{
"action": "allow"
}
]
}
}
]
} |
|
Thanks for the work on this PR. I have a concern about the config schema complexity. Currently, both I think it would be simpler and more intuitive if each entry represented exactly one domain or one resolver directly. That is, use singular For example, the client config could look like this: "finalmask": {
"udp": [
{
"type": "xdns",
"settings": {
"domains": [
{
"name": "t.example.com",
"lenLimit": 255,
"labelLimit": 63,
"types": [16],
"edns0": 1232
}
],
"resolvers": [
{
"addr": "127.0.0.1"
}
],
"extraPoll": 1
}
}
]
}And for multiple domains or resolvers, it would just be: "domains": [
{ "name": "a.example.com", "types": [16], "edns0": 1232 },
{ "name": "b.example.com", "types": [1], "edns0": 1232 }
],
"resolvers": [
{ "addr": "udp://1.1.1.1:53" },
{ "addr": "tcp://8.8.8.8:53" }
]This keeps each object self-contained and avoids the nested list indirection. I believe this would make the config much easier to understand and maintain. What do you think? |
The addrs schema (XTLS#7090) parses each resolver as a URL and checks its scheme, but an empty address, a missing host (udp://:53) or a port of 0 or above 65535 still passed and failed only when the client first dialed the resolver. Reject them when the configuration is built, as TaiLerV's sync/upstream-2026-10-02 branch (9b5f3d9) did for the previous schema. The test, adapted from that commit, failed before this change for all five addresses. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- xdns schema of XTLS/Xray-core#7090/#7095: domains[].names and resolvers[].addrs, address checks as in Build() plus bracketed IPv6, empty types = side default, migration from the string and v26.9.30 schemas, warning XdnsV26930Schema (0.5.65-0, Architecture §131). - Fix: a DNS server object lost untyped keys on Save; servers[].id (#6823) with a field on the DNS page (0.5.65-1, §132). - Lua script in routing and dns (#6823): path field, notes "rules / servers have no effect", relative path, older core (0.5.66-0, §133). - Outbound TLS useSystemCA (#7105): checkbox with help in English and Russian, inactive under disableSystemRoot, RequiresNewerCore on an older core (0.5.67-0, §134). - About dialog and Copy Version Info show the Xray-core release Feldjaeger is developed against: BASELINE_XRAY_CORE = v26.10.10 (0.5.68-0, §135). - Dependencies: serde_json 1.0.154, sha2 0.11.1, tokio 1.54.0, uuid 1.28.0, rustls 0.23.46 (feldjaeger-ssh: tokio 1.54.0). Tests: 1450 + 16 passed / 0 failed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
No description provided.