Add DNS override
Fixed some bugs Optimize more detail
This commit is contained in:
@@ -220,3 +220,818 @@ abstract class _Tun implements Tun {
|
||||
_$$TunImplCopyWith<_$TunImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
FallbackFilter _$FallbackFilterFromJson(Map<String, dynamic> json) {
|
||||
return _FallbackFilter.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$FallbackFilter {
|
||||
bool get geoip => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "geoip-code")
|
||||
String get geoipCode => throw _privateConstructorUsedError;
|
||||
List<String> get geosite => throw _privateConstructorUsedError;
|
||||
List<String> get ipcidr => throw _privateConstructorUsedError;
|
||||
List<String> get domain => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$FallbackFilterCopyWith<FallbackFilter> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FallbackFilterCopyWith<$Res> {
|
||||
factory $FallbackFilterCopyWith(
|
||||
FallbackFilter value, $Res Function(FallbackFilter) then) =
|
||||
_$FallbackFilterCopyWithImpl<$Res, FallbackFilter>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool geoip,
|
||||
@JsonKey(name: "geoip-code") String geoipCode,
|
||||
List<String> geosite,
|
||||
List<String> ipcidr,
|
||||
List<String> domain});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FallbackFilterCopyWithImpl<$Res, $Val extends FallbackFilter>
|
||||
implements $FallbackFilterCopyWith<$Res> {
|
||||
_$FallbackFilterCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? geoip = null,
|
||||
Object? geoipCode = null,
|
||||
Object? geosite = null,
|
||||
Object? ipcidr = null,
|
||||
Object? domain = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
geoip: null == geoip
|
||||
? _value.geoip
|
||||
: geoip // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
geoipCode: null == geoipCode
|
||||
? _value.geoipCode
|
||||
: geoipCode // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
geosite: null == geosite
|
||||
? _value.geosite
|
||||
: geosite // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
ipcidr: null == ipcidr
|
||||
? _value.ipcidr
|
||||
: ipcidr // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
domain: null == domain
|
||||
? _value.domain
|
||||
: domain // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FallbackFilterImplCopyWith<$Res>
|
||||
implements $FallbackFilterCopyWith<$Res> {
|
||||
factory _$$FallbackFilterImplCopyWith(_$FallbackFilterImpl value,
|
||||
$Res Function(_$FallbackFilterImpl) then) =
|
||||
__$$FallbackFilterImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool geoip,
|
||||
@JsonKey(name: "geoip-code") String geoipCode,
|
||||
List<String> geosite,
|
||||
List<String> ipcidr,
|
||||
List<String> domain});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FallbackFilterImplCopyWithImpl<$Res>
|
||||
extends _$FallbackFilterCopyWithImpl<$Res, _$FallbackFilterImpl>
|
||||
implements _$$FallbackFilterImplCopyWith<$Res> {
|
||||
__$$FallbackFilterImplCopyWithImpl(
|
||||
_$FallbackFilterImpl _value, $Res Function(_$FallbackFilterImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? geoip = null,
|
||||
Object? geoipCode = null,
|
||||
Object? geosite = null,
|
||||
Object? ipcidr = null,
|
||||
Object? domain = null,
|
||||
}) {
|
||||
return _then(_$FallbackFilterImpl(
|
||||
geoip: null == geoip
|
||||
? _value.geoip
|
||||
: geoip // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
geoipCode: null == geoipCode
|
||||
? _value.geoipCode
|
||||
: geoipCode // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
geosite: null == geosite
|
||||
? _value._geosite
|
||||
: geosite // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
ipcidr: null == ipcidr
|
||||
? _value._ipcidr
|
||||
: ipcidr // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
domain: null == domain
|
||||
? _value._domain
|
||||
: domain // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$FallbackFilterImpl implements _FallbackFilter {
|
||||
const _$FallbackFilterImpl(
|
||||
{this.geoip = true,
|
||||
@JsonKey(name: "geoip-code") this.geoipCode = "CN",
|
||||
final List<String> geosite = const ["gfw"],
|
||||
final List<String> ipcidr = const ["240.0.0.0/4"],
|
||||
final List<String> domain = const [
|
||||
"+.google.com",
|
||||
"+.facebook.com",
|
||||
"+.youtube.com"
|
||||
]})
|
||||
: _geosite = geosite,
|
||||
_ipcidr = ipcidr,
|
||||
_domain = domain;
|
||||
|
||||
factory _$FallbackFilterImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$FallbackFilterImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool geoip;
|
||||
@override
|
||||
@JsonKey(name: "geoip-code")
|
||||
final String geoipCode;
|
||||
final List<String> _geosite;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<String> get geosite {
|
||||
if (_geosite is EqualUnmodifiableListView) return _geosite;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_geosite);
|
||||
}
|
||||
|
||||
final List<String> _ipcidr;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<String> get ipcidr {
|
||||
if (_ipcidr is EqualUnmodifiableListView) return _ipcidr;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_ipcidr);
|
||||
}
|
||||
|
||||
final List<String> _domain;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<String> get domain {
|
||||
if (_domain is EqualUnmodifiableListView) return _domain;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_domain);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'FallbackFilter(geoip: $geoip, geoipCode: $geoipCode, geosite: $geosite, ipcidr: $ipcidr, domain: $domain)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FallbackFilterImpl &&
|
||||
(identical(other.geoip, geoip) || other.geoip == geoip) &&
|
||||
(identical(other.geoipCode, geoipCode) ||
|
||||
other.geoipCode == geoipCode) &&
|
||||
const DeepCollectionEquality().equals(other._geosite, _geosite) &&
|
||||
const DeepCollectionEquality().equals(other._ipcidr, _ipcidr) &&
|
||||
const DeepCollectionEquality().equals(other._domain, _domain));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
geoip,
|
||||
geoipCode,
|
||||
const DeepCollectionEquality().hash(_geosite),
|
||||
const DeepCollectionEquality().hash(_ipcidr),
|
||||
const DeepCollectionEquality().hash(_domain));
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FallbackFilterImplCopyWith<_$FallbackFilterImpl> get copyWith =>
|
||||
__$$FallbackFilterImplCopyWithImpl<_$FallbackFilterImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$FallbackFilterImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _FallbackFilter implements FallbackFilter {
|
||||
const factory _FallbackFilter(
|
||||
{final bool geoip,
|
||||
@JsonKey(name: "geoip-code") final String geoipCode,
|
||||
final List<String> geosite,
|
||||
final List<String> ipcidr,
|
||||
final List<String> domain}) = _$FallbackFilterImpl;
|
||||
|
||||
factory _FallbackFilter.fromJson(Map<String, dynamic> json) =
|
||||
_$FallbackFilterImpl.fromJson;
|
||||
|
||||
@override
|
||||
bool get geoip;
|
||||
@override
|
||||
@JsonKey(name: "geoip-code")
|
||||
String get geoipCode;
|
||||
@override
|
||||
List<String> get geosite;
|
||||
@override
|
||||
List<String> get ipcidr;
|
||||
@override
|
||||
List<String> get domain;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$FallbackFilterImplCopyWith<_$FallbackFilterImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Dns _$DnsFromJson(Map<String, dynamic> json) {
|
||||
return _Dns.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Dns {
|
||||
bool get enable => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "prefer-h3")
|
||||
bool get preferH3 => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "use-hosts")
|
||||
bool get useHosts => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "use-system-hosts")
|
||||
bool get useSystemHosts => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "respect-rules")
|
||||
bool get respectRules => throw _privateConstructorUsedError;
|
||||
bool get ipv6 => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "default-nameserver")
|
||||
List<String> get defaultNameserver => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "enhanced-mode")
|
||||
DnsMode get enhancedMode => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "fake-ip-range")
|
||||
String get fakeIpRange => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "fake-ip-filter")
|
||||
List<String> get fakeIpFilter => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "nameserver-policy")
|
||||
Map<String, String> get nameserverPolicy =>
|
||||
throw _privateConstructorUsedError;
|
||||
List<String> get nameserver => throw _privateConstructorUsedError;
|
||||
List<String> get fallback => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "proxy-server-nameserver")
|
||||
List<String> get proxyServerNameserver => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "fallback-filter")
|
||||
FallbackFilter get fallbackFilter => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$DnsCopyWith<Dns> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DnsCopyWith<$Res> {
|
||||
factory $DnsCopyWith(Dns value, $Res Function(Dns) then) =
|
||||
_$DnsCopyWithImpl<$Res, Dns>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool enable,
|
||||
@JsonKey(name: "prefer-h3") bool preferH3,
|
||||
@JsonKey(name: "use-hosts") bool useHosts,
|
||||
@JsonKey(name: "use-system-hosts") bool useSystemHosts,
|
||||
@JsonKey(name: "respect-rules") bool respectRules,
|
||||
bool ipv6,
|
||||
@JsonKey(name: "default-nameserver") List<String> defaultNameserver,
|
||||
@JsonKey(name: "enhanced-mode") DnsMode enhancedMode,
|
||||
@JsonKey(name: "fake-ip-range") String fakeIpRange,
|
||||
@JsonKey(name: "fake-ip-filter") List<String> fakeIpFilter,
|
||||
@JsonKey(name: "nameserver-policy") Map<String, String> nameserverPolicy,
|
||||
List<String> nameserver,
|
||||
List<String> fallback,
|
||||
@JsonKey(name: "proxy-server-nameserver")
|
||||
List<String> proxyServerNameserver,
|
||||
@JsonKey(name: "fallback-filter") FallbackFilter fallbackFilter});
|
||||
|
||||
$FallbackFilterCopyWith<$Res> get fallbackFilter;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DnsCopyWithImpl<$Res, $Val extends Dns> implements $DnsCopyWith<$Res> {
|
||||
_$DnsCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? enable = null,
|
||||
Object? preferH3 = null,
|
||||
Object? useHosts = null,
|
||||
Object? useSystemHosts = null,
|
||||
Object? respectRules = null,
|
||||
Object? ipv6 = null,
|
||||
Object? defaultNameserver = null,
|
||||
Object? enhancedMode = null,
|
||||
Object? fakeIpRange = null,
|
||||
Object? fakeIpFilter = null,
|
||||
Object? nameserverPolicy = null,
|
||||
Object? nameserver = null,
|
||||
Object? fallback = null,
|
||||
Object? proxyServerNameserver = null,
|
||||
Object? fallbackFilter = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
enable: null == enable
|
||||
? _value.enable
|
||||
: enable // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
preferH3: null == preferH3
|
||||
? _value.preferH3
|
||||
: preferH3 // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
useHosts: null == useHosts
|
||||
? _value.useHosts
|
||||
: useHosts // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
useSystemHosts: null == useSystemHosts
|
||||
? _value.useSystemHosts
|
||||
: useSystemHosts // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
respectRules: null == respectRules
|
||||
? _value.respectRules
|
||||
: respectRules // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
ipv6: null == ipv6
|
||||
? _value.ipv6
|
||||
: ipv6 // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
defaultNameserver: null == defaultNameserver
|
||||
? _value.defaultNameserver
|
||||
: defaultNameserver // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
enhancedMode: null == enhancedMode
|
||||
? _value.enhancedMode
|
||||
: enhancedMode // ignore: cast_nullable_to_non_nullable
|
||||
as DnsMode,
|
||||
fakeIpRange: null == fakeIpRange
|
||||
? _value.fakeIpRange
|
||||
: fakeIpRange // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
fakeIpFilter: null == fakeIpFilter
|
||||
? _value.fakeIpFilter
|
||||
: fakeIpFilter // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
nameserverPolicy: null == nameserverPolicy
|
||||
? _value.nameserverPolicy
|
||||
: nameserverPolicy // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, String>,
|
||||
nameserver: null == nameserver
|
||||
? _value.nameserver
|
||||
: nameserver // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
fallback: null == fallback
|
||||
? _value.fallback
|
||||
: fallback // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
proxyServerNameserver: null == proxyServerNameserver
|
||||
? _value.proxyServerNameserver
|
||||
: proxyServerNameserver // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
fallbackFilter: null == fallbackFilter
|
||||
? _value.fallbackFilter
|
||||
: fallbackFilter // ignore: cast_nullable_to_non_nullable
|
||||
as FallbackFilter,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$FallbackFilterCopyWith<$Res> get fallbackFilter {
|
||||
return $FallbackFilterCopyWith<$Res>(_value.fallbackFilter, (value) {
|
||||
return _then(_value.copyWith(fallbackFilter: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DnsImplCopyWith<$Res> implements $DnsCopyWith<$Res> {
|
||||
factory _$$DnsImplCopyWith(_$DnsImpl value, $Res Function(_$DnsImpl) then) =
|
||||
__$$DnsImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool enable,
|
||||
@JsonKey(name: "prefer-h3") bool preferH3,
|
||||
@JsonKey(name: "use-hosts") bool useHosts,
|
||||
@JsonKey(name: "use-system-hosts") bool useSystemHosts,
|
||||
@JsonKey(name: "respect-rules") bool respectRules,
|
||||
bool ipv6,
|
||||
@JsonKey(name: "default-nameserver") List<String> defaultNameserver,
|
||||
@JsonKey(name: "enhanced-mode") DnsMode enhancedMode,
|
||||
@JsonKey(name: "fake-ip-range") String fakeIpRange,
|
||||
@JsonKey(name: "fake-ip-filter") List<String> fakeIpFilter,
|
||||
@JsonKey(name: "nameserver-policy") Map<String, String> nameserverPolicy,
|
||||
List<String> nameserver,
|
||||
List<String> fallback,
|
||||
@JsonKey(name: "proxy-server-nameserver")
|
||||
List<String> proxyServerNameserver,
|
||||
@JsonKey(name: "fallback-filter") FallbackFilter fallbackFilter});
|
||||
|
||||
@override
|
||||
$FallbackFilterCopyWith<$Res> get fallbackFilter;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DnsImplCopyWithImpl<$Res> extends _$DnsCopyWithImpl<$Res, _$DnsImpl>
|
||||
implements _$$DnsImplCopyWith<$Res> {
|
||||
__$$DnsImplCopyWithImpl(_$DnsImpl _value, $Res Function(_$DnsImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? enable = null,
|
||||
Object? preferH3 = null,
|
||||
Object? useHosts = null,
|
||||
Object? useSystemHosts = null,
|
||||
Object? respectRules = null,
|
||||
Object? ipv6 = null,
|
||||
Object? defaultNameserver = null,
|
||||
Object? enhancedMode = null,
|
||||
Object? fakeIpRange = null,
|
||||
Object? fakeIpFilter = null,
|
||||
Object? nameserverPolicy = null,
|
||||
Object? nameserver = null,
|
||||
Object? fallback = null,
|
||||
Object? proxyServerNameserver = null,
|
||||
Object? fallbackFilter = null,
|
||||
}) {
|
||||
return _then(_$DnsImpl(
|
||||
enable: null == enable
|
||||
? _value.enable
|
||||
: enable // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
preferH3: null == preferH3
|
||||
? _value.preferH3
|
||||
: preferH3 // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
useHosts: null == useHosts
|
||||
? _value.useHosts
|
||||
: useHosts // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
useSystemHosts: null == useSystemHosts
|
||||
? _value.useSystemHosts
|
||||
: useSystemHosts // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
respectRules: null == respectRules
|
||||
? _value.respectRules
|
||||
: respectRules // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
ipv6: null == ipv6
|
||||
? _value.ipv6
|
||||
: ipv6 // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
defaultNameserver: null == defaultNameserver
|
||||
? _value._defaultNameserver
|
||||
: defaultNameserver // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
enhancedMode: null == enhancedMode
|
||||
? _value.enhancedMode
|
||||
: enhancedMode // ignore: cast_nullable_to_non_nullable
|
||||
as DnsMode,
|
||||
fakeIpRange: null == fakeIpRange
|
||||
? _value.fakeIpRange
|
||||
: fakeIpRange // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
fakeIpFilter: null == fakeIpFilter
|
||||
? _value._fakeIpFilter
|
||||
: fakeIpFilter // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
nameserverPolicy: null == nameserverPolicy
|
||||
? _value._nameserverPolicy
|
||||
: nameserverPolicy // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, String>,
|
||||
nameserver: null == nameserver
|
||||
? _value._nameserver
|
||||
: nameserver // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
fallback: null == fallback
|
||||
? _value._fallback
|
||||
: fallback // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
proxyServerNameserver: null == proxyServerNameserver
|
||||
? _value._proxyServerNameserver
|
||||
: proxyServerNameserver // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
fallbackFilter: null == fallbackFilter
|
||||
? _value.fallbackFilter
|
||||
: fallbackFilter // ignore: cast_nullable_to_non_nullable
|
||||
as FallbackFilter,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$DnsImpl implements _Dns {
|
||||
const _$DnsImpl(
|
||||
{this.enable = true,
|
||||
@JsonKey(name: "prefer-h3") this.preferH3 = false,
|
||||
@JsonKey(name: "use-hosts") this.useHosts = true,
|
||||
@JsonKey(name: "use-system-hosts") this.useSystemHosts = true,
|
||||
@JsonKey(name: "respect-rules") this.respectRules = true,
|
||||
this.ipv6 = false,
|
||||
@JsonKey(name: "default-nameserver")
|
||||
final List<String> defaultNameserver = const ["223.5.5.5"],
|
||||
@JsonKey(name: "enhanced-mode") this.enhancedMode = DnsMode.fakeIp,
|
||||
@JsonKey(name: "fake-ip-range") this.fakeIpRange = "198.18.0.1/16",
|
||||
@JsonKey(name: "fake-ip-filter") final List<String> fakeIpFilter = const [
|
||||
"*.lan",
|
||||
"localhost.ptlogin2.qq.com"
|
||||
],
|
||||
@JsonKey(name: "nameserver-policy")
|
||||
final Map<String, String> nameserverPolicy = const {
|
||||
"www.baidu.com": "114.114.114.114",
|
||||
"+.internal.crop.com": "10.0.0.1",
|
||||
"geosite:cn": "https://doh.pub/dns-query"
|
||||
},
|
||||
final List<String> nameserver = const [
|
||||
"https://doh.pub/dns-query",
|
||||
"https://dns.alidns.com/dns-query"
|
||||
],
|
||||
final List<String> fallback = const ["tls://8.8.4.4", "tls://1.1.1.1"],
|
||||
@JsonKey(name: "proxy-server-nameserver")
|
||||
final List<String> proxyServerNameserver = const [
|
||||
"https://doh.pub/dns-query"
|
||||
],
|
||||
@JsonKey(name: "fallback-filter")
|
||||
this.fallbackFilter = const FallbackFilter()})
|
||||
: _defaultNameserver = defaultNameserver,
|
||||
_fakeIpFilter = fakeIpFilter,
|
||||
_nameserverPolicy = nameserverPolicy,
|
||||
_nameserver = nameserver,
|
||||
_fallback = fallback,
|
||||
_proxyServerNameserver = proxyServerNameserver;
|
||||
|
||||
factory _$DnsImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DnsImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool enable;
|
||||
@override
|
||||
@JsonKey(name: "prefer-h3")
|
||||
final bool preferH3;
|
||||
@override
|
||||
@JsonKey(name: "use-hosts")
|
||||
final bool useHosts;
|
||||
@override
|
||||
@JsonKey(name: "use-system-hosts")
|
||||
final bool useSystemHosts;
|
||||
@override
|
||||
@JsonKey(name: "respect-rules")
|
||||
final bool respectRules;
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool ipv6;
|
||||
final List<String> _defaultNameserver;
|
||||
@override
|
||||
@JsonKey(name: "default-nameserver")
|
||||
List<String> get defaultNameserver {
|
||||
if (_defaultNameserver is EqualUnmodifiableListView)
|
||||
return _defaultNameserver;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_defaultNameserver);
|
||||
}
|
||||
|
||||
@override
|
||||
@JsonKey(name: "enhanced-mode")
|
||||
final DnsMode enhancedMode;
|
||||
@override
|
||||
@JsonKey(name: "fake-ip-range")
|
||||
final String fakeIpRange;
|
||||
final List<String> _fakeIpFilter;
|
||||
@override
|
||||
@JsonKey(name: "fake-ip-filter")
|
||||
List<String> get fakeIpFilter {
|
||||
if (_fakeIpFilter is EqualUnmodifiableListView) return _fakeIpFilter;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_fakeIpFilter);
|
||||
}
|
||||
|
||||
final Map<String, String> _nameserverPolicy;
|
||||
@override
|
||||
@JsonKey(name: "nameserver-policy")
|
||||
Map<String, String> get nameserverPolicy {
|
||||
if (_nameserverPolicy is EqualUnmodifiableMapView) return _nameserverPolicy;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableMapView(_nameserverPolicy);
|
||||
}
|
||||
|
||||
final List<String> _nameserver;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<String> get nameserver {
|
||||
if (_nameserver is EqualUnmodifiableListView) return _nameserver;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_nameserver);
|
||||
}
|
||||
|
||||
final List<String> _fallback;
|
||||
@override
|
||||
@JsonKey()
|
||||
List<String> get fallback {
|
||||
if (_fallback is EqualUnmodifiableListView) return _fallback;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_fallback);
|
||||
}
|
||||
|
||||
final List<String> _proxyServerNameserver;
|
||||
@override
|
||||
@JsonKey(name: "proxy-server-nameserver")
|
||||
List<String> get proxyServerNameserver {
|
||||
if (_proxyServerNameserver is EqualUnmodifiableListView)
|
||||
return _proxyServerNameserver;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_proxyServerNameserver);
|
||||
}
|
||||
|
||||
@override
|
||||
@JsonKey(name: "fallback-filter")
|
||||
final FallbackFilter fallbackFilter;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Dns(enable: $enable, preferH3: $preferH3, useHosts: $useHosts, useSystemHosts: $useSystemHosts, respectRules: $respectRules, ipv6: $ipv6, defaultNameserver: $defaultNameserver, enhancedMode: $enhancedMode, fakeIpRange: $fakeIpRange, fakeIpFilter: $fakeIpFilter, nameserverPolicy: $nameserverPolicy, nameserver: $nameserver, fallback: $fallback, proxyServerNameserver: $proxyServerNameserver, fallbackFilter: $fallbackFilter)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DnsImpl &&
|
||||
(identical(other.enable, enable) || other.enable == enable) &&
|
||||
(identical(other.preferH3, preferH3) ||
|
||||
other.preferH3 == preferH3) &&
|
||||
(identical(other.useHosts, useHosts) ||
|
||||
other.useHosts == useHosts) &&
|
||||
(identical(other.useSystemHosts, useSystemHosts) ||
|
||||
other.useSystemHosts == useSystemHosts) &&
|
||||
(identical(other.respectRules, respectRules) ||
|
||||
other.respectRules == respectRules) &&
|
||||
(identical(other.ipv6, ipv6) || other.ipv6 == ipv6) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._defaultNameserver, _defaultNameserver) &&
|
||||
(identical(other.enhancedMode, enhancedMode) ||
|
||||
other.enhancedMode == enhancedMode) &&
|
||||
(identical(other.fakeIpRange, fakeIpRange) ||
|
||||
other.fakeIpRange == fakeIpRange) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._fakeIpFilter, _fakeIpFilter) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._nameserverPolicy, _nameserverPolicy) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._nameserver, _nameserver) &&
|
||||
const DeepCollectionEquality().equals(other._fallback, _fallback) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._proxyServerNameserver, _proxyServerNameserver) &&
|
||||
(identical(other.fallbackFilter, fallbackFilter) ||
|
||||
other.fallbackFilter == fallbackFilter));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
enable,
|
||||
preferH3,
|
||||
useHosts,
|
||||
useSystemHosts,
|
||||
respectRules,
|
||||
ipv6,
|
||||
const DeepCollectionEquality().hash(_defaultNameserver),
|
||||
enhancedMode,
|
||||
fakeIpRange,
|
||||
const DeepCollectionEquality().hash(_fakeIpFilter),
|
||||
const DeepCollectionEquality().hash(_nameserverPolicy),
|
||||
const DeepCollectionEquality().hash(_nameserver),
|
||||
const DeepCollectionEquality().hash(_fallback),
|
||||
const DeepCollectionEquality().hash(_proxyServerNameserver),
|
||||
fallbackFilter);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DnsImplCopyWith<_$DnsImpl> get copyWith =>
|
||||
__$$DnsImplCopyWithImpl<_$DnsImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$DnsImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Dns implements Dns {
|
||||
const factory _Dns(
|
||||
{final bool enable,
|
||||
@JsonKey(name: "prefer-h3") final bool preferH3,
|
||||
@JsonKey(name: "use-hosts") final bool useHosts,
|
||||
@JsonKey(name: "use-system-hosts") final bool useSystemHosts,
|
||||
@JsonKey(name: "respect-rules") final bool respectRules,
|
||||
final bool ipv6,
|
||||
@JsonKey(name: "default-nameserver") final List<String> defaultNameserver,
|
||||
@JsonKey(name: "enhanced-mode") final DnsMode enhancedMode,
|
||||
@JsonKey(name: "fake-ip-range") final String fakeIpRange,
|
||||
@JsonKey(name: "fake-ip-filter") final List<String> fakeIpFilter,
|
||||
@JsonKey(name: "nameserver-policy")
|
||||
final Map<String, String> nameserverPolicy,
|
||||
final List<String> nameserver,
|
||||
final List<String> fallback,
|
||||
@JsonKey(name: "proxy-server-nameserver")
|
||||
final List<String> proxyServerNameserver,
|
||||
@JsonKey(name: "fallback-filter")
|
||||
final FallbackFilter fallbackFilter}) = _$DnsImpl;
|
||||
|
||||
factory _Dns.fromJson(Map<String, dynamic> json) = _$DnsImpl.fromJson;
|
||||
|
||||
@override
|
||||
bool get enable;
|
||||
@override
|
||||
@JsonKey(name: "prefer-h3")
|
||||
bool get preferH3;
|
||||
@override
|
||||
@JsonKey(name: "use-hosts")
|
||||
bool get useHosts;
|
||||
@override
|
||||
@JsonKey(name: "use-system-hosts")
|
||||
bool get useSystemHosts;
|
||||
@override
|
||||
@JsonKey(name: "respect-rules")
|
||||
bool get respectRules;
|
||||
@override
|
||||
bool get ipv6;
|
||||
@override
|
||||
@JsonKey(name: "default-nameserver")
|
||||
List<String> get defaultNameserver;
|
||||
@override
|
||||
@JsonKey(name: "enhanced-mode")
|
||||
DnsMode get enhancedMode;
|
||||
@override
|
||||
@JsonKey(name: "fake-ip-range")
|
||||
String get fakeIpRange;
|
||||
@override
|
||||
@JsonKey(name: "fake-ip-filter")
|
||||
List<String> get fakeIpFilter;
|
||||
@override
|
||||
@JsonKey(name: "nameserver-policy")
|
||||
Map<String, String> get nameserverPolicy;
|
||||
@override
|
||||
List<String> get nameserver;
|
||||
@override
|
||||
List<String> get fallback;
|
||||
@override
|
||||
@JsonKey(name: "proxy-server-nameserver")
|
||||
List<String> get proxyServerNameserver;
|
||||
@override
|
||||
@JsonKey(name: "fallback-filter")
|
||||
FallbackFilter get fallbackFilter;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$DnsImplCopyWith<_$DnsImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,35 +6,6 @@ part of '../clash_config.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
Dns _$DnsFromJson(Map<String, dynamic> json) => Dns()
|
||||
..enable = json['enable'] as bool
|
||||
..ipv6 = json['ipv6'] as bool
|
||||
..defaultNameserver = (json['default-nameserver'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList()
|
||||
..enhancedMode = json['enhanced-mode'] as String
|
||||
..fakeIpRange = json['fake-ip-range'] as String
|
||||
..useHosts = json['use-hosts'] as bool
|
||||
..nameserver =
|
||||
(json['nameserver'] as List<dynamic>).map((e) => e as String).toList()
|
||||
..fallback =
|
||||
(json['fallback'] as List<dynamic>).map((e) => e as String).toList()
|
||||
..fakeIpFilter = (json['fake-ip-filter'] as List<dynamic>)
|
||||
.map((e) => e as String)
|
||||
.toList();
|
||||
|
||||
Map<String, dynamic> _$DnsToJson(Dns instance) => <String, dynamic>{
|
||||
'enable': instance.enable,
|
||||
'ipv6': instance.ipv6,
|
||||
'default-nameserver': instance.defaultNameserver,
|
||||
'enhanced-mode': instance.enhancedMode,
|
||||
'fake-ip-range': instance.fakeIpRange,
|
||||
'use-hosts': instance.useHosts,
|
||||
'nameserver': instance.nameserver,
|
||||
'fallback': instance.fallback,
|
||||
'fake-ip-filter': instance.fakeIpFilter,
|
||||
};
|
||||
|
||||
ClashConfig _$ClashConfigFromJson(Map<String, dynamic> json) => ClashConfig()
|
||||
..mixedPort = (json['mixed-port'] as num?)?.toInt() ?? 7890
|
||||
..mode = $enumDecodeNullable(_$ModeEnumMap, json['mode']) ?? Mode.rule
|
||||
@@ -51,7 +22,7 @@ ClashConfig _$ClashConfigFromJson(Map<String, dynamic> json) => ClashConfig()
|
||||
..unifiedDelay = json['unified-delay'] as bool? ?? false
|
||||
..tcpConcurrent = json['tcp-concurrent'] as bool? ?? false
|
||||
..tun = Tun.fromJson(json['tun'] as Map<String, dynamic>)
|
||||
..dns = Dns.fromJson(json['dns'] as Map<String, dynamic>)
|
||||
..dns = Dns.safeDnsFromJson(json['dns'] as Map<String, Object?>)
|
||||
..rules = (json['rules'] as List<dynamic>).map((e) => e as String).toList()
|
||||
..globalRealUa = json['global-real-ua'] as String?
|
||||
..geoXUrl = (json['geox-url'] as Map<String, dynamic>?)?.map(
|
||||
@@ -136,3 +107,105 @@ const _$TunStackEnumMap = {
|
||||
TunStack.system: 'system',
|
||||
TunStack.mixed: 'mixed',
|
||||
};
|
||||
|
||||
_$FallbackFilterImpl _$$FallbackFilterImplFromJson(Map<String, dynamic> json) =>
|
||||
_$FallbackFilterImpl(
|
||||
geoip: json['geoip'] as bool? ?? true,
|
||||
geoipCode: json['geoip-code'] as String? ?? "CN",
|
||||
geosite: (json['geosite'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const ["gfw"],
|
||||
ipcidr: (json['ipcidr'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const ["240.0.0.0/4"],
|
||||
domain: (json['domain'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const ["+.google.com", "+.facebook.com", "+.youtube.com"],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FallbackFilterImplToJson(
|
||||
_$FallbackFilterImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'geoip': instance.geoip,
|
||||
'geoip-code': instance.geoipCode,
|
||||
'geosite': instance.geosite,
|
||||
'ipcidr': instance.ipcidr,
|
||||
'domain': instance.domain,
|
||||
};
|
||||
|
||||
_$DnsImpl _$$DnsImplFromJson(Map<String, dynamic> json) => _$DnsImpl(
|
||||
enable: json['enable'] as bool? ?? true,
|
||||
preferH3: json['prefer-h3'] as bool? ?? false,
|
||||
useHosts: json['use-hosts'] as bool? ?? true,
|
||||
useSystemHosts: json['use-system-hosts'] as bool? ?? true,
|
||||
respectRules: json['respect-rules'] as bool? ?? true,
|
||||
ipv6: json['ipv6'] as bool? ?? false,
|
||||
defaultNameserver: (json['default-nameserver'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const ["223.5.5.5"],
|
||||
enhancedMode:
|
||||
$enumDecodeNullable(_$DnsModeEnumMap, json['enhanced-mode']) ??
|
||||
DnsMode.fakeIp,
|
||||
fakeIpRange: json['fake-ip-range'] as String? ?? "198.18.0.1/16",
|
||||
fakeIpFilter: (json['fake-ip-filter'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const ["*.lan", "localhost.ptlogin2.qq.com"],
|
||||
nameserverPolicy:
|
||||
(json['nameserver-policy'] as Map<String, dynamic>?)?.map(
|
||||
(k, e) => MapEntry(k, e as String),
|
||||
) ??
|
||||
const {
|
||||
"www.baidu.com": "114.114.114.114",
|
||||
"+.internal.crop.com": "10.0.0.1",
|
||||
"geosite:cn": "https://doh.pub/dns-query"
|
||||
},
|
||||
nameserver: (json['nameserver'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const [
|
||||
"https://doh.pub/dns-query",
|
||||
"https://dns.alidns.com/dns-query"
|
||||
],
|
||||
fallback: (json['fallback'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const ["tls://8.8.4.4", "tls://1.1.1.1"],
|
||||
proxyServerNameserver: (json['proxy-server-nameserver'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList() ??
|
||||
const ["https://doh.pub/dns-query"],
|
||||
fallbackFilter: json['fallback-filter'] == null
|
||||
? const FallbackFilter()
|
||||
: FallbackFilter.fromJson(
|
||||
json['fallback-filter'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DnsImplToJson(_$DnsImpl instance) => <String, dynamic>{
|
||||
'enable': instance.enable,
|
||||
'prefer-h3': instance.preferH3,
|
||||
'use-hosts': instance.useHosts,
|
||||
'use-system-hosts': instance.useSystemHosts,
|
||||
'respect-rules': instance.respectRules,
|
||||
'ipv6': instance.ipv6,
|
||||
'default-nameserver': instance.defaultNameserver,
|
||||
'enhanced-mode': _$DnsModeEnumMap[instance.enhancedMode]!,
|
||||
'fake-ip-range': instance.fakeIpRange,
|
||||
'fake-ip-filter': instance.fakeIpFilter,
|
||||
'nameserver-policy': instance.nameserverPolicy,
|
||||
'nameserver': instance.nameserver,
|
||||
'fallback': instance.fallback,
|
||||
'proxy-server-nameserver': instance.proxyServerNameserver,
|
||||
'fallback-filter': instance.fallbackFilter,
|
||||
};
|
||||
|
||||
const _$DnsModeEnumMap = {
|
||||
DnsMode.normal: 'normal',
|
||||
DnsMode.fakeIp: 'fake-ip',
|
||||
DnsMode.redirHost: 'redir-host',
|
||||
DnsMode.hosts: 'hosts',
|
||||
};
|
||||
|
||||
@@ -552,6 +552,189 @@ abstract class _CoreState implements CoreState {
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
VPNState _$VPNStateFromJson(Map<String, dynamic> json) {
|
||||
return _VPNState.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$VPNState {
|
||||
AccessControl? get accessControl => throw _privateConstructorUsedError;
|
||||
VpnProps get vpnProps => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@JsonKey(ignore: true)
|
||||
$VPNStateCopyWith<VPNState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $VPNStateCopyWith<$Res> {
|
||||
factory $VPNStateCopyWith(VPNState value, $Res Function(VPNState) then) =
|
||||
_$VPNStateCopyWithImpl<$Res, VPNState>;
|
||||
@useResult
|
||||
$Res call({AccessControl? accessControl, VpnProps vpnProps});
|
||||
|
||||
$AccessControlCopyWith<$Res>? get accessControl;
|
||||
$VpnPropsCopyWith<$Res> get vpnProps;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$VPNStateCopyWithImpl<$Res, $Val extends VPNState>
|
||||
implements $VPNStateCopyWith<$Res> {
|
||||
_$VPNStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? accessControl = freezed,
|
||||
Object? vpnProps = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
accessControl: freezed == accessControl
|
||||
? _value.accessControl
|
||||
: accessControl // ignore: cast_nullable_to_non_nullable
|
||||
as AccessControl?,
|
||||
vpnProps: null == vpnProps
|
||||
? _value.vpnProps
|
||||
: vpnProps // ignore: cast_nullable_to_non_nullable
|
||||
as VpnProps,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$AccessControlCopyWith<$Res>? get accessControl {
|
||||
if (_value.accessControl == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $AccessControlCopyWith<$Res>(_value.accessControl!, (value) {
|
||||
return _then(_value.copyWith(accessControl: value) as $Val);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$VpnPropsCopyWith<$Res> get vpnProps {
|
||||
return $VpnPropsCopyWith<$Res>(_value.vpnProps, (value) {
|
||||
return _then(_value.copyWith(vpnProps: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$VPNStateImplCopyWith<$Res>
|
||||
implements $VPNStateCopyWith<$Res> {
|
||||
factory _$$VPNStateImplCopyWith(
|
||||
_$VPNStateImpl value, $Res Function(_$VPNStateImpl) then) =
|
||||
__$$VPNStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({AccessControl? accessControl, VpnProps vpnProps});
|
||||
|
||||
@override
|
||||
$AccessControlCopyWith<$Res>? get accessControl;
|
||||
@override
|
||||
$VpnPropsCopyWith<$Res> get vpnProps;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$VPNStateImplCopyWithImpl<$Res>
|
||||
extends _$VPNStateCopyWithImpl<$Res, _$VPNStateImpl>
|
||||
implements _$$VPNStateImplCopyWith<$Res> {
|
||||
__$$VPNStateImplCopyWithImpl(
|
||||
_$VPNStateImpl _value, $Res Function(_$VPNStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? accessControl = freezed,
|
||||
Object? vpnProps = null,
|
||||
}) {
|
||||
return _then(_$VPNStateImpl(
|
||||
accessControl: freezed == accessControl
|
||||
? _value.accessControl
|
||||
: accessControl // ignore: cast_nullable_to_non_nullable
|
||||
as AccessControl?,
|
||||
vpnProps: null == vpnProps
|
||||
? _value.vpnProps
|
||||
: vpnProps // ignore: cast_nullable_to_non_nullable
|
||||
as VpnProps,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$VPNStateImpl implements _VPNState {
|
||||
const _$VPNStateImpl({required this.accessControl, required this.vpnProps});
|
||||
|
||||
factory _$VPNStateImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$VPNStateImplFromJson(json);
|
||||
|
||||
@override
|
||||
final AccessControl? accessControl;
|
||||
@override
|
||||
final VpnProps vpnProps;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'VPNState(accessControl: $accessControl, vpnProps: $vpnProps)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$VPNStateImpl &&
|
||||
(identical(other.accessControl, accessControl) ||
|
||||
other.accessControl == accessControl) &&
|
||||
(identical(other.vpnProps, vpnProps) ||
|
||||
other.vpnProps == vpnProps));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, accessControl, vpnProps);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$VPNStateImplCopyWith<_$VPNStateImpl> get copyWith =>
|
||||
__$$VPNStateImplCopyWithImpl<_$VPNStateImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$VPNStateImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _VPNState implements VPNState {
|
||||
const factory _VPNState(
|
||||
{required final AccessControl? accessControl,
|
||||
required final VpnProps vpnProps}) = _$VPNStateImpl;
|
||||
|
||||
factory _VPNState.fromJson(Map<String, dynamic> json) =
|
||||
_$VPNStateImpl.fromJson;
|
||||
|
||||
@override
|
||||
AccessControl? get accessControl;
|
||||
@override
|
||||
VpnProps get vpnProps;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$VPNStateImplCopyWith<_$VPNStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
WindowProps _$WindowPropsFromJson(Map<String, dynamic> json) {
|
||||
return _WindowProps.fromJson(json);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,8 @@ Config _$ConfigFromJson(Map<String, dynamic> json) => Config()
|
||||
..vpnProps = VpnProps.fromJson(json['vpnProps'] as Map<String, dynamic>?)
|
||||
..desktopProps =
|
||||
DesktopProps.fromJson(json['desktopProps'] as Map<String, dynamic>?)
|
||||
..showLabel = json['showLabel'] as bool? ?? false;
|
||||
..showLabel = json['showLabel'] as bool? ?? false
|
||||
..overrideDns = json['overrideDns'] as bool? ?? false;
|
||||
|
||||
Map<String, dynamic> _$ConfigToJson(Config instance) => <String, dynamic>{
|
||||
'profiles': instance.profiles,
|
||||
@@ -85,6 +86,7 @@ Map<String, dynamic> _$ConfigToJson(Config instance) => <String, dynamic>{
|
||||
'vpnProps': instance.vpnProps,
|
||||
'desktopProps': instance.desktopProps,
|
||||
'showLabel': instance.showLabel,
|
||||
'overrideDns': instance.overrideDns,
|
||||
};
|
||||
|
||||
const _$ThemeModeEnumMap = {
|
||||
@@ -178,6 +180,21 @@ Map<String, dynamic> _$$CoreStateImplToJson(_$CoreStateImpl instance) =>
|
||||
'onlyProxy': instance.onlyProxy,
|
||||
};
|
||||
|
||||
_$VPNStateImpl _$$VPNStateImplFromJson(Map<String, dynamic> json) =>
|
||||
_$VPNStateImpl(
|
||||
accessControl: json['accessControl'] == null
|
||||
? null
|
||||
: AccessControl.fromJson(
|
||||
json['accessControl'] as Map<String, dynamic>),
|
||||
vpnProps: VpnProps.fromJson(json['vpnProps'] as Map<String, dynamic>?),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$VPNStateImplToJson(_$VPNStateImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'accessControl': instance.accessControl,
|
||||
'vpnProps': instance.vpnProps,
|
||||
};
|
||||
|
||||
_$WindowPropsImpl _$$WindowPropsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$WindowPropsImpl(
|
||||
width: (json['width'] as num?)?.toDouble() ?? 1000,
|
||||
|
||||
@@ -26,6 +26,8 @@ mixin _$ConfigExtendedParams {
|
||||
bool get isCompatible => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "selected-map")
|
||||
Map<String, String> get selectedMap => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "override-dns")
|
||||
bool get overrideDns => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "test-url")
|
||||
String get testUrl => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -45,6 +47,7 @@ abstract class $ConfigExtendedParamsCopyWith<$Res> {
|
||||
{@JsonKey(name: "is-patch") bool isPatch,
|
||||
@JsonKey(name: "is-compatible") bool isCompatible,
|
||||
@JsonKey(name: "selected-map") Map<String, String> selectedMap,
|
||||
@JsonKey(name: "override-dns") bool overrideDns,
|
||||
@JsonKey(name: "test-url") String testUrl});
|
||||
}
|
||||
|
||||
@@ -65,6 +68,7 @@ class _$ConfigExtendedParamsCopyWithImpl<$Res,
|
||||
Object? isPatch = null,
|
||||
Object? isCompatible = null,
|
||||
Object? selectedMap = null,
|
||||
Object? overrideDns = null,
|
||||
Object? testUrl = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
@@ -80,6 +84,10 @@ class _$ConfigExtendedParamsCopyWithImpl<$Res,
|
||||
? _value.selectedMap
|
||||
: selectedMap // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, String>,
|
||||
overrideDns: null == overrideDns
|
||||
? _value.overrideDns
|
||||
: overrideDns // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
testUrl: null == testUrl
|
||||
? _value.testUrl
|
||||
: testUrl // ignore: cast_nullable_to_non_nullable
|
||||
@@ -100,6 +108,7 @@ abstract class _$$ConfigExtendedParamsImplCopyWith<$Res>
|
||||
{@JsonKey(name: "is-patch") bool isPatch,
|
||||
@JsonKey(name: "is-compatible") bool isCompatible,
|
||||
@JsonKey(name: "selected-map") Map<String, String> selectedMap,
|
||||
@JsonKey(name: "override-dns") bool overrideDns,
|
||||
@JsonKey(name: "test-url") String testUrl});
|
||||
}
|
||||
|
||||
@@ -117,6 +126,7 @@ class __$$ConfigExtendedParamsImplCopyWithImpl<$Res>
|
||||
Object? isPatch = null,
|
||||
Object? isCompatible = null,
|
||||
Object? selectedMap = null,
|
||||
Object? overrideDns = null,
|
||||
Object? testUrl = null,
|
||||
}) {
|
||||
return _then(_$ConfigExtendedParamsImpl(
|
||||
@@ -132,6 +142,10 @@ class __$$ConfigExtendedParamsImplCopyWithImpl<$Res>
|
||||
? _value._selectedMap
|
||||
: selectedMap // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, String>,
|
||||
overrideDns: null == overrideDns
|
||||
? _value.overrideDns
|
||||
: overrideDns // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
testUrl: null == testUrl
|
||||
? _value.testUrl
|
||||
: testUrl // ignore: cast_nullable_to_non_nullable
|
||||
@@ -148,6 +162,7 @@ class _$ConfigExtendedParamsImpl implements _ConfigExtendedParams {
|
||||
@JsonKey(name: "is-compatible") required this.isCompatible,
|
||||
@JsonKey(name: "selected-map")
|
||||
required final Map<String, String> selectedMap,
|
||||
@JsonKey(name: "override-dns") required this.overrideDns,
|
||||
@JsonKey(name: "test-url") required this.testUrl})
|
||||
: _selectedMap = selectedMap;
|
||||
|
||||
@@ -169,13 +184,16 @@ class _$ConfigExtendedParamsImpl implements _ConfigExtendedParams {
|
||||
return EqualUnmodifiableMapView(_selectedMap);
|
||||
}
|
||||
|
||||
@override
|
||||
@JsonKey(name: "override-dns")
|
||||
final bool overrideDns;
|
||||
@override
|
||||
@JsonKey(name: "test-url")
|
||||
final String testUrl;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ConfigExtendedParams(isPatch: $isPatch, isCompatible: $isCompatible, selectedMap: $selectedMap, testUrl: $testUrl)';
|
||||
return 'ConfigExtendedParams(isPatch: $isPatch, isCompatible: $isCompatible, selectedMap: $selectedMap, overrideDns: $overrideDns, testUrl: $testUrl)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -188,13 +206,15 @@ class _$ConfigExtendedParamsImpl implements _ConfigExtendedParams {
|
||||
other.isCompatible == isCompatible) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._selectedMap, _selectedMap) &&
|
||||
(identical(other.overrideDns, overrideDns) ||
|
||||
other.overrideDns == overrideDns) &&
|
||||
(identical(other.testUrl, testUrl) || other.testUrl == testUrl));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, isPatch, isCompatible,
|
||||
const DeepCollectionEquality().hash(_selectedMap), testUrl);
|
||||
const DeepCollectionEquality().hash(_selectedMap), overrideDns, testUrl);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@@ -218,6 +238,7 @@ abstract class _ConfigExtendedParams implements ConfigExtendedParams {
|
||||
@JsonKey(name: "is-compatible") required final bool isCompatible,
|
||||
@JsonKey(name: "selected-map")
|
||||
required final Map<String, String> selectedMap,
|
||||
@JsonKey(name: "override-dns") required final bool overrideDns,
|
||||
@JsonKey(name: "test-url") required final String testUrl}) =
|
||||
_$ConfigExtendedParamsImpl;
|
||||
|
||||
@@ -234,6 +255,9 @@ abstract class _ConfigExtendedParams implements ConfigExtendedParams {
|
||||
@JsonKey(name: "selected-map")
|
||||
Map<String, String> get selectedMap;
|
||||
@override
|
||||
@JsonKey(name: "override-dns")
|
||||
bool get overrideDns;
|
||||
@override
|
||||
@JsonKey(name: "test-url")
|
||||
String get testUrl;
|
||||
@override
|
||||
|
||||
@@ -12,6 +12,7 @@ _$ConfigExtendedParamsImpl _$$ConfigExtendedParamsImplFromJson(
|
||||
isPatch: json['is-patch'] as bool,
|
||||
isCompatible: json['is-compatible'] as bool,
|
||||
selectedMap: Map<String, String>.from(json['selected-map'] as Map),
|
||||
overrideDns: json['override-dns'] as bool,
|
||||
testUrl: json['test-url'] as String,
|
||||
);
|
||||
|
||||
@@ -21,6 +22,7 @@ Map<String, dynamic> _$$ConfigExtendedParamsImplToJson(
|
||||
'is-patch': instance.isPatch,
|
||||
'is-compatible': instance.isCompatible,
|
||||
'selected-map': instance.selectedMap,
|
||||
'override-dns': instance.overrideDns,
|
||||
'test-url': instance.testUrl,
|
||||
};
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ mixin _$Group {
|
||||
List<Proxy> get all => throw _privateConstructorUsedError;
|
||||
String? get now => throw _privateConstructorUsedError;
|
||||
bool? get hidden => throw _privateConstructorUsedError;
|
||||
String get icon => throw _privateConstructorUsedError;
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@@ -41,6 +42,7 @@ abstract class $GroupCopyWith<$Res> {
|
||||
List<Proxy> all,
|
||||
String? now,
|
||||
bool? hidden,
|
||||
String icon,
|
||||
String name});
|
||||
}
|
||||
|
||||
@@ -61,6 +63,7 @@ class _$GroupCopyWithImpl<$Res, $Val extends Group>
|
||||
Object? all = null,
|
||||
Object? now = freezed,
|
||||
Object? hidden = freezed,
|
||||
Object? icon = null,
|
||||
Object? name = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
@@ -80,6 +83,10 @@ class _$GroupCopyWithImpl<$Res, $Val extends Group>
|
||||
? _value.hidden
|
||||
: hidden // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
icon: null == icon
|
||||
? _value.icon
|
||||
: icon // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
@@ -100,6 +107,7 @@ abstract class _$$GroupImplCopyWith<$Res> implements $GroupCopyWith<$Res> {
|
||||
List<Proxy> all,
|
||||
String? now,
|
||||
bool? hidden,
|
||||
String icon,
|
||||
String name});
|
||||
}
|
||||
|
||||
@@ -118,6 +126,7 @@ class __$$GroupImplCopyWithImpl<$Res>
|
||||
Object? all = null,
|
||||
Object? now = freezed,
|
||||
Object? hidden = freezed,
|
||||
Object? icon = null,
|
||||
Object? name = null,
|
||||
}) {
|
||||
return _then(_$GroupImpl(
|
||||
@@ -137,6 +146,10 @@ class __$$GroupImplCopyWithImpl<$Res>
|
||||
? _value.hidden
|
||||
: hidden // ignore: cast_nullable_to_non_nullable
|
||||
as bool?,
|
||||
icon: null == icon
|
||||
? _value.icon
|
||||
: icon // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
@@ -153,6 +166,7 @@ class _$GroupImpl implements _Group {
|
||||
final List<Proxy> all = const [],
|
||||
this.now,
|
||||
this.hidden,
|
||||
this.icon = "",
|
||||
required this.name})
|
||||
: _all = all;
|
||||
|
||||
@@ -175,11 +189,14 @@ class _$GroupImpl implements _Group {
|
||||
@override
|
||||
final bool? hidden;
|
||||
@override
|
||||
@JsonKey()
|
||||
final String icon;
|
||||
@override
|
||||
final String name;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Group(type: $type, all: $all, now: $now, hidden: $hidden, name: $name)';
|
||||
return 'Group(type: $type, all: $all, now: $now, hidden: $hidden, icon: $icon, name: $name)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -191,13 +208,14 @@ class _$GroupImpl implements _Group {
|
||||
const DeepCollectionEquality().equals(other._all, _all) &&
|
||||
(identical(other.now, now) || other.now == now) &&
|
||||
(identical(other.hidden, hidden) || other.hidden == hidden) &&
|
||||
(identical(other.icon, icon) || other.icon == icon) &&
|
||||
(identical(other.name, name) || other.name == name));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, type,
|
||||
const DeepCollectionEquality().hash(_all), now, hidden, name);
|
||||
const DeepCollectionEquality().hash(_all), now, hidden, icon, name);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@@ -219,6 +237,7 @@ abstract class _Group implements Group {
|
||||
final List<Proxy> all,
|
||||
final String? now,
|
||||
final bool? hidden,
|
||||
final String icon,
|
||||
required final String name}) = _$GroupImpl;
|
||||
|
||||
factory _Group.fromJson(Map<String, dynamic> json) = _$GroupImpl.fromJson;
|
||||
@@ -232,6 +251,8 @@ abstract class _Group implements Group {
|
||||
@override
|
||||
bool? get hidden;
|
||||
@override
|
||||
String get icon;
|
||||
@override
|
||||
String get name;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
|
||||
@@ -14,6 +14,7 @@ _$GroupImpl _$$GroupImplFromJson(Map<String, dynamic> json) => _$GroupImpl(
|
||||
const [],
|
||||
now: json['now'] as String?,
|
||||
hidden: json['hidden'] as bool?,
|
||||
icon: json['icon'] as String? ?? "",
|
||||
name: json['name'] as String,
|
||||
);
|
||||
|
||||
@@ -23,6 +24,7 @@ Map<String, dynamic> _$$GroupImplToJson(_$GroupImpl instance) =>
|
||||
'all': instance.all,
|
||||
'now': instance.now,
|
||||
'hidden': instance.hidden,
|
||||
'icon': instance.icon,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
|
||||
@@ -3331,6 +3331,142 @@ abstract class _ProxyState implements ProxyState {
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$HttpOverridesState {
|
||||
bool get isStart => throw _privateConstructorUsedError;
|
||||
int get port => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
$HttpOverridesStateCopyWith<HttpOverridesState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $HttpOverridesStateCopyWith<$Res> {
|
||||
factory $HttpOverridesStateCopyWith(
|
||||
HttpOverridesState value, $Res Function(HttpOverridesState) then) =
|
||||
_$HttpOverridesStateCopyWithImpl<$Res, HttpOverridesState>;
|
||||
@useResult
|
||||
$Res call({bool isStart, int port});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$HttpOverridesStateCopyWithImpl<$Res, $Val extends HttpOverridesState>
|
||||
implements $HttpOverridesStateCopyWith<$Res> {
|
||||
_$HttpOverridesStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? isStart = null,
|
||||
Object? port = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
isStart: null == isStart
|
||||
? _value.isStart
|
||||
: isStart // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
port: null == port
|
||||
? _value.port
|
||||
: port // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$HttpOverridesStateImplCopyWith<$Res>
|
||||
implements $HttpOverridesStateCopyWith<$Res> {
|
||||
factory _$$HttpOverridesStateImplCopyWith(_$HttpOverridesStateImpl value,
|
||||
$Res Function(_$HttpOverridesStateImpl) then) =
|
||||
__$$HttpOverridesStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({bool isStart, int port});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$HttpOverridesStateImplCopyWithImpl<$Res>
|
||||
extends _$HttpOverridesStateCopyWithImpl<$Res, _$HttpOverridesStateImpl>
|
||||
implements _$$HttpOverridesStateImplCopyWith<$Res> {
|
||||
__$$HttpOverridesStateImplCopyWithImpl(_$HttpOverridesStateImpl _value,
|
||||
$Res Function(_$HttpOverridesStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? isStart = null,
|
||||
Object? port = null,
|
||||
}) {
|
||||
return _then(_$HttpOverridesStateImpl(
|
||||
isStart: null == isStart
|
||||
? _value.isStart
|
||||
: isStart // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
port: null == port
|
||||
? _value.port
|
||||
: port // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$HttpOverridesStateImpl implements _HttpOverridesState {
|
||||
const _$HttpOverridesStateImpl({required this.isStart, required this.port});
|
||||
|
||||
@override
|
||||
final bool isStart;
|
||||
@override
|
||||
final int port;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'HttpOverridesState(isStart: $isStart, port: $port)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$HttpOverridesStateImpl &&
|
||||
(identical(other.isStart, isStart) || other.isStart == isStart) &&
|
||||
(identical(other.port, port) || other.port == port));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, isStart, port);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$HttpOverridesStateImplCopyWith<_$HttpOverridesStateImpl> get copyWith =>
|
||||
__$$HttpOverridesStateImplCopyWithImpl<_$HttpOverridesStateImpl>(
|
||||
this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _HttpOverridesState implements HttpOverridesState {
|
||||
const factory _HttpOverridesState(
|
||||
{required final bool isStart,
|
||||
required final int port}) = _$HttpOverridesStateImpl;
|
||||
|
||||
@override
|
||||
bool get isStart;
|
||||
@override
|
||||
int get port;
|
||||
@override
|
||||
@JsonKey(ignore: true)
|
||||
_$$HttpOverridesStateImplCopyWith<_$HttpOverridesStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ClashConfigState {
|
||||
int get mixedPort => throw _privateConstructorUsedError;
|
||||
@@ -3344,6 +3480,7 @@ mixin _$ClashConfigState {
|
||||
int get keepAliveInterval => throw _privateConstructorUsedError;
|
||||
bool get unifiedDelay => throw _privateConstructorUsedError;
|
||||
bool get tcpConcurrent => throw _privateConstructorUsedError;
|
||||
Map<String, String> get hosts => throw _privateConstructorUsedError;
|
||||
Tun get tun => throw _privateConstructorUsedError;
|
||||
Dns get dns => throw _privateConstructorUsedError;
|
||||
Map<String, String> get geoXUrl => throw _privateConstructorUsedError;
|
||||
@@ -3373,6 +3510,7 @@ abstract class $ClashConfigStateCopyWith<$Res> {
|
||||
int keepAliveInterval,
|
||||
bool unifiedDelay,
|
||||
bool tcpConcurrent,
|
||||
Map<String, String> hosts,
|
||||
Tun tun,
|
||||
Dns dns,
|
||||
Map<String, String> geoXUrl,
|
||||
@@ -3380,6 +3518,7 @@ abstract class $ClashConfigStateCopyWith<$Res> {
|
||||
String? globalRealUa});
|
||||
|
||||
$TunCopyWith<$Res> get tun;
|
||||
$DnsCopyWith<$Res> get dns;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -3406,6 +3545,7 @@ class _$ClashConfigStateCopyWithImpl<$Res, $Val extends ClashConfigState>
|
||||
Object? keepAliveInterval = null,
|
||||
Object? unifiedDelay = null,
|
||||
Object? tcpConcurrent = null,
|
||||
Object? hosts = null,
|
||||
Object? tun = null,
|
||||
Object? dns = null,
|
||||
Object? geoXUrl = null,
|
||||
@@ -3457,6 +3597,10 @@ class _$ClashConfigStateCopyWithImpl<$Res, $Val extends ClashConfigState>
|
||||
? _value.tcpConcurrent
|
||||
: tcpConcurrent // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
hosts: null == hosts
|
||||
? _value.hosts
|
||||
: hosts // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, String>,
|
||||
tun: null == tun
|
||||
? _value.tun
|
||||
: tun // ignore: cast_nullable_to_non_nullable
|
||||
@@ -3487,6 +3631,14 @@ class _$ClashConfigStateCopyWithImpl<$Res, $Val extends ClashConfigState>
|
||||
return _then(_value.copyWith(tun: value) as $Val);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$DnsCopyWith<$Res> get dns {
|
||||
return $DnsCopyWith<$Res>(_value.dns, (value) {
|
||||
return _then(_value.copyWith(dns: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -3509,6 +3661,7 @@ abstract class _$$ClashConfigStateImplCopyWith<$Res>
|
||||
int keepAliveInterval,
|
||||
bool unifiedDelay,
|
||||
bool tcpConcurrent,
|
||||
Map<String, String> hosts,
|
||||
Tun tun,
|
||||
Dns dns,
|
||||
Map<String, String> geoXUrl,
|
||||
@@ -3517,6 +3670,8 @@ abstract class _$$ClashConfigStateImplCopyWith<$Res>
|
||||
|
||||
@override
|
||||
$TunCopyWith<$Res> get tun;
|
||||
@override
|
||||
$DnsCopyWith<$Res> get dns;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -3541,6 +3696,7 @@ class __$$ClashConfigStateImplCopyWithImpl<$Res>
|
||||
Object? keepAliveInterval = null,
|
||||
Object? unifiedDelay = null,
|
||||
Object? tcpConcurrent = null,
|
||||
Object? hosts = null,
|
||||
Object? tun = null,
|
||||
Object? dns = null,
|
||||
Object? geoXUrl = null,
|
||||
@@ -3592,6 +3748,10 @@ class __$$ClashConfigStateImplCopyWithImpl<$Res>
|
||||
? _value.tcpConcurrent
|
||||
: tcpConcurrent // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
hosts: null == hosts
|
||||
? _value._hosts
|
||||
: hosts // ignore: cast_nullable_to_non_nullable
|
||||
as Map<String, String>,
|
||||
tun: null == tun
|
||||
? _value.tun
|
||||
: tun // ignore: cast_nullable_to_non_nullable
|
||||
@@ -3631,12 +3791,14 @@ class _$ClashConfigStateImpl implements _ClashConfigState {
|
||||
required this.keepAliveInterval,
|
||||
required this.unifiedDelay,
|
||||
required this.tcpConcurrent,
|
||||
required final Map<String, String> hosts,
|
||||
required this.tun,
|
||||
required this.dns,
|
||||
required final Map<String, String> geoXUrl,
|
||||
required final List<String> rules,
|
||||
required this.globalRealUa})
|
||||
: _geoXUrl = geoXUrl,
|
||||
: _hosts = hosts,
|
||||
_geoXUrl = geoXUrl,
|
||||
_rules = rules;
|
||||
|
||||
@override
|
||||
@@ -3661,6 +3823,14 @@ class _$ClashConfigStateImpl implements _ClashConfigState {
|
||||
final bool unifiedDelay;
|
||||
@override
|
||||
final bool tcpConcurrent;
|
||||
final Map<String, String> _hosts;
|
||||
@override
|
||||
Map<String, String> get hosts {
|
||||
if (_hosts is EqualUnmodifiableMapView) return _hosts;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableMapView(_hosts);
|
||||
}
|
||||
|
||||
@override
|
||||
final Tun tun;
|
||||
@override
|
||||
@@ -3686,7 +3856,7 @@ class _$ClashConfigStateImpl implements _ClashConfigState {
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'ClashConfigState(mixedPort: $mixedPort, allowLan: $allowLan, ipv6: $ipv6, geodataLoader: $geodataLoader, logLevel: $logLevel, externalController: $externalController, mode: $mode, findProcessMode: $findProcessMode, keepAliveInterval: $keepAliveInterval, unifiedDelay: $unifiedDelay, tcpConcurrent: $tcpConcurrent, tun: $tun, dns: $dns, geoXUrl: $geoXUrl, rules: $rules, globalRealUa: $globalRealUa)';
|
||||
return 'ClashConfigState(mixedPort: $mixedPort, allowLan: $allowLan, ipv6: $ipv6, geodataLoader: $geodataLoader, logLevel: $logLevel, externalController: $externalController, mode: $mode, findProcessMode: $findProcessMode, keepAliveInterval: $keepAliveInterval, unifiedDelay: $unifiedDelay, tcpConcurrent: $tcpConcurrent, hosts: $hosts, tun: $tun, dns: $dns, geoXUrl: $geoXUrl, rules: $rules, globalRealUa: $globalRealUa)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -3714,6 +3884,7 @@ class _$ClashConfigStateImpl implements _ClashConfigState {
|
||||
other.unifiedDelay == unifiedDelay) &&
|
||||
(identical(other.tcpConcurrent, tcpConcurrent) ||
|
||||
other.tcpConcurrent == tcpConcurrent) &&
|
||||
const DeepCollectionEquality().equals(other._hosts, _hosts) &&
|
||||
(identical(other.tun, tun) || other.tun == tun) &&
|
||||
(identical(other.dns, dns) || other.dns == dns) &&
|
||||
const DeepCollectionEquality().equals(other._geoXUrl, _geoXUrl) &&
|
||||
@@ -3736,6 +3907,7 @@ class _$ClashConfigStateImpl implements _ClashConfigState {
|
||||
keepAliveInterval,
|
||||
unifiedDelay,
|
||||
tcpConcurrent,
|
||||
const DeepCollectionEquality().hash(_hosts),
|
||||
tun,
|
||||
dns,
|
||||
const DeepCollectionEquality().hash(_geoXUrl),
|
||||
@@ -3763,6 +3935,7 @@ abstract class _ClashConfigState implements ClashConfigState {
|
||||
required final int keepAliveInterval,
|
||||
required final bool unifiedDelay,
|
||||
required final bool tcpConcurrent,
|
||||
required final Map<String, String> hosts,
|
||||
required final Tun tun,
|
||||
required final Dns dns,
|
||||
required final Map<String, String> geoXUrl,
|
||||
@@ -3792,6 +3965,8 @@ abstract class _ClashConfigState implements ClashConfigState {
|
||||
@override
|
||||
bool get tcpConcurrent;
|
||||
@override
|
||||
Map<String, String> get hosts;
|
||||
@override
|
||||
Tun get tun;
|
||||
@override
|
||||
Dns get dns;
|
||||
|
||||
Reference in New Issue
Block a user