mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user