V2Fly.orgV2Fly.org
Quick Start
Config Reference
Config Reference (v5, WIP)
Tools
Developer Guide
New concise guide
  • 简体中文
  • English
GitHub
Quick Start
Config Reference
Config Reference (v5, WIP)
Tools
Developer Guide
New concise guide
  • 简体中文
  • English
GitHub
  • Config Reference

    • Configuration File Format
    • Environment variables
    • DNS Server
    • Routing
    • Policy
    • Inbounds
    • Outbounds
    • Transport
    • Remote control API
    • Stats
    • Reverse Proxy
    • Multiple config
    • "Fake" DNS server
    • Browserforwarder
    • Observatory
  • Protocols

    • Blackhole
    • DNS
      • OutboundConfigurationObject
    • Dokodemo-door
    • Freedom
    • HTTP
    • Socks
    • VMess
    • Shadowsocks
    • Trojan
    • VLESS
    • Loopback
    • Hysteria2
  • Transport

    • TCP
    • mKCP
    • WebSocket
    • HTTP/2
    • QUIC
    • DomainSocket
    • gRPC
    • Hysteria2
  • Service

    • Stats
    • Policy
    • Browser Forwarder
    • Burst Observatory
    • Background Observatory
    • Tun
    • Subscription Manager

DNS

  • Name: dns
  • Type: Outbound Protocol

DNS is an outbound protocol, mainly used to intercept and forward DNS queries. This outbound protocol can only receive DNS traffic (including queries based on UDP and TCP protocols), and other types of traffic will cause errors.

When processing DNS queries, this outbound protocol will forward IP queries (ie A and AAAA) to the built-in [DNS server] (../dns.md). Other types of query traffic will be forwarded to their original destination address.

DNS outbound protocol was introduced in V2Ray 4.15.

OutboundConfigurationObject

{
    "network": "tcp",
    "address": "1.1.1.1",
    "port": 53
}

network: "tcp" | "udp"

(V2Ray 4.16+) Modify the transport layer protocol of DNS traffic. The optional values are "tcp" and "udp". When not specified, the transmission mode of the source remains unchanged.

address: address

(V2Ray 4.16+) Modify the DNS server address. When not specified, keep the address specified in the source unchanged.

port: number

(V2Ray 4.16+) Modify the DNS server port. When not specified, keep the port specified in the source unchanged.

Edit this page on GitHub
Last Updated:
Contributors: transifex-integration[bot]
Prev
Blackhole
Next
Dokodemo-door