Add proxy routing and sing-box support
This commit is contained in:
@@ -12,13 +12,16 @@ import 'package:weblibre/features/user/data/database/daos/toolbar_button_config.
|
||||
as i6;
|
||||
import 'package:weblibre/features/user/data/database/daos/search_tokens.dart'
|
||||
as i7;
|
||||
import 'package:drift/internal/modular.dart' as i8;
|
||||
import 'package:sqlite3/common.dart' as i9;
|
||||
import 'package:weblibre/features/user/data/database/daos/proxy_profile.dart'
|
||||
as i8;
|
||||
import 'package:drift/internal/modular.dart' as i9;
|
||||
import 'package:sqlite3/common.dart' as i10;
|
||||
|
||||
abstract class $UserDatabase extends i0.GeneratedDatabase {
|
||||
$UserDatabase(i0.QueryExecutor e) : super(e);
|
||||
$UserDatabaseManager get managers => $UserDatabaseManager(this);
|
||||
late final i1.Setting setting = i1.Setting(this);
|
||||
late final i1.ProxyProfileTable proxyProfile = i1.ProxyProfileTable(this);
|
||||
late final i1.IconCache iconCache = i1.IconCache(this);
|
||||
late final i1.Onboarding onboarding = i1.Onboarding(this);
|
||||
late final i1.Riverpod riverpod = i1.Riverpod(this);
|
||||
@@ -35,7 +38,10 @@ abstract class $UserDatabase extends i0.GeneratedDatabase {
|
||||
late final i7.SearchTokensDao searchTokensDao = i7.SearchTokensDao(
|
||||
this as i3.UserDatabase,
|
||||
);
|
||||
i1.DefinitionsDrift get definitionsDrift => i8.ReadDatabaseContainer(
|
||||
late final i8.ProxyProfileDao proxyProfileDao = i8.ProxyProfileDao(
|
||||
this as i3.UserDatabase,
|
||||
);
|
||||
i1.DefinitionsDrift get definitionsDrift => i9.ReadDatabaseContainer(
|
||||
this,
|
||||
).accessor<i1.DefinitionsDrift>(i1.DefinitionsDrift.new);
|
||||
@override
|
||||
@@ -44,6 +50,8 @@ abstract class $UserDatabase extends i0.GeneratedDatabase {
|
||||
@override
|
||||
List<i0.DatabaseSchemaEntity> get allSchemaEntities => [
|
||||
setting,
|
||||
proxyProfile,
|
||||
i1.idxProxyProfileUpdatedAt,
|
||||
iconCache,
|
||||
onboarding,
|
||||
riverpod,
|
||||
@@ -60,6 +68,8 @@ class $UserDatabaseManager {
|
||||
$UserDatabaseManager(this._db);
|
||||
i1.$SettingTableManager get setting =>
|
||||
i1.$SettingTableManager(_db, _db.setting);
|
||||
i1.$ProxyProfileTableTableManager get proxyProfile =>
|
||||
i1.$ProxyProfileTableTableManager(_db, _db.proxyProfile);
|
||||
i1.$IconCacheTableManager get iconCache =>
|
||||
i1.$IconCacheTableManager(_db, _db.iconCache);
|
||||
i1.$OnboardingTableManager get onboarding =>
|
||||
@@ -72,7 +82,7 @@ class $UserDatabaseManager {
|
||||
i1.$SearchTokensTableManager(_db, _db.searchTokens);
|
||||
}
|
||||
|
||||
extension DefineFunctions on i9.CommonDatabase {
|
||||
extension DefineFunctions on i10.CommonDatabase {
|
||||
void defineFunctions({
|
||||
required String Function(int, String?) lexoRankNext,
|
||||
required String Function(int, String?) lexoRankPrevious,
|
||||
@@ -86,7 +96,7 @@ extension DefineFunctions on i9.CommonDatabase {
|
||||
}) {
|
||||
createFunction(
|
||||
functionName: 'lexo_rank_next',
|
||||
argumentCount: const i9.AllowedArgumentCount(2),
|
||||
argumentCount: const i10.AllowedArgumentCount(2),
|
||||
function: (args) {
|
||||
final arg0 = args[0] as int;
|
||||
final arg1 = args[1] as String?;
|
||||
@@ -95,7 +105,7 @@ extension DefineFunctions on i9.CommonDatabase {
|
||||
);
|
||||
createFunction(
|
||||
functionName: 'lexo_rank_previous',
|
||||
argumentCount: const i9.AllowedArgumentCount(2),
|
||||
argumentCount: const i10.AllowedArgumentCount(2),
|
||||
function: (args) {
|
||||
final arg0 = args[0] as int;
|
||||
final arg1 = args[1] as String?;
|
||||
@@ -104,7 +114,7 @@ extension DefineFunctions on i9.CommonDatabase {
|
||||
);
|
||||
createFunction(
|
||||
functionName: 'lexo_rank_reorder_after',
|
||||
argumentCount: const i9.AllowedArgumentCount(2),
|
||||
argumentCount: const i10.AllowedArgumentCount(2),
|
||||
function: (args) {
|
||||
final arg0 = args[0] as String?;
|
||||
final arg1 = args[1] as String?;
|
||||
@@ -113,7 +123,7 @@ extension DefineFunctions on i9.CommonDatabase {
|
||||
);
|
||||
createFunction(
|
||||
functionName: 'lexo_rank_reorder_before',
|
||||
argumentCount: const i9.AllowedArgumentCount(2),
|
||||
argumentCount: const i10.AllowedArgumentCount(2),
|
||||
function: (args) {
|
||||
final arg0 = args[0] as String?;
|
||||
final arg1 = args[1] as String?;
|
||||
@@ -122,14 +132,14 @@ extension DefineFunctions on i9.CommonDatabase {
|
||||
);
|
||||
createFunction(
|
||||
functionName: 'generate_content_hash',
|
||||
argumentCount: const i9.AllowedArgumentCount(0),
|
||||
argumentCount: const i10.AllowedArgumentCount(0),
|
||||
function: (args) {
|
||||
return generateContentHash();
|
||||
},
|
||||
);
|
||||
createFunction(
|
||||
functionName: 'url_indexable',
|
||||
argumentCount: const i9.AllowedArgumentCount(1),
|
||||
argumentCount: const i10.AllowedArgumentCount(1),
|
||||
function: (args) {
|
||||
final arg0 = args[0] as String?;
|
||||
return urlIndexable(arg0);
|
||||
@@ -137,7 +147,7 @@ extension DefineFunctions on i9.CommonDatabase {
|
||||
);
|
||||
createFunction(
|
||||
functionName: 'url_canonical',
|
||||
argumentCount: const i9.AllowedArgumentCount(1),
|
||||
argumentCount: const i10.AllowedArgumentCount(1),
|
||||
function: (args) {
|
||||
final arg0 = args[0] as String?;
|
||||
return urlCanonical(arg0);
|
||||
@@ -145,7 +155,7 @@ extension DefineFunctions on i9.CommonDatabase {
|
||||
);
|
||||
createFunction(
|
||||
functionName: 'url_host',
|
||||
argumentCount: const i9.AllowedArgumentCount(1),
|
||||
argumentCount: const i10.AllowedArgumentCount(1),
|
||||
function: (args) {
|
||||
final arg0 = args[0] as String?;
|
||||
return urlHost(arg0);
|
||||
@@ -153,7 +163,7 @@ extension DefineFunctions on i9.CommonDatabase {
|
||||
);
|
||||
createFunction(
|
||||
functionName: 'url_path',
|
||||
argumentCount: const i9.AllowedArgumentCount(1),
|
||||
argumentCount: const i10.AllowedArgumentCount(1),
|
||||
function: (args) {
|
||||
final arg0 = args[0] as String?;
|
||||
return urlPath(arg0);
|
||||
|
||||
Reference in New Issue
Block a user