new: add more warp modes, handle both ipv4 and ipv6 in wireguard, add customizable size and more
This commit is contained in:
@@ -271,6 +271,10 @@ abstract class ConfigOptions {
|
||||
mapFrom: (value) => OptionalRange.parse(value, allowEmpty: true),
|
||||
mapTo: const OptionalRangeJsonConverter().toJson,
|
||||
);
|
||||
static final warpNoiseMode = PreferencesNotifier.create<String, String>(
|
||||
"warp-noise-mode",
|
||||
"m6",
|
||||
);
|
||||
|
||||
static final warpNoiseDelay = PreferencesNotifier.create<OptionalRange, String>(
|
||||
"warp-noise-delay",
|
||||
@@ -278,6 +282,12 @@ abstract class ConfigOptions {
|
||||
mapFrom: (value) => OptionalRange.parse(value, allowEmpty: true),
|
||||
mapTo: const OptionalRangeJsonConverter().toJson,
|
||||
);
|
||||
static final warpNoiseSize = PreferencesNotifier.create<OptionalRange, String>(
|
||||
"warp-noise-size",
|
||||
const OptionalRange(min: 10, max: 30),
|
||||
mapFrom: (value) => OptionalRange.parse(value, allowEmpty: true),
|
||||
mapTo: const OptionalRangeJsonConverter().toJson,
|
||||
);
|
||||
|
||||
static final warpWireguardConfig = PreferencesNotifier.create<String, String>(
|
||||
"warp-wireguard-config",
|
||||
@@ -361,6 +371,8 @@ abstract class ConfigOptions {
|
||||
"warp.clean-ip": warpCleanIp,
|
||||
"warp.clean-port": warpPort,
|
||||
"warp.noise": warpNoise,
|
||||
"warp.noise-size": warpNoiseSize,
|
||||
"warp.noise-mode": warpNoiseMode,
|
||||
"warp.noise-delay": warpNoiseDelay,
|
||||
"warp.wireguard-config": warpWireguardConfig,
|
||||
"warp2.license-key": warp2LicenseKey,
|
||||
@@ -461,6 +473,8 @@ abstract class ConfigOptions {
|
||||
cleanIp: ref.watch(warpCleanIp),
|
||||
cleanPort: ref.watch(warpPort),
|
||||
noise: ref.watch(warpNoise),
|
||||
noiseMode: ref.watch(warpNoiseMode),
|
||||
noiseSize: ref.watch(warpNoiseSize),
|
||||
noiseDelay: ref.watch(warpNoiseDelay),
|
||||
),
|
||||
warp2: SingboxWarpOption(
|
||||
@@ -473,6 +487,8 @@ abstract class ConfigOptions {
|
||||
cleanIp: ref.watch(warpCleanIp),
|
||||
cleanPort: ref.watch(warpPort),
|
||||
noise: ref.watch(warpNoise),
|
||||
noiseMode: ref.watch(warpNoiseMode),
|
||||
noiseSize: ref.watch(warpNoiseSize),
|
||||
noiseDelay: ref.watch(warpNoiseDelay),
|
||||
),
|
||||
// geoipPath: ref.watch(geoAssetPathResolverProvider).relativePath(
|
||||
|
||||
Reference in New Issue
Block a user