new: enable tunnel service again, add signing, msix, more log less info

This commit is contained in:
Hiddify
2024-02-27 15:51:31 +03:30
parent 3b6eeaaae8
commit 48ace8ec11
13 changed files with 53 additions and 21 deletions

View File

@@ -93,6 +93,7 @@ Future<void> lazyBootstrap(
final debug = container.read(debugModeNotifierProvider) || kDebugMode;
if (PlatformUtils.isDesktop) {
Logger.bootstrap.info("Starting Window Contoller");
await _init(
"window controller",
() => container.read(windowNotifierProvider.future),
@@ -106,39 +107,43 @@ Future<void> lazyBootstrap(
} else {
Logger.bootstrap.debug("silent start, remain hidden accessible via tray");
}
Logger.bootstrap.info("Starting Auto Start Service");
await _init(
"auto start service",
() => container.read(autoStartNotifierProvider.future),
);
}
Logger.bootstrap.info("Starting Log Repository");
await _init(
"logs repository",
() => container.read(logRepositoryProvider.future),
);
Logger.bootstrap.info("Starting Logger Contoller");
await _init("logger controller", () => LoggerController.postInit(debug));
Logger.bootstrap.info(appInfo.format());
Logger.bootstrap.info(appInfo.format());
Logger.bootstrap.info("Starting GeoAssets");
await _init(
"geo assets repository",
() => container.read(geoAssetRepositoryProvider.future),
);
Logger.bootstrap.info("Starting Profile Repository");
await _init(
"profile repository",
() => container.read(profileRepositoryProvider.future),
);
Logger.bootstrap.info("Starting Singbox Service Provider");
await _init(
"sing-box",
() => container.read(singboxServiceProvider).init(),
);
Logger.bootstrap.info("Starting Active Profile");
await _safeInit(
"active profile",
() => container.read(activeProfileProvider.future),
timeout: 1000,
);
Logger.bootstrap.info("Starting Deep Link Service");
await _safeInit(
"deep link service",
() => container.read(deepLinkNotifierProvider.future),
@@ -146,14 +151,17 @@ Future<void> lazyBootstrap(
);
if (PlatformUtils.isDesktop) {
Logger.bootstrap.info("Starting System Tray");
await _safeInit(
"system tray",
() => container.read(systemTrayNotifierProvider.future),
timeout: 1000,
);
Logger.bootstrap.info("System Tray initialized");
}
if (Platform.isAndroid) {
Logger.bootstrap.info("Starting FlutterDisplayMode.setHighRefreshRate");
await _safeInit(
"android display mode",
() async {

View File

@@ -48,6 +48,8 @@ class AnalyticsController extends _$AnalyticsController with AppLogger {
options.debug = kDebugMode;
options.enableNativeCrashHandling = true;
options.enableNdkScopeSync = true;
// options.attachScreenshot = true;
options.serverName = "";
options.attachThreads = true;
options.tracesSampleRate = 0.20;
options.enableUserInteractionTracing = true;

View File

@@ -6,8 +6,10 @@ import 'package:riverpod_annotation/riverpod_annotation.dart';
import 'package:sentry_flutter/sentry_flutter.dart';
FutureOr<SentryEvent?> sentryBeforeSend(SentryEvent event, {Hint? hint}) {
if (canSendEvent(event.throwable)) return event;
return null;
if (!canSendEvent(event.throwable)) return null;
return event.copyWith(
user: SentryUser(email: "", username: "", ipAddress: "0.0.0.0"),
);
}
bool canSendEvent(dynamic throwable) {

View File

@@ -173,7 +173,7 @@ class ConfigOptionEntity with _$ConfigOptionEntity {
enableClashApi: enableClashApi,
clashApiPort: clashApiPort,
enableTun: serviceMode == ServiceMode.tun,
enableTunService: false && serviceMode == ServiceMode.tunService,
enableTunService: serviceMode == ServiceMode.tunService,
setSystemProxy: serviceMode == ServiceMode.systemProxy,
bypassLan: bypassLan,
allowConnectionFromLan: allowConnectionFromLan,