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

1.4版本选用xray dns(DOH)过滤会外网阻断 #383

Closed
quango-web opened this issue Mar 16, 2021 · 4 comments · Fixed by #396
Closed

1.4版本选用xray dns(DOH)过滤会外网阻断 #383

quango-web opened this issue Mar 16, 2021 · 4 comments · Fixed by #396
Labels
bug Something isn't working

Comments

@quango-web
Copy link

配置:
服务器xray1.4
openwrt--passwall-xray1.4
DNS过滤模式:xray dns(DOH)
后果:外网阻断
然后把服务器端回退到1.31故障依旧(客户端版本无法回退只能保持1.4)

选用pdnsd--google8.8.8.8则一切正常

@Butterflyflower
Copy link

@quango-web 我也遇到了,如何有效反馈。

@AkinoKaede
Copy link
Contributor

请提供日志 配置

@xiaorouji
Copy link
Contributor

{
  "outbounds": [
    {
      "protocol": "dns",
      "tag": "dns-out"
    },
    {
      "streamSettings": {
        "sockopt": {
          "mark": 255
        }
      },
      "settings": {
        "domainStrategy": "UseIPv4"
      },
      "protocol": "freedom",
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "tag": "blackhole"
    },
    {
      "settings": {
        "servers": [
          {
            "port": 1080,
            "address": "127.0.0.1"
          }
        ]
      },
      "streamSettings": {
        "network": "tcp",
        "security": "none"
      },
      "protocol": "socks",
      "tag": "out"
    }
  ],
  "log": {
    "loglevel": "warning"
  },
  "dns": {
    "servers": [
      "https:\/\/dns.google\/dns-query"
    ],
    "hosts": {
      "dns.google": "8.8.8.8"
    },
    "tag": "dns-in1"
  },
  "routing": {
    "rules": [
      {
        "type": "field",
        "inboundTag": [
          "dns-in"
        ],
        "outboundTag": "dns-out"
      },
      {
        "type": "field",
        "inboundTag": [
          "dns-in1"
        ],
        "outboundTag": "out"
      }
    ],
    "domainStrategy": "IPOnDemand"
  },
  "inbounds": [
    {
      "port": 17913,
      "protocol": "dokodemo-door",
      "settings": {
        "port": 53,
        "network": "udp",
        "address": "8.8.8.8"
      },
      "tag": "dns-in",
      "listen": "127.0.0.1"
    }
  ]
}

似乎是DnsObject的tagdns-in1不走outboundTag了,指定了out,但依然只会走第一个outbounds

Xray 1.4.0 (Xray, Penetrates Everything.) OpenWrt (go1.16 linux/amd64)
A unified platform for anti-censorship.
2021/03/17 18:53:23 [Info] infra/conf/serial: Reading config: /var/etc/passwall/DNS2.json
2021/03/17 18:53:23 [Warning] core: Xray 1.4.0 started
2021/03/17 18:53:25 127.0.0.1:56438 accepted udp:8.8.8.8:53 [dns-in -> dns-out]
2021/03/17 18:53:25 DoH accepted https://dns.google/dns-query [dns-out]
2021/03/17 18:53:25 DoH accepted https://dns.google/dns-query [dns-out]
2021/03/17 18:53:27 127.0.0.1:50720 accepted udp:8.8.8.8:53 [dns-in -> dns-out]
2021/03/17 18:53:27 DoH accepted https://dns.google/dns-query [dns-out]
2021/03/17 18:53:27 DoH accepted https://dns.google/dns-query [dns-out]
2021/03/17 18:53:29 [Error] app/dns: failed to retrieve response for google.com. > Post "https://dns.google/dns-query": context deadline exceeded
2021/03/17 18:53:29 [Error] app/dns: failed to retrieve response for google.com. > Post "https://dns.google/dns-query": context deadline exceeded
2021/03/17 18:53:29 DoH accepted https://dns.google/dns-query [dns-out]
2021/03/17 18:53:29 DoH accepted https://dns.google/dns-query [dns-out]
2021/03/17 18:53:31 [Error] app/dns: failed to retrieve response for google.com. > Post "https://dns.google/dns-query": context deadline exceeded
2021/03/17 18:53:31 [Error] app/dns: failed to retrieve response for google.com. > Post "https://dns.google/dns-query": context deadline exceeded
2021/03/17 18:53:33 [Error] app/dns: failed to retrieve response for google.com. > Post "https://dns.google/dns-query": context deadline exceeded
2021/03/17 18:53:33 [Error] app/dns: failed to retrieve response for google.com. > Post "https://dns.google/dns-query": context deadline exceeded

然后我把tagout放到outbounds第一个,就可以了

Xray 1.4.0 (Xray, Penetrates Everything.) OpenWrt (go1.16 linux/amd64)
A unified platform for anti-censorship.
2021/03/17 18:56:59 [Info] infra/conf/serial: Reading config: /var/etc/passwall/DNS2.json
2021/03/17 18:56:59 [Warning] core: Xray 1.4.0 started
2021/03/17 18:57:00 127.0.0.1:57657 accepted udp:8.8.8.8:53 [dns-in -> dns-out]
2021/03/17 18:57:00 DoH accepted https://dns.google/dns-query [out]
2021/03/17 18:57:00 DoH accepted https://dns.google/dns-query [out]

简单点说就是DnsObject不走指定outbounds了,以往旧版是没有问题的。

@Butterflyflower
Copy link

@xiaorouji @AkinoKaede

@ghost ghost self-assigned this Mar 17, 2021
@ghost ghost added the bug Something isn't working label Mar 17, 2021
ghost pushed a commit that referenced this issue Mar 17, 2021
@ghost ghost mentioned this issue Mar 17, 2021
@RPRX RPRX closed this as completed in #396 Mar 17, 2021
mwhorse46 added a commit to mwhorse46/Xray-core that referenced this issue Feb 19, 2023
rampagekiller0725 added a commit to rampagekiller0725/wox that referenced this issue Jun 29, 2023
Autumn216 added a commit to Autumn216/wox that referenced this issue Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants