From 5317df21f3923bfa771ed6008d5b0f5f8911e498 Mon Sep 17 00:00:00 2001 From: MHSanaei <33454419+MHSanaei@users.noreply.github.com> Date: Tue, 28 Feb 2023 23:24:29 +0330 Subject: ip limit + export links --- web/assets/js/model/models.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'web/assets/js/model/models.js') diff --git a/web/assets/js/model/models.js b/web/assets/js/model/models.js index 9fa5e7fc..80132a1e 100644 --- a/web/assets/js/model/models.js +++ b/web/assets/js/model/models.js @@ -36,7 +36,7 @@ class DBInbound { this.remark = ""; this.enable = true; this.expiryTime = 0; - + this.iplimit = 0; this.listen = ""; this.port = 0; this.protocol = ""; @@ -109,6 +109,10 @@ class DBInbound { get isExpiry() { return this.expiryTime < new Date().getTime(); } + get isDBInboundEmpty() { + const inbound = this.toInbound(); + return inbound.isInboundEmpty(); + } toInbound() { let settings = {}; @@ -151,10 +155,14 @@ class DBInbound { } } - genLink(clientIndex) { + genLink(clientIndex = 0) { const inbound = this.toInbound(); return inbound.genLink(this.address, this.remark, clientIndex); } + get genInboundLinks() { + const inbound = this.toInbound(); + return inbound.genInboundLinks(this.address, this.remark); + } } class AllSetting { -- cgit v1.2.3