github.com/inazumav/sing-box@v0.0.0-20230926072359-ab51429a14f1/docs/configuration/dns/index.md (about)

     1  # DNS
     2  
     3  ### Structure
     4  
     5  ```json
     6  {
     7    "dns": {
     8      "servers": [],
     9      "rules": [],
    10      "final": "",
    11      "strategy": "",
    12      "disable_cache": false,
    13      "disable_expire": false,
    14      "independent_cache": false,
    15      "reverse_mapping": false,
    16      "fakeip": {}
    17    }
    18  }
    19  
    20  ```
    21  
    22  ### Fields
    23  
    24  | Key      | Format                         |
    25  |----------|--------------------------------|
    26  | `server` | List of [DNS Server](./server) |
    27  | `rules`  | List of [DNS Rule](./rule)     |
    28  | `fakeip` | [FakeIP](./fakeip)             |
    29  
    30  #### final
    31  
    32  Default dns server tag.
    33  
    34  The first server will be used if empty.
    35  
    36  #### strategy
    37  
    38  Default domain strategy for resolving the domain names.
    39  
    40  One of `prefer_ipv4` `prefer_ipv6` `ipv4_only` `ipv6_only`.
    41  
    42  Take no effect if `server.strategy` is set.
    43  
    44  #### disable_cache
    45  
    46  Disable dns cache.
    47  
    48  #### disable_expire
    49  
    50  Disable dns cache expire.
    51  
    52  #### independent_cache
    53  
    54  Make each DNS server's cache independent for special purposes. If enabled, will slightly degrade performance.
    55  
    56  #### reverse_mapping
    57  
    58  Stores a reverse mapping of IP addresses after responding to a DNS query in order to provide domain names when routing.
    59  
    60  Since this process relies on the act of resolving domain names by an application before making a request, it can be
    61  problematic in environments such as macOS, where DNS is proxied and cached by the system.
    62  
    63  #### fakeip
    64  
    65  [FakeIP](./fakeip) settings.