What is the difference between detour and outbound in DNS?

Hello, everyone in the Project S Community.
I found the detour option for DNS Server and outbound option for DNS Rule, what is the difference between them?
In my opinion, the detour option can control the DNS Server’s outbound way(using dedicated proxy server). And outbound option can also control the DNS Server’s outbound way based on the rule.
However, in my actual use, I usually create a lot of DNS Server with different detour options and named them with “XXXdirect” “XXXproxy” which I can using them in the DNS Rule’s configuration because I found their is noway to control the “final” DNS Server’s outbound option with “outbound” option but the “detour” can do.
(PS: with the commit 4d086144a5d93acf26a14cbe7a3b539236f75603 I have to create a new selector with only “direct” outbound to use direct in detour)


Hello.

Outbound itself sometimes needs to use a DNS server. For example consider the following outbound:


        {
            "type": "direct",
            "tag": "google-safe-search",
            "override_address": "forcesafesearch.google.com",
            "domain_strategy": "prefer_ipv4"
        }

The outbound mentioned above needs to obtain the IP address of
forcesafesearch.google.com. This can be achieved by the following DNS rule:

{
    "dns": {
        "servers": [
            {
                "tag": "dns-google",
                "address": "udp://8.8.8.8",
                "detour": "direct"
            }
        ],
        "rules": [
            {
                "outbound": [
                    "google-safe-search"
                ],
                "server": "dns-google"
            }
        ],
        "final": "dns-google",
        "strategy": "ipv4_only"
    }
}