mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-10-28 19:02:51 +00:00
Compare commits
3 commits
82ddd10627
...
40b6d7707a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
40b6d7707a | ||
|
|
cbf316db31 | ||
|
|
33a36ada4b |
4 changed files with 25 additions and 13 deletions
|
|
@ -326,6 +326,14 @@ class ObjectUtil {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for (const key in b) {
|
||||||
|
if (!b.hasOwnProperty(key)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!a.hasOwnProperty(key)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -983,11 +983,13 @@
|
||||||
const list = this.clientCount[inbound.id][this.filterBy];
|
const list = this.clientCount[inbound.id][this.filterBy];
|
||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
const filteredSettings = { "clients": [] };
|
const filteredSettings = { "clients": [] };
|
||||||
inboundSettings.clients.forEach(client => {
|
if (inboundSettings.clients) {
|
||||||
if (list.includes(client.email)) {
|
inboundSettings.clients.forEach(client => {
|
||||||
filteredSettings.clients.push(client);
|
if (list.includes(client.email)) {
|
||||||
}
|
filteredSettings.clients.push(client);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
newInbound.settings = Inbound.Settings.fromJson(inbound.protocol, filteredSettings);
|
newInbound.settings = Inbound.Settings.fromJson(inbound.protocol, filteredSettings);
|
||||||
this.searchedInbounds.push(newInbound);
|
this.searchedInbounds.push(newInbound);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,7 @@
|
||||||
{ label: '🇨🇳 China', value: 'geosite:cn' },
|
{ label: '🇨🇳 China', value: 'geosite:cn' },
|
||||||
{ label: '🇨🇳 .cn', value: 'regexp:.*\\.cn$' },
|
{ label: '🇨🇳 .cn', value: 'regexp:.*\\.cn$' },
|
||||||
{ label: '🇷🇺 Russia', value: 'ext:geosite_RU.dat:ru-available-only-inside' },
|
{ label: '🇷🇺 Russia', value: 'ext:geosite_RU.dat:ru-available-only-inside' },
|
||||||
{ label: '🇷🇺 .ru', value: 'regexp:.*\\.ru' },
|
{ label: '🇷🇺 .ru', value: 'regexp:.*\\.ru$' },
|
||||||
{ label: '🇷🇺 .su', value: 'regexp:.*\\.su$' },
|
{ label: '🇷🇺 .su', value: 'regexp:.*\\.su$' },
|
||||||
{ label: '🇷🇺 .рф', value: 'regexp:.*\\.xn--p1ai$' },
|
{ label: '🇷🇺 .рф', value: 'regexp:.*\\.xn--p1ai$' },
|
||||||
{ label: '🇻🇳 .vn', value: 'regexp:.*\\.vn$' },
|
{ label: '🇻🇳 .vn', value: 'regexp:.*\\.vn$' },
|
||||||
|
|
|
||||||
|
|
@ -40,17 +40,19 @@ func (j *CheckClientIpJob) Run() {
|
||||||
f2bInstalled := j.checkFail2BanInstalled()
|
f2bInstalled := j.checkFail2BanInstalled()
|
||||||
isAccessLogAvailable := j.checkAccessLogAvailable(iplimitActive)
|
isAccessLogAvailable := j.checkAccessLogAvailable(iplimitActive)
|
||||||
|
|
||||||
if iplimitActive {
|
if isAccessLogAvailable {
|
||||||
if runtime.GOOS == "windows" {
|
if runtime.GOOS == "windows" {
|
||||||
if isAccessLogAvailable {
|
if iplimitActive {
|
||||||
shouldClearAccessLog = j.processLogFile()
|
shouldClearAccessLog = j.processLogFile()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if f2bInstalled && isAccessLogAvailable {
|
if iplimitActive {
|
||||||
shouldClearAccessLog = j.processLogFile()
|
if f2bInstalled {
|
||||||
} else {
|
shouldClearAccessLog = j.processLogFile()
|
||||||
if !f2bInstalled {
|
} else {
|
||||||
logger.Warning("[LimitIP] Fail2Ban is not installed, Please install Fail2Ban from the x-ui bash menu.")
|
if !f2bInstalled {
|
||||||
|
logger.Warning("[LimitIP] Fail2Ban is not installed, Please install Fail2Ban from the x-ui bash menu.")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue