add basic routing options, auto update routing assets,use ruleset, remove geo assets
This commit is contained in:
@@ -16,6 +16,8 @@ class SingboxConfigOption with _$SingboxConfigOption {
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.kebab)
|
||||
const factory SingboxConfigOption({
|
||||
required String region,
|
||||
required bool blockAds,
|
||||
required bool executeConfigAsIs,
|
||||
required LogLevel logLevel,
|
||||
required bool resolveDestination,
|
||||
@@ -42,8 +44,8 @@ class SingboxConfigOption with _$SingboxConfigOption {
|
||||
required bool enableFakeDns,
|
||||
required bool enableDnsRouting,
|
||||
required bool independentDnsCache,
|
||||
required String geoipPath,
|
||||
required String geositePath,
|
||||
// required String geoipPath,
|
||||
// required String geositePath,
|
||||
required List<SingboxRule> rules,
|
||||
required SingboxMuxOption mux,
|
||||
required SingboxTlsTricks tlsTricks,
|
||||
|
||||
@@ -9,6 +9,7 @@ class SingboxRule with _$SingboxRule {
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.kebab)
|
||||
const factory SingboxRule({
|
||||
String? ruleSetUrl,
|
||||
String? domains,
|
||||
String? ip,
|
||||
String? port,
|
||||
@@ -17,8 +18,7 @@ class SingboxRule with _$SingboxRule {
|
||||
@Default(RuleOutbound.proxy) RuleOutbound outbound,
|
||||
}) = _SingboxRule;
|
||||
|
||||
factory SingboxRule.fromJson(Map<String, dynamic> json) =>
|
||||
_$SingboxRuleFromJson(json);
|
||||
factory SingboxRule.fromJson(Map<String, dynamic> json) => _$SingboxRuleFromJson(json);
|
||||
}
|
||||
|
||||
enum RuleOutbound { proxy, bypass, block }
|
||||
|
||||
Reference in New Issue
Block a user