[PR #3919] [MERGED] fix: Ban new IPs with fail2ban instead of disconnected the client. #5558

Closed
opened 2026-10-31 20:47:49 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/3919
Author: @HamidRezaSZ
Created: 3/13/2026
Status: ✅ Merged
Merged: 3/17/2026
Merged by: @MHSanaei

Base: main ← Head: fix/ip-limit


📝 Commits (3)

  • 5a6fb40 fix: Ban new IPs with fail2ban instead of disconnected the client.
  • 0b1d27b fix: Remove unused strconv import
  • 537f8d4 fix: Revert log fail2ban format

📊 Changes

1 file changed (+9 additions, -70 deletions)

View changed files

📝 web/job/check_client_ip_job.go (+9 -70)

📄 Description

What is the pull request?

Fix #3895 — Preserve the original IP while logging new IPs for Fail2Ban. The sorting logic was incorrect and reversed. Also remove the disconnectClientTemporarily function and all related usages to ban the new IPs instead of disconnecting the client.

Which part of the application is affected by the change?

  • Frontend
  • Backend

Type of Changes

  • Bug fix
  • New feature
  • Refactoring
  • Other

Screenshots


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/3919 **Author:** [@HamidRezaSZ](https://github.com/HamidRezaSZ) **Created:** 3/13/2026 **Status:** ✅ Merged **Merged:** 3/17/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `fix/ip-limit` --- ### 📝 Commits (3) - [`5a6fb40`](https://github.com/MHSanaei/3x-ui/commit/5a6fb407a69c766444fd4553b01b0c92eeae24ea) fix: Ban new IPs with fail2ban instead of disconnected the client. - [`0b1d27b`](https://github.com/MHSanaei/3x-ui/commit/0b1d27bf03a228e868a3992f65d56e9a8607d537) fix: Remove unused strconv import - [`537f8d4`](https://github.com/MHSanaei/3x-ui/commit/537f8d4f8c399f7e5182673fa90cabf44f715461) fix: Revert log fail2ban format ### 📊 Changes **1 file changed** (+9 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `web/job/check_client_ip_job.go` (+9 -70) </details> ### 📄 Description ## What is the pull request? Fix #3895 — Preserve the original IP while logging new IPs for Fail2Ban. The sorting logic was incorrect and reversed. Also remove the disconnectClientTemporarily function and all related usages to ban the new IPs instead of disconnecting the client. ## Which part of the application is affected by the change? - [ ] Frontend - [x] Backend ## Type of Changes - [x] Bug fix - [ ] New feature - [ ] Refactoring - [ ] Other ## Screenshots <!-- Add screenshots to illustrate the changes --> <!-- Remove this section if it is not applicable. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 20:47:49 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5558
No description provided.