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

求V2 dns 出站协议的具体的配置 #140

Closed
xjasonlyu opened this issue Feb 14, 2019 · 4 comments
Closed

求V2 dns 出站协议的具体的配置 #140

xjasonlyu opened this issue Feb 14, 2019 · 4 comments

Comments

@xjasonlyu
Copy link

  • 最新的v2ray-core v4.15中增加的dns出站协议

按照官方doc说明的配置(不知道是否需要在rule里配置outboundTag)
在DEBUG模式下,log没有具体的dns出站info。
用的是socks inbound来转发udp的dns请求,好像结果是直接转发到目的dns ip而不是用内置dns查询的

v2配置文件

{
  "log": {
    "loglevel": "warning"
  },
  "dns": {
    "servers": [
      "223.5.5.5",
      "1.1.1.1",
      "localhost"
    ]
  },
  "inbounds": [
    {
      "port": 1090,
      "listen": "0.0.0.0",
      "protocol": "socks",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "udp": true
      },
      "tag": "SOCKS"
    }
  ],
  "outbounds": [
    {
      "protocol": "vmess",
      "settings": {
        "vnext": "*******"
      },
      "mux": {
        "enabled": true
      },
      "tag": "PROXY"
    },
    {
      "protocol": "dns",
      "tag": "DNS"
    },
    {
      "protocol": "freedom",
      "tag": "DIRECT"
    },
    {
      "protocol": "blackhole",
      "tag": "REJECT"
    }
  ],
  "routing": {
    "strategy": "rules",
    "settings": {
      "domainStrategy": "IPIfNonMatch",
      "rules": [
        {
          "type": "field",
          "domain": [
            "domain:google.com",
            "domain:youtube.com"
          ],
          "outboundTag": "PROXY"
        },
        {
          "type": "field",
          "domain": [
            "geosite:cn"
          ],
          "ip": [
            "geoip:cn"
          ],
          "outboundTag": "DIRECT"
        },
        {
          "type": "field",
          "ip": [
            "0.0.0.0/8",
            "10.0.0.0/8",
            "100.64.0.0/10",
            "127.0.0.0/8",
            "169.254.0.0/16",
            "172.16.0.0/12",
            "192.0.0.0/24",
            "192.0.2.0/24",
            "192.168.0.0/16",
            "198.18.0.0/15",
            "198.51.100.0/24",
            "203.0.113.0/24",
            "::1/128",
            "fc00::/7",
            "fe80::/10"
          ],
          "outboundTag": "DIRECT"
        }
      ]
    }
  }
}
@yuhuangniu
Copy link

这是客户端还是服务端啊?

@xjasonlyu
Copy link
Author

既是Client也是Server。V2Ray其实没什么实际的客户端服务端之分,都是一体的。

@xjasonlyu
Copy link
Author

这个Issue好久之前就解决了,也忘记关了。具体配置参照 -> V2Ray Steemit DNS及其应用

@ntgeralt
Copy link

现在全google只有2篇V2ray dns 出站协议文章,一篇这里一篇你列出的……想找几个例程观摩学习变得几乎不可行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants