From 40fc7ecc3939885bec49bc6e08c9199fe34684b1 Mon Sep 17 00:00:00 2001 From: Stefan Werfling Date: Thu, 21 Sep 2023 10:10:17 +0200 Subject: [PATCH] #21 DB service object --- README.md | 4 ++ backend/src/Routes/Main/Dashboard/Info.ts | 11 +--- .../Main/IpAccess/Blacklist/Import/List.ts | 15 +++--- .../Routes/Main/IpAccess/Maintainer/List.ts | 6 +-- .../src/Routes/Main/IpAccess/UtilsLocation.ts | 12 +---- .../inc/Provider/Firehol/FireholDownloader.ts | 1 + backend/src/inc/Service/BlacklistService.ts | 31 ++++------- backend/src/inc/Service/IpLocationService.ts | 12 ++--- backend/src/main.ts | 6 --- core/src/inc/Db/MariaDb/DBEntitiesLoader.ts | 6 +++ .../MariaDb/Entity/IpBlacklistMaintainer.ts | 11 ++-- .../inc/Db/MariaDb/Entity/IpListMaintainer.ts | 11 ++-- .../src/inc/Db/MariaDb/Entity/IpLocation.ts | 11 ++-- .../MariaDb/IpBlacklistMaintainerService.ts | 54 +++++++++++++++++++ .../inc/Db/MariaDb/IpListMaintainerService.ts | 39 ++++++++++++++ core/src/inc/Db/MariaDb/IpLocationService.ts | 53 ++++++++++++++++++ core/src/index.ts | 6 +++ 17 files changed, 198 insertions(+), 91 deletions(-) rename {backend => core}/src/inc/Db/MariaDb/Entity/IpBlacklistMaintainer.ts (55%) rename {backend => core}/src/inc/Db/MariaDb/Entity/IpListMaintainer.ts (65%) rename {backend => core}/src/inc/Db/MariaDb/Entity/IpLocation.ts (85%) create mode 100644 core/src/inc/Db/MariaDb/IpBlacklistMaintainerService.ts create mode 100644 core/src/inc/Db/MariaDb/IpListMaintainerService.ts create mode 100644 core/src/inc/Db/MariaDb/IpLocationService.ts diff --git a/README.md b/README.md index 2713c9e..8e244b8 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,10 @@ In the classic sense, FlyingFish is a nginx manager. But the way the nginx serve ## Quick setup [Read the Documentation quick setup](https://flying-fish.gitbook.io/flyingfish/index/installation#quick-setup) +## In progress + +[Version 1.0.24](https://github.com/stefanwerfling/flyingfish/milestone/1) + ## Docker Hub diff --git a/backend/src/Routes/Main/Dashboard/Info.ts b/backend/src/Routes/Main/Dashboard/Info.ts index 0fc2d96..fe68c17 100644 --- a/backend/src/Routes/Main/Dashboard/Info.ts +++ b/backend/src/Routes/Main/Dashboard/Info.ts @@ -1,6 +1,5 @@ -import {DBHelper, IpBlacklistServiceDB} from 'flyingfish_core'; +import {IpBlacklistServiceDB, IpLocationServiceDB} from 'flyingfish_core'; import {DashboardInfoIpBlock, DashboardInfoResponse, StatusCodes} from 'flyingfish_schemas'; -import {IpLocation as IpLocationDB} from '../../../inc/Db/MariaDb/Entity/IpLocation.js'; import {HimHIP} from '../../../inc/HimHIP/HimHIP.js'; import {HowIsMyPublicIpService} from '../../../inc/Service/HowIsMyPublicIpService.js'; import {IpService} from '../../../inc/Service/IpService.js'; @@ -14,8 +13,6 @@ export class Info { * getInfo */ public static async getInfo(): Promise { - const ipLocationRepository = DBHelper.getRepository(IpLocationDB); - // ip blocks --------------------------------------------------------------------------------------------------- const ipblocks: DashboardInfoIpBlock[] = []; @@ -27,11 +24,7 @@ export class Info { if (entries) { for await (const entry of entries) { - const tlocation = await ipLocationRepository.findOne({ - where: { - id: entry.ip_location_id - } - }); + const tlocation = await IpLocationServiceDB.getInstance().findOne(entry.ip_location_id); if (tlocation) { ipblocks.push({ diff --git a/backend/src/Routes/Main/IpAccess/Blacklist/Import/List.ts b/backend/src/Routes/Main/IpAccess/Blacklist/Import/List.ts index e35aa03..b8caf12 100644 --- a/backend/src/Routes/Main/IpAccess/Blacklist/Import/List.ts +++ b/backend/src/Routes/Main/IpAccess/Blacklist/Import/List.ts @@ -1,7 +1,10 @@ -import {DBHelper, IpBlacklistCategoryServiceDB, IpBlacklistServiceDB} from 'flyingfish_core'; +import { + IpBlacklistCategoryServiceDB, + IpBlacklistMaintainerServiceDB, + IpBlacklistServiceDB +} from 'flyingfish_core'; import {IpAccessBlackListImport, IpAccessBlackListImportsResponse, StatusCodes} from 'flyingfish_schemas'; import {UtilsLocation} from '../../UtilsLocation.js'; -import {IpBlacklistMaintainer as IpBlacklistMaintainerDB} from '../../../../../inc/Db/MariaDb/Entity/IpBlacklistMaintainer.js'; /** * List @@ -14,8 +17,6 @@ export class List { public static async getBlackListImports(): Promise { const limit = 20; - const ipBlacklistMaintainerRepository = DBHelper.getRepository(IpBlacklistMaintainerDB); - const entries = await IpBlacklistServiceDB.getInstance().findAllImported(limit, 'DESC'); const list: IpAccessBlackListImport[] = []; @@ -34,11 +35,7 @@ export class List { } } - const maints = await ipBlacklistMaintainerRepository.find({ - where: { - ip_id: entry.id - } - }); + const maints = await IpBlacklistMaintainerServiceDB.getInstance().findAllByIp(entry.id); if (maints) { for (const maint of maints) { diff --git a/backend/src/Routes/Main/IpAccess/Maintainer/List.ts b/backend/src/Routes/Main/IpAccess/Maintainer/List.ts index 4bfc84d..459bcfd 100644 --- a/backend/src/Routes/Main/IpAccess/Maintainer/List.ts +++ b/backend/src/Routes/Main/IpAccess/Maintainer/List.ts @@ -1,6 +1,5 @@ -import {DBHelper} from 'flyingfish_core'; +import {IpListMaintainerServiceDB} from 'flyingfish_core'; import {IpAccessMaintainer, IpAccessMaintainerResponse, StatusCodes} from 'flyingfish_schemas'; -import {IpListMaintainer as IpListMaintainerDB} from '../../../../inc/Db/MariaDb/Entity/IpListMaintainer.js'; /** * List @@ -11,8 +10,7 @@ export class List { * getMaintainerList */ public static async getMaintainerList(): Promise { - const ipListMaintainerRepository = DBHelper.getRepository(IpListMaintainerDB); - const maintainers = await ipListMaintainerRepository.find(); + const maintainers = await IpListMaintainerServiceDB.getInstance().findAll(); const list: IpAccessMaintainer[] = []; diff --git a/backend/src/Routes/Main/IpAccess/UtilsLocation.ts b/backend/src/Routes/Main/IpAccess/UtilsLocation.ts index 1246c16..1e89901 100644 --- a/backend/src/Routes/Main/IpAccess/UtilsLocation.ts +++ b/backend/src/Routes/Main/IpAccess/UtilsLocation.ts @@ -1,7 +1,5 @@ -import {DBHelper} from 'flyingfish_core'; +import {IpLocationServiceDB} from 'flyingfish_core'; import {IpAccessLocation} from 'flyingfish_schemas'; -import {IpLocation as IpLocationDB} from '../../../inc/Db/MariaDb/Entity/IpLocation.js'; -import {In} from 'typeorm'; /** * UtilsLocation @@ -14,15 +12,9 @@ export class UtilsLocation { * @protected */ public static async getLocations(locationIds: number[]): Promise { - const ipLocationRepository = DBHelper.getRepository(IpLocationDB); - const locations: IpAccessLocation[] = []; - const tlocations = await ipLocationRepository.find({ - where: { - id: In(locationIds) - } - }); + const tlocations = await IpLocationServiceDB.getInstance().findAllByIds(locationIds); if (tlocations) { for (const tlocation of tlocations) { diff --git a/backend/src/inc/Provider/Firehol/FireholDownloader.ts b/backend/src/inc/Provider/Firehol/FireholDownloader.ts index bd66d4e..5c20c27 100644 --- a/backend/src/inc/Provider/Firehol/FireholDownloader.ts +++ b/backend/src/inc/Provider/Firehol/FireholDownloader.ts @@ -11,6 +11,7 @@ export class FireholDownloader { /** * download url + * @check https://github.com/lucadp76/blocklist-ipsets * @protected */ protected _url = 'https://github.com/firehol/blocklist-ipsets/archive/refs/heads/master.zip'; diff --git a/backend/src/inc/Service/BlacklistService.ts b/backend/src/inc/Service/BlacklistService.ts index 6f28baf..5844abc 100644 --- a/backend/src/inc/Service/BlacklistService.ts +++ b/backend/src/inc/Service/BlacklistService.ts @@ -2,13 +2,11 @@ import { DateHelper, DBHelper, IpBlacklistCategoryDB, IpBlacklistCategoryServiceDB, - IpBlacklistDB, - IpBlacklistServiceDB, + IpBlacklistDB, IpBlacklistMaintainerDB, IpBlacklistMaintainerServiceDB, + IpBlacklistServiceDB, IpListMaintainerDB, IpListMaintainerServiceDB, Logger } from 'flyingfish_core'; import {Job, scheduleJob} from 'node-schedule'; -import {IpBlacklistMaintainer as IpBlacklistMaintainerDB} from '../Db/MariaDb/Entity/IpBlacklistMaintainer.js'; -import {IpListMaintainer as IpListMaintainerDB} from '../Db/MariaDb/Entity/IpListMaintainer.js'; import {Firehol} from '../Provider/Firehol/Firehol.js'; import {Settings as GlobalSettings} from '../Settings/Settings.js'; @@ -76,9 +74,6 @@ export class BlacklistService { const fh = new Firehol(); await fh.loadList(); - const ipListMaintainerRepository = DBHelper.getRepository(IpListMaintainerDB); - const ipBlacklistMaintainerRepository = DBHelper.getRepository(IpBlacklistMaintainerDB); - const ipSetParsers = fh.getIpSets().values(); for await (const ipSetParser of ipSetParsers) { @@ -90,11 +85,8 @@ export class BlacklistService { // add maintainer infos ------------------------------------------------------------------------------------ if (meta.maintainer) { - ipListMaintainer = await ipListMaintainerRepository.findOne({ - where: { - maintainer_name: ipSetParser.getMeta().maintainer - } - }); + + ipListMaintainer = await IpListMaintainerServiceDB.getInstance().findByMaintainerName(meta.maintainer); if (!ipListMaintainer) { const nIpListMaintainer = new IpListMaintainerDB(); @@ -103,7 +95,7 @@ export class BlacklistService { nIpListMaintainer.maintainer_url = meta.maintainer_url ? meta.maintainer_url : ''; nIpListMaintainer.list_source_url = meta.list_source_url ? meta.list_source_url : ''; - ipListMaintainer = await DBHelper.getDataSource().manager.save(nIpListMaintainer); + ipListMaintainer = await IpListMaintainerServiceDB.getInstance().save(nIpListMaintainer); } } @@ -141,19 +133,18 @@ export class BlacklistService { // link maintainer --------------------------------------------------------------------------------- if (ipListMaintainer) { - const blackMaintainer = await ipBlacklistMaintainerRepository.findOne({ - where: { - ip_id: ipBlacklistEntry.id, - ip_maintainer_id: ipListMaintainer.id - } - }); + const blackMaintainer = + await IpBlacklistMaintainerServiceDB.getInstance().findByIp( + ipBlacklistEntry.id, + ipListMaintainer.id + ); if (!blackMaintainer) { const nBlackMaintainer = new IpBlacklistMaintainerDB(); nBlackMaintainer.ip_id = ipBlacklistEntry.id; nBlackMaintainer.ip_maintainer_id = ipListMaintainer.id; - await DBHelper.getDataSource().manager.save(nBlackMaintainer); + await IpBlacklistMaintainerServiceDB.getInstance().save(nBlackMaintainer); } } diff --git a/backend/src/inc/Service/IpLocationService.ts b/backend/src/inc/Service/IpLocationService.ts index 1df6cfe..697bb9b 100644 --- a/backend/src/inc/Service/IpLocationService.ts +++ b/backend/src/inc/Service/IpLocationService.ts @@ -1,6 +1,5 @@ -import {DBHelper, IpBlacklistServiceDB, Logger} from 'flyingfish_core'; +import {DBHelper, IpBlacklistServiceDB, IpLocationDB, IpLocationServiceDB, Logger} from 'flyingfish_core'; import {Job, scheduleJob} from 'node-schedule'; -import {IpLocation as IpLocationDB} from '../Db/MariaDb/Entity/IpLocation.js'; import {IpWhitelist as IpWhitelistDB} from '../Db/MariaDb/Entity/IpWhitelist.js'; import {IpLocateIo} from '../Provider/IpLocate/IpLocateIo.js'; import {Settings as GlobalSettings} from '../Settings/Settings.js'; @@ -39,12 +38,7 @@ export class IpLocationService { * @protected */ protected async _getIpLocation(ip: string): Promise { - const ipLocationRepository = DBHelper.getRepository(IpLocationDB); - const aIpLocation = await ipLocationRepository.findOne({ - where: { - ip: ip - } - }); + const aIpLocation = await IpLocationServiceDB.getInstance().findByIp(ip); if (aIpLocation) { return aIpLocation.id; @@ -69,7 +63,7 @@ export class IpLocationService { newIpLocation.org = location.org || ''; newIpLocation.asn = location.asn || ''; - newIpLocation = await DBHelper.getDataSource().manager.save(newIpLocation); + newIpLocation = await IpLocationServiceDB.getInstance().save(newIpLocation); return newIpLocation.id; } diff --git a/backend/src/main.ts b/backend/src/main.ts index c66870a..d617ac6 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -7,9 +7,6 @@ import { } from 'flyingfish_core'; import {EntitySchema, MixedList} from 'typeorm'; import {InfluxDbHelper} from './inc/Db/InfluxDb/InfluxDbHelper.js'; -import {IpBlacklistMaintainer as IpBlacklistMaintainerDB} from './inc/Db/MariaDb/Entity/IpBlacklistMaintainer.js'; -import {IpListMaintainer as IpListMaintainerDB} from './inc/Db/MariaDb/Entity/IpListMaintainer.js'; -import {IpLocation as IpLocationDB} from './inc/Db/MariaDb/Entity/IpLocation.js'; import {IpWhitelist as IpWhitelistDB} from './inc/Db/MariaDb/Entity/IpWhitelist.js'; import {NginxHttpVariable as NginxHttpVariableDB} from './inc/Db/MariaDb/Entity/NginxHttpVariable.js'; import {Dns2Server} from './inc/Dns/Dns2Server.js'; @@ -116,9 +113,6 @@ import exitHook from 'async-exit-hook'; entities.push(NginxHttpDB); entities.push(NginxHttpVariableDB); entities.push(NginxLocationDB); - entities.push(IpListMaintainerDB); - entities.push(IpLocationDB); - entities.push(IpBlacklistMaintainerDB); entities.push(IpWhitelistDB); await DBHelper.init({ diff --git a/core/src/inc/Db/MariaDb/DBEntitiesLoader.ts b/core/src/inc/Db/MariaDb/DBEntitiesLoader.ts index ff7c28b..3c7533d 100644 --- a/core/src/inc/Db/MariaDb/DBEntitiesLoader.ts +++ b/core/src/inc/Db/MariaDb/DBEntitiesLoader.ts @@ -10,6 +10,9 @@ import {DynDnsServerUser} from './Entity/DynDnsServerUser.js'; import {GatewayIdentifier} from './Entity/GatewayIdentifier.js'; import {IpBlacklist} from './Entity/IpBlacklist.js'; import {IpBlacklistCategory} from './Entity/IpBlacklistCategory.js'; +import {IpBlacklistMaintainer} from './Entity/IpBlacklistMaintainer.js'; +import {IpListMaintainer} from './Entity/IpListMaintainer.js'; +import {IpLocation} from './Entity/IpLocation.js'; import {NatPort} from './Entity/NatPort.js'; import {NginxStream} from './Entity/NginxStream.js'; import {NginxUpstream} from './Entity/NginxUpstream.js'; @@ -43,6 +46,9 @@ export class DBEntitiesLoader { GatewayIdentifier, IpBlacklist, IpBlacklistCategory, + IpBlacklistMaintainer, + IpListMaintainer, + IpLocation, NatPort, NginxStream, NginxUpstream, diff --git a/backend/src/inc/Db/MariaDb/Entity/IpBlacklistMaintainer.ts b/core/src/inc/Db/MariaDb/Entity/IpBlacklistMaintainer.ts similarity index 55% rename from backend/src/inc/Db/MariaDb/Entity/IpBlacklistMaintainer.ts rename to core/src/inc/Db/MariaDb/Entity/IpBlacklistMaintainer.ts index 78b84d6..b1446ef 100644 --- a/backend/src/inc/Db/MariaDb/Entity/IpBlacklistMaintainer.ts +++ b/core/src/inc/Db/MariaDb/Entity/IpBlacklistMaintainer.ts @@ -1,16 +1,11 @@ -import {BaseEntity, Column, Entity, Index, PrimaryGeneratedColumn} from 'typeorm'; +import {Column, Entity, Index} from 'typeorm'; +import {DBBaseEntityId} from '../DBBaseEntityId.js'; /** * ip blacklist maintainer */ @Entity({name: 'ip_blacklist_maintainer'}) -export class IpBlacklistMaintainer extends BaseEntity { - - /** - * id - */ - @PrimaryGeneratedColumn() - public id!: number; +export class IpBlacklistMaintainer extends DBBaseEntityId { /** * ip id diff --git a/backend/src/inc/Db/MariaDb/Entity/IpListMaintainer.ts b/core/src/inc/Db/MariaDb/Entity/IpListMaintainer.ts similarity index 65% rename from backend/src/inc/Db/MariaDb/Entity/IpListMaintainer.ts rename to core/src/inc/Db/MariaDb/Entity/IpListMaintainer.ts index 25f51ab..fc7722c 100644 --- a/backend/src/inc/Db/MariaDb/Entity/IpListMaintainer.ts +++ b/core/src/inc/Db/MariaDb/Entity/IpListMaintainer.ts @@ -1,16 +1,11 @@ -import {BaseEntity, Column, Entity, Index, PrimaryGeneratedColumn} from 'typeorm'; +import {Column, Entity, Index} from 'typeorm'; +import {DBBaseEntityId} from '../DBBaseEntityId.js'; /** * ip list maintainer */ @Entity({name: 'ip_list_maintainer'}) -export class IpListMaintainer extends BaseEntity { - - /** - * id - */ - @PrimaryGeneratedColumn() - public id!: number; +export class IpListMaintainer extends DBBaseEntityId { /** * maintainer name diff --git a/backend/src/inc/Db/MariaDb/Entity/IpLocation.ts b/core/src/inc/Db/MariaDb/Entity/IpLocation.ts similarity index 85% rename from backend/src/inc/Db/MariaDb/Entity/IpLocation.ts rename to core/src/inc/Db/MariaDb/Entity/IpLocation.ts index 7340646..3273adf 100644 --- a/backend/src/inc/Db/MariaDb/Entity/IpLocation.ts +++ b/core/src/inc/Db/MariaDb/Entity/IpLocation.ts @@ -1,16 +1,11 @@ -import {BaseEntity, Column, Entity, Index, PrimaryGeneratedColumn} from 'typeorm'; +import {Column, Entity, Index} from 'typeorm'; +import {DBBaseEntityId} from '../DBBaseEntityId.js'; /** * IpLocation */ @Entity({name: 'ip_location'}) -export class IpLocation extends BaseEntity { - - /** - * id - */ - @PrimaryGeneratedColumn() - public id!: number; +export class IpLocation extends DBBaseEntityId { /** * ip diff --git a/core/src/inc/Db/MariaDb/IpBlacklistMaintainerService.ts b/core/src/inc/Db/MariaDb/IpBlacklistMaintainerService.ts new file mode 100644 index 0000000..6a97381 --- /dev/null +++ b/core/src/inc/Db/MariaDb/IpBlacklistMaintainerService.ts @@ -0,0 +1,54 @@ +import {DBService} from './DBService.js'; +import {IpBlacklistMaintainer} from './Entity/IpBlacklistMaintainer.js'; + +/** + * Ip blacklist maintainer service object. + */ +export class IpBlacklistMaintainerService extends DBService { + + /** + * register name + */ + public static REGISTER_NAME = 'ip_blacklist_maintainer'; + + /** + * Return an intance from ip blacklist maintainer service. + * @returns {IpBlacklistMaintainerService} + */ + public static getInstance(): IpBlacklistMaintainerService { + return DBService.getSingleInstance( + IpBlacklistMaintainerService, + IpBlacklistMaintainer, + IpBlacklistMaintainerService.REGISTER_NAME + ); + } + + /** + * Find a blacklist maintainer by ip id and ip maintainer id. + * @param {number} ipId + * @param {number} ipMaintainerId + * @returns {IpBlacklistMaintainer|null} + */ + public async findByIp(ipId: number, ipMaintainerId: number): Promise { + return this._repository.findOne({ + where: { + ip_id: ipId, + ip_maintainer_id: ipMaintainerId + } + }); + } + + /** + * Find all blacklist maintainers by ip id. + * @param {number} ipId + * @returns {IpBlacklistMaintainer[]} + */ + public async findAllByIp(ipId: number): Promise { + return this._repository.find({ + where: { + ip_id: ipId + } + }); + } + +} \ No newline at end of file diff --git a/core/src/inc/Db/MariaDb/IpListMaintainerService.ts b/core/src/inc/Db/MariaDb/IpListMaintainerService.ts new file mode 100644 index 0000000..d1efa15 --- /dev/null +++ b/core/src/inc/Db/MariaDb/IpListMaintainerService.ts @@ -0,0 +1,39 @@ +import {DBService} from './DBService.js'; +import {IpListMaintainer} from './Entity/IpListMaintainer.js'; + +/** + * Ip list maintainer service object. + */ +export class IpListMaintainerService extends DBService { + + /** + * register name + */ + public static REGISTER_NAME = 'ip_list_maintainer'; + + /** + * Return an intance from ip list maintainer service. + * @returns {IpListMaintainerService} + */ + public static getInstance(): IpListMaintainerService { + return DBService.getSingleInstance( + IpListMaintainerService, + IpListMaintainer, + IpListMaintainerService.REGISTER_NAME + ); + } + + /** + * Find an ip list maintainer by name. + * @param {string} name + * @returns {IpListMaintainer|null} + */ + public async findByMaintainerName(name: string): Promise { + return this._repository.findOne({ + where: { + maintainer_name: name + } + }); + } + +} \ No newline at end of file diff --git a/core/src/inc/Db/MariaDb/IpLocationService.ts b/core/src/inc/Db/MariaDb/IpLocationService.ts new file mode 100644 index 0000000..d93c022 --- /dev/null +++ b/core/src/inc/Db/MariaDb/IpLocationService.ts @@ -0,0 +1,53 @@ +import {In} from 'typeorm'; +import {DBService} from './DBService.js'; +import {IpLocation} from './Entity/IpLocation.js'; + +/** + * Ip location service object. + */ +export class IpLocationService extends DBService { + + /** + * register name + */ + public static REGISTER_NAME = 'ip_location'; + + /** + * Return an intance from ip location service. + * @returns {IpListMaintainerService} + */ + public static getInstance(): IpLocationService { + return DBService.getSingleInstance( + IpLocationService, + IpLocation, + IpLocationService.REGISTER_NAME + ); + } + + /** + * Find a location by ip. + * @param {string} ip + * @returns {IpLocation|null} + */ + public async findByIp(ip: string): Promise { + return this._repository.findOne({ + where: { + ip: ip + } + }); + } + + /** + * Find all ip locations by ids. + * @param {number[]} ids + * @returns {IpLocation[]} + */ + public async findAllByIds(ids: number[]): Promise { + return this._repository.find({ + where: { + id: In(ids) + } + }); + } + +} \ No newline at end of file diff --git a/core/src/index.ts b/core/src/index.ts index e441120..74ce559 100644 --- a/core/src/index.ts +++ b/core/src/index.ts @@ -27,6 +27,9 @@ export {DynDnsServerUser as DynDnsServerUserDB} from './inc/Db/MariaDb/Entity/Dy export {GatewayIdentifier as GatewayIdentifierDB} from './inc/Db/MariaDb/Entity/GatewayIdentifier.js'; export {IpBlacklist as IpBlacklistDB} from './inc/Db/MariaDb/Entity/IpBlacklist.js'; export {IpBlacklistCategory as IpBlacklistCategoryDB} from './inc/Db/MariaDb/Entity/IpBlacklistCategory.js'; +export {IpBlacklistMaintainer as IpBlacklistMaintainerDB} from './inc/Db/MariaDb/Entity/IpBlacklistMaintainer.js'; +export {IpListMaintainer as IpListMaintainerDB} from './inc/Db/MariaDb/Entity/IpListMaintainer.js'; +export {IpLocation as IpLocationDB} from './inc/Db/MariaDb/Entity/IpLocation.js'; export {NatPort as NatPortDB} from './inc/Db/MariaDb/Entity/NatPort.js'; export {NginxStream as NginxStreamDB} from './inc/Db/MariaDb/Entity/NginxStream.js'; export {NginxUpstream as NginxUpstreamDB} from './inc/Db/MariaDb/Entity/NginxUpstream.js'; @@ -45,6 +48,9 @@ export {DynDnsServerDomainService as DynDnsServerDomainServiceDB} from './inc/Db export {GatewayIdentifierService as GatewayIdentifierServiceDB} from './inc/Db/MariaDb/GatewayIdentifierService.js'; export {IpBlacklistService as IpBlacklistServiceDB} from './inc/Db/MariaDb/IpBlacklistService.js'; export {IpBlacklistCategoryService as IpBlacklistCategoryServiceDB} from './inc/Db/MariaDb/IpBlacklistCategoryService.js'; +export {IpBlacklistMaintainerService as IpBlacklistMaintainerServiceDB} from './inc/Db/MariaDb/IpBlacklistMaintainerService.js'; +export {IpListMaintainerService as IpListMaintainerServiceDB} from './inc/Db/MariaDb/IpListMaintainerService.js'; +export {IpLocationService as IpLocationServiceDB} from './inc/Db/MariaDb/IpLocationService.js'; export {NatPortService as NatPortServiceDB} from './inc/Db/MariaDb/NatPortService.js'; export {NginxStreamService as NginxStreamServiceDB} from './inc/Db/MariaDb/NginxStreamService.js'; export {NginxUpstreamService as NginxUpstreamServiceDB} from './inc/Db/MariaDb/NginxUpstreamService.js';