This commit is contained in:
Fabian Freund
2025-09-10 07:32:52 +02:00
parent dce15e2381
commit 839824b573
15 changed files with 336 additions and 64 deletions
@@ -27,6 +27,7 @@ import 'package:rxdart/rxdart.dart';
import 'package:weblibre/core/logger.dart';
import 'package:weblibre/features/geckoview/features/browser/domain/providers/lifecycle.dart';
import 'package:weblibre/features/tor/utils/tor_entrypoint.dart';
import 'package:weblibre/features/user/domain/repositories/tor_settings.dart';
part 'tor_proxy.g.dart';
@@ -105,6 +106,18 @@ class TorProxyService extends _$TorProxyService {
if (currentPort == null || forceReconnect) {
state = const AsyncLoading();
final torSettings = await ref
.read(torSettingsRepositoryProvider.notifier)
.fetchSettings();
if (torSettings.autoConfig) {
final moat = MoatService();
final config = await moat.autoConf();
todo
}
await _tor.start();
_enableHeartbeatTimer();
}
@@ -1,26 +0,0 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'tor_proxy.dart';
// **************************************************************************
// RiverpodGenerator
// **************************************************************************
String _$torProxyServiceHash() => r'f991652e4e228d3e7fdc09a6088b6c5427d6231c';
/// See also [TorProxyService].
@ProviderFor(TorProxyService)
final torProxyServiceProvider =
AsyncNotifierProvider<TorProxyService, int?>.internal(
TorProxyService.new,
name: r'torProxyServiceProvider',
debugGetCreateSourceHash: const bool.fromEnvironment('dart.vm.product')
? null
: _$torProxyServiceHash,
dependencies: null,
allTransitiveDependencies: null,
);
typedef _$TorProxyService = AsyncNotifier<int?>;
// ignore_for_file: type=lint
// ignore_for_file: subtype_of_sealed_class, invalid_use_of_internal_member, invalid_use_of_visible_for_testing_member, deprecated_member_use_from_same_package