DNSConfig class abstract
- Available extensions
- Annotations
-
- @freezed
Constructors
-
DNSConfig({List<
NameServerConfig> ? servers, HostsWrapper? hosts, XrayAddress? clientIp, String? tag, DnsQueryStrategy? queryStrategy, bool? disableCache, bool? serveStale, int? serveExpiredTTL, bool? disableFallback, bool? disableFallbackIfMatch, bool? enableParallelQuery, bool? useSystemHosts}) -
constfactory
- DNSConfig.fromJson(Object? json)
-
factory
-
DNSConfig.withServers(List<
NameServerConfig> servers, {HostsWrapper? hosts, XrayAddress? clientIp, String? tag, DnsQueryStrategy? queryStrategy, bool? disableCache, bool? serveStale, int? serveExpiredTTL, bool? disableFallback, bool? disableFallbackIfMatch, bool? enableParallelQuery, bool? useSystemHosts}) -
factory
Properties
- clientIp → XrayAddress?
-
no setterinherited
-
copyWith
→ $DNSConfigCopyWith<
DNSConfig> -
Create a copy of DNSConfig
with the given fields replaced by the non-null parameter values.
no setterinherited
- disableCache → bool?
-
no setterinherited
- disableFallback → bool?
-
no setterinherited
- disableFallbackIfMatch → bool?
-
no setterinherited
- enableParallelQuery → bool?
-
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hosts → HostsWrapper?
-
no setterinherited
- queryStrategy → DnsQueryStrategy?
-
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serveExpiredTTL → int?
-
no setterinherited
-
servers
→ List<
NameServerConfig> ? -
no setterinherited
- serveStale → bool?
-
no setterinherited
- tag → String?
-
no setterinherited
- useSystemHosts → bool?
-
no setterinherited
Methods
-
map<
TResult extends Object?> (TResult $default(_DNSConfig value)) → TResult -
Available on DNSConfig, provided by the DNSConfigPatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_DNSConfig value)?) → TResult? -
Available on DNSConfig, provided by the DNSConfigPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_DNSConfig value)?, {required TResult orElse()}) → TResult -
Available on DNSConfig, provided by the DNSConfigPatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(List< NameServerConfig> ? servers, HostsWrapper? hosts, XrayAddress? clientIp, String? tag, DnsQueryStrategy? queryStrategy, bool? disableCache, bool? serveStale, int? serveExpiredTTL, bool? disableFallback, bool? disableFallbackIfMatch, bool? enableParallelQuery, bool? useSystemHosts)?, {required TResult orElse()}) → TResult -
Available on DNSConfig, provided by the DNSConfigPatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
-
when<
TResult extends Object?> (TResult $default(List< NameServerConfig> ? servers, HostsWrapper? hosts, XrayAddress? clientIp, String? tag, DnsQueryStrategy? queryStrategy, bool? disableCache, bool? serveStale, int? serveExpiredTTL, bool? disableFallback, bool? disableFallbackIfMatch, bool? enableParallelQuery, bool? useSystemHosts)) → TResult -
Available on DNSConfig, provided by the DNSConfigPatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(List< NameServerConfig> ? servers, HostsWrapper? hosts, XrayAddress? clientIp, String? tag, DnsQueryStrategy? queryStrategy, bool? disableCache, bool? serveStale, int? serveExpiredTTL, bool? disableFallback, bool? disableFallbackIfMatch, bool? enableParallelQuery, bool? useSystemHosts)?) → TResult? -
Available on DNSConfig, provided by the DNSConfigPatterns extension
A variant ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited