Compare commits

...

6 commits

Author SHA1 Message Date
Ilya Kryuchkov
c27e2d469d
Merge 5df9b4f5c2 into e8c509c720 2025-12-03 21:43:47 +01:00
JieXu
e8c509c720
Update for Red Hat base Linux (#3589)
Some checks are pending
Release 3X-UI / build (386) (push) Waiting to run
Release 3X-UI / build (amd64) (push) Waiting to run
Release 3X-UI / build (arm64) (push) Waiting to run
Release 3X-UI / build (armv5) (push) Waiting to run
Release 3X-UI / build (armv6) (push) Waiting to run
Release 3X-UI / build (armv7) (push) Waiting to run
Release 3X-UI / build (s390x) (push) Waiting to run
Release 3X-UI / Build for Windows (push) Waiting to run
* Update install.sh

* Update update.sh

* Update x-ui.sh

* Update install.sh

* Update update.sh

* Update x-ui.sh

* fix
2025-12-03 21:40:49 +01:00
kr-ilya
5df9b4f5c2 remove duplicate code 2025-12-03 23:12:03 +03:00
Roman Gogolev
83a1c721c7
Fix int64 for 32-bit arch (#3591)
* fix int64 for 32-bit arch

* Update web/service/tgbot.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-03 14:58:54 +01:00
Anton Petrov
7ccc0877a1
Add "Last Online" printing for Telegram bot (#3593) 2025-12-03 14:43:37 +01:00
Evgeny Popov
ad659e48cf
Update x-ui.sh (#3595)
Add curl & openssl pkgs for acme inside docker container
2025-12-03 14:42:10 +01:00
18 changed files with 367 additions and 326 deletions

View file

@ -44,12 +44,16 @@ install_base() {
ubuntu | debian | armbian) ubuntu | debian | armbian)
apt-get update && apt-get install -y -q wget curl tar tzdata apt-get update && apt-get install -y -q wget curl tar tzdata
;; ;;
centos | rhel | almalinux | rocky | ol) fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
yum -y update && yum install -y -q wget curl tar tzdata
;;
fedora | amzn | virtuozzo)
dnf -y update && dnf install -y -q wget curl tar tzdata dnf -y update && dnf install -y -q wget curl tar tzdata
;; ;;
centos)
if [[ "${VERSION_ID}" =~ ^7 ]]; then
yum -y update && yum install -y wget curl tar tzdata
else
dnf -y update && dnf install -y -q wget curl tar tzdata
fi
;;
arch | manjaro | parch) arch | manjaro | parch)
pacman -Syu && pacman -Syu --noconfirm wget curl tar tzdata pacman -Syu && pacman -Syu --noconfirm wget curl tar tzdata
;; ;;

View file

@ -76,12 +76,16 @@ install_base() {
ubuntu | debian | armbian) ubuntu | debian | armbian)
apt-get update >/dev/null 2>&1 && apt-get install -y -q wget curl tar tzdata >/dev/null 2>&1 apt-get update >/dev/null 2>&1 && apt-get install -y -q wget curl tar tzdata >/dev/null 2>&1
;; ;;
centos | rhel | almalinux | rocky | ol) fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
yum -y update >/dev/null 2>&1 && yum install -y -q wget curl tar tzdata >/dev/null 2>&1
;;
fedora | amzn | virtuozzo)
dnf -y update >/dev/null 2>&1 && dnf install -y -q wget curl tar tzdata >/dev/null 2>&1 dnf -y update >/dev/null 2>&1 && dnf install -y -q wget curl tar tzdata >/dev/null 2>&1
;; ;;
centos)
if [[ "${VERSION_ID}" =~ ^7 ]]; then
yum -y update >/dev/null 2>&1 && yum install -y -q wget curl tar tzdata >/dev/null 2>&1
else
dnf -y update >/dev/null 2>&1 && dnf install -y -q wget curl tar tzdata >/dev/null 2>&1
fi
;;
arch | manjaro | parch) arch | manjaro | parch)
pacman -Syu >/dev/null 2>&1 && pacman -Syu --noconfirm wget curl tar tzdata >/dev/null 2>&1 pacman -Syu >/dev/null 2>&1 && pacman -Syu --noconfirm wget curl tar tzdata >/dev/null 2>&1
;; ;;

View file

@ -322,8 +322,9 @@
const { webDomain, webPort, webBasePath, webCertFile, webKeyFile } = this.allSetting; const { webDomain, webPort, webBasePath, webCertFile, webKeyFile } = this.allSetting;
const newProtocol = (webCertFile || webKeyFile) ? "https:" : "http:"; const newProtocol = (webCertFile || webKeyFile) ? "https:" : "http:";
if (!this.entryIsIP) {
const base = webBasePath ? webBasePath.replace(/^\//, "") : ""; const base = webBasePath ? webBasePath.replace(/^\//, "") : "";
if (!this.entryIsIP) {
const url = new URL(window.location.href); const url = new URL(window.location.href);
url.pathname = `/${base}panel/settings`; url.pathname = `/${base}panel/settings`;
window.location.replace(url.toString()); window.location.replace(url.toString());
@ -341,8 +342,6 @@
finalPort = String(webPort); finalPort = String(webPort);
} }
const base = webBasePath ? webBasePath.replace(/^\//, "") : "";
const url = new URL(`${newProtocol}//${finalHost}`); const url = new URL(`${newProtocol}//${finalHost}`);
if (finalPort) url.port = finalPort; if (finalPort) url.port = finalPort;
url.pathname = `/${base}panel/settings`; url.pathname = `/${base}panel/settings`;

View file

@ -210,7 +210,7 @@ func (t *Tgbot) Start(i18nFS embed.FS) error {
// Parse admin IDs from comma-separated string // Parse admin IDs from comma-separated string
if tgBotID != "" { if tgBotID != "" {
for _, adminID := range strings.Split(tgBotID, ",") { for _, adminID := range strings.Split(tgBotID, ",") {
id, err := strconv.Atoi(adminID) id, err := strconv.ParseInt(adminID, 10, 64)
if err != nil { if err != nil {
logger.Warning("Failed to parse admin ID from Telegram bot chat ID:", err) logger.Warning("Failed to parse admin ID from Telegram bot chat ID:", err)
return err return err
@ -905,8 +905,8 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool
t.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot("tgbot.answers.errorOperation")) t.sendCallbackAnswerTgBot(callbackQuery.ID, t.I18nBot("tgbot.answers.errorOperation"))
t.searchClient(chatId, email, callbackQuery.Message.GetMessageID()) t.searchClient(chatId, email, callbackQuery.Message.GetMessageID())
case "add_client_limit_traffic_c": case "add_client_limit_traffic_c":
limitTraffic, _ := strconv.Atoi(dataArray[1]) limitTraffic, _ := strconv.ParseInt(dataArray[1], 10, 64)
client_TotalGB = int64(limitTraffic) * 1024 * 1024 * 1024 client_TotalGB = limitTraffic * 1024 * 1024 * 1024
messageId := callbackQuery.Message.GetMessageID() messageId := callbackQuery.Message.GetMessageID()
inbound, err := t.inboundService.GetInbound(receiver_inbound_ID) inbound, err := t.inboundService.GetInbound(receiver_inbound_ID)
if err != nil { if err != nil {
@ -1010,7 +1010,7 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool
t.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard) t.editMessageCallbackTgBot(chatId, callbackQuery.Message.GetMessageID(), inlineKeyboard)
case "reset_exp_c": case "reset_exp_c":
if len(dataArray) == 3 { if len(dataArray) == 3 {
days, err := strconv.Atoi(dataArray[2]) days, err := strconv.ParseInt(dataArray[2], 10, 64)
if err == nil { if err == nil {
var date int64 var date int64
if days > 0 { if days > 0 {
@ -1115,7 +1115,7 @@ func (t *Tgbot) answerCallback(callbackQuery *telego.CallbackQuery, isAdmin bool
t.searchClient(chatId, email, callbackQuery.Message.GetMessageID()) t.searchClient(chatId, email, callbackQuery.Message.GetMessageID())
case "add_client_reset_exp_c": case "add_client_reset_exp_c":
client_ExpiryTime = 0 client_ExpiryTime = 0
days, _ := strconv.Atoi(dataArray[1]) days, _ := strconv.ParseInt(dataArray[1], 10, 64)
var date int64 var date int64
if client_ExpiryTime > 0 { if client_ExpiryTime > 0 {
if client_ExpiryTime-time.Now().Unix()*1000 < 0 { if client_ExpiryTime-time.Now().Unix()*1000 < 0 {
@ -2952,10 +2952,12 @@ func (t *Tgbot) clientInfoMsg(
} }
status := t.I18nBot("tgbot.offline") status := t.I18nBot("tgbot.offline")
isOnline := false
if p.IsRunning() { if p.IsRunning() {
for _, online := range p.GetOnlineClients() { for _, online := range p.GetOnlineClients() {
if online == traffic.Email { if online == traffic.Email {
status = t.I18nBot("tgbot.online") status = t.I18nBot("tgbot.online")
isOnline = true
break break
} }
} }
@ -2968,6 +2970,9 @@ func (t *Tgbot) clientInfoMsg(
} }
if printOnline { if printOnline {
output += t.I18nBot("tgbot.messages.online", "Status=="+status) output += t.I18nBot("tgbot.messages.online", "Status=="+status)
if !isOnline && traffic.LastOnline > 0 {
output += t.I18nBot("tgbot.messages.lastOnline", "Time=="+time.UnixMilli(traffic.LastOnline).Format("2006-01-02 15:04:05"))
}
} }
if printActive { if printActive {
output += t.I18nBot("tgbot.messages.active", "Enable=="+active) output += t.I18nBot("tgbot.messages.active", "Enable=="+active)

View file

@ -663,6 +663,7 @@
"active" = "💡 مفعل: {{ .Enable }}\r\n" "active" = "💡 مفعل: {{ .Enable }}\r\n"
"enabled" = "🚨 مفعل: {{ .Enable }}\r\n" "enabled" = "🚨 مفعل: {{ .Enable }}\r\n"
"online" = "🌐 حالة الاتصال: {{ .Status }}\r\n" "online" = "🌐 حالة الاتصال: {{ .Status }}\r\n"
"lastOnline" = "🔙 آخر متصل: {{ .Time }}\r\n"
"email" = "📧 الإيميل: {{ .Email }}\r\n" "email" = "📧 الإيميل: {{ .Email }}\r\n"
"upload" = "🔼 رفع: ↑{{ .Upload }}\r\n" "upload" = "🔼 رفع: ↑{{ .Upload }}\r\n"
"download" = "🔽 تنزيل: ↓{{ .Download }}\r\n" "download" = "🔽 تنزيل: ↓{{ .Download }}\r\n"

View file

@ -663,6 +663,7 @@
"active" = "💡 Active: {{ .Enable }}\r\n" "active" = "💡 Active: {{ .Enable }}\r\n"
"enabled" = "🚨 Enabled: {{ .Enable }}\r\n" "enabled" = "🚨 Enabled: {{ .Enable }}\r\n"
"online" = "🌐 Connection status: {{ .Status }}\r\n" "online" = "🌐 Connection status: {{ .Status }}\r\n"
"lastOnline" = "🔙 Last online: {{ .Time }}\r\n"
"email" = "📧 Email: {{ .Email }}\r\n" "email" = "📧 Email: {{ .Email }}\r\n"
"upload" = "🔼 Upload: ↑{{ .Upload }}\r\n" "upload" = "🔼 Upload: ↑{{ .Upload }}\r\n"
"download" = "🔽 Download: ↓{{ .Download }}\r\n" "download" = "🔽 Download: ↓{{ .Download }}\r\n"

View file

@ -663,6 +663,7 @@
"active" = "💡 Activo: {{ .Enable }}\r\n" "active" = "💡 Activo: {{ .Enable }}\r\n"
"enabled" = "🚨 Habilitado: {{ .Enable }}\r\n" "enabled" = "🚨 Habilitado: {{ .Enable }}\r\n"
"online" = "🌐 Estado de conexión: {{ .Status }}\r\n" "online" = "🌐 Estado de conexión: {{ .Status }}\r\n"
"lastOnline" = "🔙 Última conexión: {{ .Time }}\r\n"
"email" = "📧 Email: {{ .Email }}\r\n" "email" = "📧 Email: {{ .Email }}\r\n"
"upload" = "🔼 Subida: ↑{{ .Upload }}\r\n" "upload" = "🔼 Subida: ↑{{ .Upload }}\r\n"
"download" = "🔽 Bajada: ↓{{ .Download }}\r\n" "download" = "🔽 Bajada: ↓{{ .Download }}\r\n"

View file

@ -663,6 +663,7 @@
"active" = "💡 فعال: {{ .Enable }}\r\n" "active" = "💡 فعال: {{ .Enable }}\r\n"
"enabled" = "🚨 وضعیت: {{ .Enable }}\r\n" "enabled" = "🚨 وضعیت: {{ .Enable }}\r\n"
"online" = "🌐 وضعیت اتصال: {{ .Status }}\r\n" "online" = "🌐 وضعیت اتصال: {{ .Status }}\r\n"
"lastOnline" = "🔙 آخرین فعالیت: {{ .Time }}\r\n"
"email" = "📧 ایمیل: {{ .Email }}\r\n" "email" = "📧 ایمیل: {{ .Email }}\r\n"
"upload" = "🔼 آپلود↑: {{ .Upload }}\r\n" "upload" = "🔼 آپلود↑: {{ .Upload }}\r\n"
"download" = "🔽 دانلود↓: {{ .Download }}\r\n" "download" = "🔽 دانلود↓: {{ .Download }}\r\n"

View file

@ -663,6 +663,7 @@
"active" = "💡 Aktif: {{ .Enable }}\r\n" "active" = "💡 Aktif: {{ .Enable }}\r\n"
"enabled" = "🚨 Diaktifkan: {{ .Enable }}\r\n" "enabled" = "🚨 Diaktifkan: {{ .Enable }}\r\n"
"online" = "🌐 Status Koneksi: {{ .Status }}\r\n" "online" = "🌐 Status Koneksi: {{ .Status }}\r\n"
"lastOnline" = "🔙 Terakhir online: {{ .Time }}\r\n"
"email" = "📧 Email: {{ .Email }}\r\n" "email" = "📧 Email: {{ .Email }}\r\n"
"upload" = "🔼 Unggah: ↑{{ .Upload }}\r\n" "upload" = "🔼 Unggah: ↑{{ .Upload }}\r\n"
"download" = "🔽 Unduh: ↓{{ .Download }}\r\n" "download" = "🔽 Unduh: ↓{{ .Download }}\r\n"

View file

@ -663,6 +663,7 @@
"active" = "💡 有効:{{ .Enable }}\r\n" "active" = "💡 有効:{{ .Enable }}\r\n"
"enabled" = "🚨 有効化済み:{{ .Enable }}\r\n" "enabled" = "🚨 有効化済み:{{ .Enable }}\r\n"
"online" = "🌐 接続ステータス:{{ .Status }}\r\n" "online" = "🌐 接続ステータス:{{ .Status }}\r\n"
"lastOnline" = "🔙 最終オンライン: {{ .Time }}\r\n"
"email" = "📧 メール:{{ .Email }}\r\n" "email" = "📧 メール:{{ .Email }}\r\n"
"upload" = "🔼 アップロード↑:{{ .Upload }}\r\n" "upload" = "🔼 アップロード↑:{{ .Upload }}\r\n"
"download" = "🔽 ダウンロード↓:{{ .Download }}\r\n" "download" = "🔽 ダウンロード↓:{{ .Download }}\r\n"

View file

@ -663,6 +663,7 @@
"active" = "💡 Ativo: {{ .Enable }}\r\n" "active" = "💡 Ativo: {{ .Enable }}\r\n"
"enabled" = "🚨 Ativado: {{ .Enable }}\r\n" "enabled" = "🚨 Ativado: {{ .Enable }}\r\n"
"online" = "🌐 Status da conexão: {{ .Status }}\r\n" "online" = "🌐 Status da conexão: {{ .Status }}\r\n"
"lastOnline" = "🔙 Última vez online: {{ .Time }}\r\n"
"email" = "📧 Email: {{ .Email }}\r\n" "email" = "📧 Email: {{ .Email }}\r\n"
"upload" = "🔼 Upload: ↑{{ .Upload }}\r\n" "upload" = "🔼 Upload: ↑{{ .Upload }}\r\n"
"download" = "🔽 Download: ↓{{ .Download }}\r\n" "download" = "🔽 Download: ↓{{ .Download }}\r\n"

View file

@ -663,6 +663,7 @@
"active" = "💡 Активен: {{ .Enable }}\r\n" "active" = "💡 Активен: {{ .Enable }}\r\n"
"enabled" = "🚨 Активен: {{ .Enable }}\r\n" "enabled" = "🚨 Активен: {{ .Enable }}\r\n"
"online" = "🌐 Статус соединения: {{ .Status }}\r\n" "online" = "🌐 Статус соединения: {{ .Status }}\r\n"
"lastOnline" = "🔙 Был(а) в сети: {{ .Time }}\r\n"
"email" = "📧 Email: {{ .Email }}\r\n" "email" = "📧 Email: {{ .Email }}\r\n"
"upload" = "🔼 Исходящий трафик: ↑{{ .Upload }}\r\n" "upload" = "🔼 Исходящий трафик: ↑{{ .Upload }}\r\n"
"download" = "🔽 Входящий трафик: ↓{{ .Download }}\r\n" "download" = "🔽 Входящий трафик: ↓{{ .Download }}\r\n"

View file

@ -663,6 +663,7 @@
"active" = "💡 Aktif: {{ .Enable }}\r\n" "active" = "💡 Aktif: {{ .Enable }}\r\n"
"enabled" = "🚨 Etkin: {{ .Enable }}\r\n" "enabled" = "🚨 Etkin: {{ .Enable }}\r\n"
"online" = "🌐 Bağlantı durumu: {{ .Status }}\r\n" "online" = "🌐 Bağlantı durumu: {{ .Status }}\r\n"
"lastOnline" = "🔙 Son çevrimiçi: {{ .Time }}\r\n"
"email" = "📧 E-posta: {{ .Email }}\r\n" "email" = "📧 E-posta: {{ .Email }}\r\n"
"upload" = "🔼 Yükleme: ↑{{ .Upload }}\r\n" "upload" = "🔼 Yükleme: ↑{{ .Upload }}\r\n"
"download" = "🔽 İndirme: ↓{{ .Download }}\r\n" "download" = "🔽 İndirme: ↓{{ .Download }}\r\n"

View file

@ -663,6 +663,7 @@
"active" = "💡 Активний: {{ .Enable }}\r\n" "active" = "💡 Активний: {{ .Enable }}\r\n"
"enabled" = "🚨 Увімкнено: {{ .Enable }}\r\n" "enabled" = "🚨 Увімкнено: {{ .Enable }}\r\n"
"online" = "🌐 Стан підключення: {{ .Status }}\r\n" "online" = "🌐 Стан підключення: {{ .Status }}\r\n"
"lastOnline" = "🔙 Був(ла) онлайн: {{ .Time }}\r\n"
"email" = "📧 Електронна пошта: {{ .Email }}\r\n" "email" = "📧 Електронна пошта: {{ .Email }}\r\n"
"upload" = "🔼 Upload: ↑{{ .Upload }}\r\n" "upload" = "🔼 Upload: ↑{{ .Upload }}\r\n"
"download" = "🔽 Download: ↓{{ .Download }}\r\n" "download" = "🔽 Download: ↓{{ .Download }}\r\n"

View file

@ -663,6 +663,7 @@
"active" = "💡 Đang hoạt động: {{ .Enable }}\r\n" "active" = "💡 Đang hoạt động: {{ .Enable }}\r\n"
"enabled" = "🚨 Đã bật: {{ .Enable }}\r\n" "enabled" = "🚨 Đã bật: {{ .Enable }}\r\n"
"online" = "🌐 Trạng thái kết nối: {{ .Status }}\r\n" "online" = "🌐 Trạng thái kết nối: {{ .Status }}\r\n"
"lastOnline" = "🔙 Lần online gần nhất: {{ .Time }}\r\n"
"email" = "📧 Email: {{ .Email }}\r\n" "email" = "📧 Email: {{ .Email }}\r\n"
"upload" = "🔼 Tải lên: ↑{{ .Upload }}\r\n" "upload" = "🔼 Tải lên: ↑{{ .Upload }}\r\n"
"download" = "🔽 Tải xuống: ↓{{ .Download }}\r\n" "download" = "🔽 Tải xuống: ↓{{ .Download }}\r\n"

View file

@ -663,6 +663,7 @@
"active" = "💡 激活:{{ .Enable }}\r\n" "active" = "💡 激活:{{ .Enable }}\r\n"
"enabled" = "🚨 已启用:{{ .Enable }}\r\n" "enabled" = "🚨 已启用:{{ .Enable }}\r\n"
"online" = "🌐 连接状态:{{ .Status }}\r\n" "online" = "🌐 连接状态:{{ .Status }}\r\n"
"lastOnline" = "🔙 上次在线: {{ .Time }}\r\n"
"email" = "📧 邮箱:{{ .Email }}\r\n" "email" = "📧 邮箱:{{ .Email }}\r\n"
"upload" = "🔼 上传↑:{{ .Upload }}\r\n" "upload" = "🔼 上传↑:{{ .Upload }}\r\n"
"download" = "🔽 下载↓:{{ .Download }}\r\n" "download" = "🔽 下载↓:{{ .Download }}\r\n"

View file

@ -663,6 +663,7 @@
"active" = "💡 啟用:{{ .Enable }}\r\n" "active" = "💡 啟用:{{ .Enable }}\r\n"
"enabled" = "🚨 已啟用:{{ .Enable }}\r\n" "enabled" = "🚨 已啟用:{{ .Enable }}\r\n"
"online" = "🌐 連線狀態:{{ .Status }}\r\n" "online" = "🌐 連線狀態:{{ .Status }}\r\n"
"lastOnline" = "🔙 上次上線: {{ .Time }}\r\n"
"email" = "📧 郵箱:{{ .Email }}\r\n" "email" = "📧 郵箱:{{ .Email }}\r\n"
"upload" = "🔼 上傳↑:{{ .Upload }}\r\n" "upload" = "🔼 上傳↑:{{ .Upload }}\r\n"
"download" = "🔽 下載↓:{{ .Download }}\r\n" "download" = "🔽 下載↓:{{ .Download }}\r\n"

50
x-ui.sh
View file

@ -509,12 +509,16 @@ enable_bbr() {
ubuntu | debian | armbian) ubuntu | debian | armbian)
apt-get update && apt-get install -yqq --no-install-recommends ca-certificates apt-get update && apt-get install -yqq --no-install-recommends ca-certificates
;; ;;
centos | rhel | almalinux | rocky | ol) fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
yum -y update && yum -y install ca-certificates
;;
fedora | amzn | virtuozzo)
dnf -y update && dnf -y install ca-certificates dnf -y update && dnf -y install ca-certificates
;; ;;
centos)
if [[ "${VERSION_ID}" =~ ^7 ]]; then
yum -y update && yum -y install ca-certificates
else
dnf -y update && dnf -y install ca-certificates
fi
;;
arch | manjaro | parch) arch | manjaro | parch)
pacman -Sy --noconfirm ca-certificates pacman -Sy --noconfirm ca-certificates
;; ;;
@ -1073,12 +1077,15 @@ ssl_cert_issue() {
ubuntu | debian | armbian) ubuntu | debian | armbian)
apt-get update && apt-get install socat -y apt-get update && apt-get install socat -y
;; ;;
centos | rhel | almalinux | rocky | ol) fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
yum -y update && yum -y install socat
;;
fedora | amzn | virtuozzo)
dnf -y update && dnf -y install socat dnf -y update && dnf -y install socat
;; ;;
centos)
if [[ "${VERSION_ID}" =~ ^7 ]]; then
yum -y update && yum -y install socat
else
dnf -y update && dnf -y install socat
fi
arch | manjaro | parch) arch | manjaro | parch)
pacman -Sy --noconfirm socat pacman -Sy --noconfirm socat
;; ;;
@ -1086,7 +1093,7 @@ ssl_cert_issue() {
zypper refresh && zypper -q install -y socat zypper refresh && zypper -q install -y socat
;; ;;
alpine) alpine)
apk add socat apk add socat curl openssl
;; ;;
*) *)
echo -e "${red}Unsupported operating system. Please check the script and install the necessary packages manually.${plain}\n" echo -e "${red}Unsupported operating system. Please check the script and install the necessary packages manually.${plain}\n"
@ -1537,12 +1544,16 @@ install_iplimit() {
armbian) armbian)
apt-get update && apt-get install fail2ban -y apt-get update && apt-get install fail2ban -y
;; ;;
centos | rhel | almalinux | rocky | ol) fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
dnf -y update && dnf -y install fail2ban
;;
centos)
if [[ "${VERSION_ID}" =~ ^7 ]]; then
yum update -y && yum install epel-release -y yum update -y && yum install epel-release -y
yum -y install fail2ban yum -y install fail2ban
;; else
fedora | amzn | virtuozzo)
dnf -y update && dnf -y install fail2ban dnf -y update && dnf -y install fail2ban
fi
;; ;;
arch | manjaro | parch) arch | manjaro | parch)
pacman -Syu --noconfirm fail2ban pacman -Syu --noconfirm fail2ban
@ -1637,14 +1648,19 @@ remove_iplimit() {
apt-get purge -y fail2ban -y apt-get purge -y fail2ban -y
apt-get autoremove -y apt-get autoremove -y
;; ;;
centos | rhel | almalinux | rocky | ol) fedora | amzn | virtuozzo | rhel | almalinux | rocky | ol)
yum remove fail2ban -y
yum autoremove -y
;;
fedora | amzn | virtuozzo)
dnf remove fail2ban -y dnf remove fail2ban -y
dnf autoremove -y dnf autoremove -y
;; ;;
centos)
if [[ "${VERSION_ID}" =~ ^7 ]]; then
yum remove fail2ban -y
yum autoremove -y
else
dnf remove fail2ban -y
dnf autoremove -y
fi
;;
arch | manjaro | parch) arch | manjaro | parch)
pacman -Rns --noconfirm fail2ban pacman -Rns --noconfirm fail2ban
;; ;;