new: add10000 to all ports for prevenging permission error. add warp from github repository except for china
This commit is contained in:
@@ -83,19 +83,19 @@ abstract class ConfigOptions {
|
||||
|
||||
static final mixedPort = PreferencesNotifier.create<int, int>(
|
||||
"mixed-port",
|
||||
2334,
|
||||
12334,
|
||||
validator: (value) => isPort(value.toString()),
|
||||
);
|
||||
|
||||
static final tproxyPort = PreferencesNotifier.create<int, int>(
|
||||
"tproxy-port",
|
||||
2335,
|
||||
12335,
|
||||
validator: (value) => isPort(value.toString()),
|
||||
);
|
||||
|
||||
static final localDnsPort = PreferencesNotifier.create<int, int>(
|
||||
"local-dns-port",
|
||||
6450,
|
||||
16450,
|
||||
validator: (value) => isPort(value.toString()),
|
||||
);
|
||||
|
||||
@@ -130,7 +130,7 @@ abstract class ConfigOptions {
|
||||
|
||||
static final clashApiPort = PreferencesNotifier.create<int, int>(
|
||||
"clash-api-port",
|
||||
6756,
|
||||
16756,
|
||||
validator: (value) => isPort(value.toString()),
|
||||
);
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import 'package:hiddify/core/notification/in_app_notification_controller.dart';
|
||||
import 'package:hiddify/core/preferences/preferences_provider.dart';
|
||||
import 'package:hiddify/core/router/router.dart';
|
||||
import 'package:hiddify/features/common/qr_code_scanner_screen.dart';
|
||||
import 'package:hiddify/features/config_option/data/config_option_repository.dart';
|
||||
import 'package:hiddify/features/config_option/notifier/warp_option_notifier.dart';
|
||||
|
||||
import 'package:hiddify/features/config_option/overview/warp_options_widgets.dart';
|
||||
@@ -275,7 +276,11 @@ class AddProfileModal extends HookConsumerWidget {
|
||||
await _warp.generateWarp2Config();
|
||||
toast?.start();
|
||||
// }
|
||||
if (ref.read(ConfigOptions.region.notifier).raw() == "cn") {
|
||||
await _profile.add("#profile-title: Hiddify WARP\nwarp://p1@auto#National&&detour=warp://p2@auto#WoW"); //
|
||||
} else {
|
||||
await _profile.add("https://raw.githubusercontent.com/hiddify/hiddify-next/main/test.configs/warp"); //
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -78,8 +78,7 @@ class AddProfile extends _$AddProfile with AppLogger {
|
||||
var name = parsed.name;
|
||||
var oldItem = await _profilesRepo.getByName(name);
|
||||
if (name == "Hiddify WARP" && oldItem != null) {
|
||||
_profilesRepo.setAsActive(oldItem.id).run();
|
||||
return unit;
|
||||
_profilesRepo.deleteById(oldItem.id).run();
|
||||
}
|
||||
while (await _profilesRepo.getByName(name) != null) {
|
||||
name += '${randomInt(0, 9).run()}';
|
||||
|
||||
Reference in New Issue
Block a user