# Add the ability to set targetStrategy for Hosts

**URL:** https://f.docs.rw/t/topic/362
**Category:** Предложения
**Created:** 2026-07-05T17:54:44Z
**Posts:** 1

## Post 1 by @sha1024 — 2026-07-05T17:54:45Z

Please add the ability to set **targetStrategy** setting in **OutboundObject** for Hosts. I need to set FamilyShield DNS and some hosts in DNS config to forece google safe search on a subset of users but it wont work until I use targetStrategy.

> **[OutboundObject ​ - Outbound Proxy (Mux, XUDP) | Project X](https://xtls.github.io/en/config/outbound.html#outboundobject)**
>
> Outbound connections are used to send data. For available protocols, please see Outbound Protocols. | Xray-core

> <https://github.com/XTLS/Xray-core/pull/5006>
>
> The reason has already been discussed before: https://github.com/XTLS/Xray-core/…issues/4543, https://github.com/XTLS/Xray-core/issues/4335, https://github.com/XTLS/Xray-core/issues/4424
> 
> In summary, we can use trusted-client-side-built-in-dns to resolve final-target domain without using "dialerProxy" or "redirect-socks-in/out".
> 
> also, "dialerProxy" does not support cone and has some limitations, so this is not just a simplification and Xray-core is not "Turing-Complete" without this: https://github.com/XTLS/Xray-core/issues/4543#issuecomment-2751290738 (or maybe it is, with a super complex configuration)
> 
> ///
> 
> ```
> "outbounds": [
> {
> "tag": "proxy",
> "protocol": "any",
> "settings": {...},
> "targetStrategy": "ForceIP"
> }
> ]
> 
> ///
>   
> "targetStrategy": 
> "AsIs" --> no change, target resolved to IP in server-side
> "UseIP" | "UseIPv6v4" | "UseIPv6" | "UseIPv4v6" | "UseIPv4" --> target resolved to IP in client-side using buil-in-dns
> "ForceIP" | "ForceIPv6v4" | "ForceIPv6" | "ForceIPv4v6" | "ForceIPv4" --> no fallback to AsIs
> 
> ```
> ///
> 
> **Caution for users in doc:**
> 
> This strategy is for the final-target, which is transported by the proxy, While sockopt-DomainStrategy specifies the strategy for proxy-address itself.
> 
> also, this feature is only for when you have some **limitations** on server-side for example cloudflare-edge-worker(that cannot connect to cloudflare-ips)
> or when you need to use your own **trusted** -dns, or when you want to **prioritize** ipv6 to ipv4(or vice versa), or when you want to **save** DNS request on server side.
> In other cases, it is not recommended to use this feature and it is better to resolve the domain on the server side.
> ///
> also, this pr includes some small refines, and adding log and comments to other sections.
