Add warp config generator

This commit is contained in:
problematicconsumer
2024-02-18 12:35:11 +03:30
parent ce6ab59bf7
commit 33dc21918d
15 changed files with 459 additions and 973 deletions

View File

@@ -54,6 +54,8 @@ class SingboxConfigOption with _$SingboxConfigOption {
required bool enableWarp,
required WarpDetourMode warpDetourMode,
required String warpLicenseKey,
required String warpAccountId,
required String warpAccessToken,
required String warpCleanIp,
required int warpPort,
@OptionalRangeJsonConverter() required OptionalRange warpNoise,

View File

@@ -0,0 +1,17 @@
import 'package:flutter/foundation.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
part 'warp_account.freezed.dart';
part 'warp_account.g.dart';
@freezed
class WarpAccount with _$WarpAccount {
const factory WarpAccount({
required String licenseKey,
required String accountId,
required String accessToken,
}) = _WarpAccount;
factory WarpAccount.fromJson(Map<String, dynamic> json) =>
_$WarpAccountFromJson(json);
}