Score:0

Can't make v2ray to send DNS queries to its localhost

cy flag

There are two v2ray servers A and B with similar configurations but A works as an intermediary (vmess+websocket on both inbound and outboud) to reach B.

I want to make A to send incoming DNS queries to its localhost:53 where CoreDNS is listening on. How to do it?

I've done this in A:

...
    {
      "protocol": "dns",
      "tag": "dns_out",
      "settings": {
        "address": "localhost",
        "port": 53
      }
    }
  ],
  "dns": {
    "queryStrategy": "UseIPv4",
    "servers":["localhost"],
    "tag": "dns_inbound"}
  },
  "routing": {
        "domainStrategy": "IPOnDemand",
        "rules": [
            {
                "type": "field",
                "port": 53,
                "network": "tcp,udp",
                "outboundTag": "dns_out"
            }
        ]
  }
}

But why v2ray A always chooses the default route (of two routes: protocol vmess and protocol dns) and sends no DNS queries to CoreDNS on localhost:53?

Score:0
cy flag

The problem was an extra } where I specify tag for dns. And v2ray was fine with it, ignoring rest of it.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.