Feat: [app/dns] Support per-client configuration (#1977)

* DNS: Support per-client configuration

* Add deprecated feature warnings for `skipFallback`, `disableCache`, `disableFallback`, `disableFallbackIfMatch`
This commit is contained in:
Vigilans
2022-11-30 08:43:39 +08:00
committed by GitHub
parent 291b5466de
commit d3b50bb989
7 changed files with 945 additions and 492 deletions
+12
View File
@@ -14,6 +14,18 @@ type IPOption struct {
FakeEnable bool
}
func (opt IPOption) With(other IPOption) IPOption {
return IPOption{
IPv4Enable: opt.IPv4Enable && other.IPv4Enable,
IPv6Enable: opt.IPv6Enable && other.IPv6Enable,
FakeEnable: opt.FakeEnable && other.FakeEnable,
}
}
func (opt IPOption) IsValid() bool {
return opt.IPv4Enable || opt.IPv6Enable
}
// Client is a V2Ray feature for querying DNS information.
//
// v2ray:api:stable