Skip to content

建议提供禁止ipv6 dns查询的设置 #297

@zjudongze

Description

@zjudongze

除非特殊情况,请完整填写所有问题。不按模板发的 issue 将直接被关闭。
如果你遇到的问题不是 V2Ray 的 bug,比如你不清楚要如何配置,请使用Discussion进行讨论。

  1. 你正在使用哪个版本的 V2Ray?(如果服务器和客户端使用了不同版本,请注明)
    4.30

  2. 你的使用场景是什么?比如使用 Chrome 通过 Socks/VMess 代理观看 YouTube 视频。
    chrome访问www.google.com

  3. 你看到的不正常的现象是什么?(请描述具体现象,比如访问超时,TLS 证书错误等)
    偶现:www.google.com打不开;这时候使用手机等其他工具,使用同一个服务器都打不开google;但是同一时刻,可以打开其他任何网站

  4. 你期待看到的正确表现是怎样的?
    能打开google

  5. 请附上你的配置(提交 Issue 前请隐藏服务器端IP地址)。

服务器端配置:

    // 在这里附上服务器端配置文件

客户端配置:

    // 在这里附上客户端配置
  1. 请附上出错时软件输出的错误日志。在 Linux 中,日志通常在 /var/log/v2ray/error.log 文件中。

服务器端错误日志:

2020/10/10 16:28:12 [Debug] v2ray.com/core/app/dns: UDP:8.8.8.8:53 cache HIT www.google.com -> [2404:6800:4004:806::2004]
2020/10/10 16:28:12 [Info] [3509646880] v2ray.com/core/app/dispatcher: default route for tcp:www.google.com:443
2020/10/10 16:28:12 [Info] [3509646880] v2ray.com/core/proxy/freedom: opening connection to tcp:www.google.com:443
2020/10/10 16:28:12 [Debug] v2ray.com/core/app/dns: UDP:8.8.8.8:53 cache HIT www.google.com -> [2404:6800:4004:806::2004]
2020/10/10 16:28:12 [Info] [3509646880] v2ray.com/core/proxy/freedom: dialing to to tcp:[2404:6800:4004:806::2004]:443
2020/10/10 16:28:12 [Info] [3509646880] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:[2404:6800:4004:806::2004]:443
2020/10/10 16:28:12 [Debug] v2ray.com/core/app/dns: UDP:8.8.8.8:53 cache HIT www.google.com -> [2404:6800:4004:806::2004]
2020/10/10 16:28:12 [Info] [3509646880] v2ray.com/core/proxy/freedom: dialing to to tcp:[2404:6800:4004:806::2004]:443
2020/10/10 16:28:12 [Info] [3509646880] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:[2404:6800:4004:806::2004]:443
2020/10/10 16:28:12 [Debug] v2ray.com/core/app/dns: UDP:8.8.8.8:53 cache HIT www.google.com -> [2404:6800:4004:806::2004]
2020/10/10 16:28:12 [Info] [3509646880] v2ray.com/core/proxy/freedom: dialing to to tcp:[2404:6800:4004:806::2004]:443
2020/10/10 16:28:12 [Info] [3509646880] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:[2404:6800:4004:806::2004]:443
2020/10/10 16:28:12 [Debug] v2ray.com/core/app/dns: UDP:8.8.8.8:53 cache HIT www.google.com -> [2404:6800:4004:806::2004]
2020/10/10 16:28:12 [Info] [3509646880] v2ray.com/core/proxy/freedom: dialing to to tcp:[2404:6800:4004:806::2004]:443
2020/10/10 16:28:12 [Info] [3509646880] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:[2404:6800:4004:806::2004]:443
2020/10/10 16:28:13 [Debug] v2ray.com/core/app/dns: UDP:8.8.8.8:53 cache HIT www.google.com -> [2404:6800:4004:806::2004]
2020/10/10 16:28:13 [Info] [3509646880] v2ray.com/core/proxy/freedom: dialing to to tcp:[2404:6800:4004:806::2004]:443
2020/10/10 16:28:13 [Info] [3509646880] v2ray.com/core/transport/internet/tcp: dialing TCP to tcp:[2404:6800:4004:806::2004]:443
2020/10/10 16:28:13 [Info] [3509646880] v2ray.com/core/app/proxyman/outbound: failed to process outbound traffic > v2ray.com/core/proxy/freedom: failed to open connection to tcp:www.google.com:443 > v2ray.com/core/common/retry: [dial tcp [2404:6800:4004:806::2004]:443: connect: cannot assign requested address] > v2ray.com/core/common/retry: all retry attempts failed

客户端错误日志:

    // 在这里附上客户端日志
  1. 请附上访问日志。在 Linux 中,日志通常在 /var/log/v2ray/access.log 文件中。
    // 在这里附上服务器端日志
  1. 其它相关的配置文件(如 Nginx)和相关日志。

  2. 如果 V2Ray 无法启动,请附上 --test 输出。

通常的命令为 /usr/bin/v2ray/v2ray --test --config /etc/v2ray/config.json。请按实际情况修改。

  1. 如果 V2Ray 服务运行不正常,请附上 journal 日志。

通常的命令为 journalctl -u v2ray

请预览一下你填的内容再提交。

ps:

  1. www.google.com dns ipv4和ipv6记录都有;
  2. 服务器只有ipv4地址,没有ipv6网络
  3. 目前v2ray 会同时查询type A和type AAAA的dns记录; 在某些特殊的情况下(不是很确定,猜测dns type A查询结果由于丢包没有到达),导致v2ray内置dns缓存中只有type AAAA的记录,而服务器又只有ipv4网络,导致打不开google

解决方法:在只有ipv4的服务器上,自动配置成只查询type A ipv4地址;
或者提供配置,可以禁止查询ipv6地址;
比如
{
"address": "8.8.8.8",
"type": "A" or "AAAA" or "default = both"

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions