2023-12-01 12:56:24 +03:30
|
|
|
import 'package:freezed_annotation/freezed_annotation.dart';
|
2023-12-04 17:36:02 +03:30
|
|
|
import 'package:hiddify/core/model/range.dart';
|
2023-12-01 12:56:24 +03:30
|
|
|
import 'package:hiddify/core/utils/json_converters.dart';
|
|
|
|
|
import 'package:hiddify/features/log/model/log_level.dart';
|
|
|
|
|
import 'package:hiddify/singbox/model/singbox_config_enum.dart';
|
|
|
|
|
|
|
|
|
|
part 'config_option_patch.freezed.dart';
|
|
|
|
|
part 'config_option_patch.g.dart';
|
|
|
|
|
|
|
|
|
|
@freezed
|
|
|
|
|
class ConfigOptionPatch with _$ConfigOptionPatch {
|
|
|
|
|
const ConfigOptionPatch._();
|
|
|
|
|
|
|
|
|
|
@JsonSerializable(fieldRename: FieldRename.kebab)
|
|
|
|
|
const factory ConfigOptionPatch({
|
|
|
|
|
ServiceMode? serviceMode,
|
|
|
|
|
LogLevel? logLevel,
|
|
|
|
|
bool? resolveDestination,
|
|
|
|
|
IPv6Mode? ipv6Mode,
|
|
|
|
|
String? remoteDnsAddress,
|
|
|
|
|
DomainStrategy? remoteDnsDomainStrategy,
|
|
|
|
|
String? directDnsAddress,
|
|
|
|
|
DomainStrategy? directDnsDomainStrategy,
|
|
|
|
|
int? mixedPort,
|
|
|
|
|
int? localDnsPort,
|
|
|
|
|
TunImplementation? tunImplementation,
|
|
|
|
|
int? mtu,
|
|
|
|
|
bool? strictRoute,
|
|
|
|
|
String? connectionTestUrl,
|
|
|
|
|
@IntervalInSecondsConverter() Duration? urlTestInterval,
|
|
|
|
|
bool? enableClashApi,
|
|
|
|
|
int? clashApiPort,
|
|
|
|
|
bool? bypassLan,
|
2024-01-01 19:14:28 +03:30
|
|
|
bool? allowConnectionFromLan,
|
2023-12-01 12:56:24 +03:30
|
|
|
bool? enableFakeDns,
|
2024-01-01 19:01:36 +03:30
|
|
|
bool? enableDnsRouting,
|
2023-12-01 12:56:24 +03:30
|
|
|
bool? independentDnsCache,
|
2023-12-04 17:36:02 +03:30
|
|
|
bool? enableTlsFragment,
|
|
|
|
|
@RangeWithOptionalCeilJsonConverter()
|
|
|
|
|
RangeWithOptionalCeil? tlsFragmentSize,
|
|
|
|
|
@RangeWithOptionalCeilJsonConverter()
|
|
|
|
|
RangeWithOptionalCeil? tlsFragmentSleep,
|
|
|
|
|
bool? enableTlsMixedSniCase,
|
|
|
|
|
bool? enableTlsPadding,
|
|
|
|
|
@RangeWithOptionalCeilJsonConverter() RangeWithOptionalCeil? tlsPaddingSize,
|
2024-01-19 22:26:23 +03:30
|
|
|
bool? enableMux,
|
|
|
|
|
bool? muxPadding,
|
|
|
|
|
int? muxMaxStreams,
|
|
|
|
|
MuxProtocol? muxProtocol,
|
2024-02-03 12:36:27 +03:30
|
|
|
bool? enableWarp,
|
|
|
|
|
WarpDetourMode? warpDetourMode,
|
|
|
|
|
String? warpLicenseKey,
|
|
|
|
|
String? warpCleanIp,
|
|
|
|
|
int? warpPort,
|
|
|
|
|
@RangeWithOptionalCeilJsonConverter() RangeWithOptionalCeil? warpNoise,
|
2023-12-01 12:56:24 +03:30
|
|
|
}) = _ConfigOptionPatch;
|
|
|
|
|
|
|
|
|
|
factory ConfigOptionPatch.fromJson(Map<String, dynamic> json) =>
|
|
|
|
|
_$ConfigOptionPatchFromJson(json);
|
|
|
|
|
}
|