2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 04:22:33 +08:00

fix: 修复 fail2ban IPv6 地址显示和解封问题 (#1245)

* Initial plan

* fix: 修复 fail2ban IPv6 地址显示和解封问题

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>
This commit is contained in:
Copilot
2026-01-15 23:16:06 +08:00
committed by GitHub
parent 7a2d64744c
commit 3412709f9b

View File

@@ -263,7 +263,7 @@ func (s *App) BanList(w http.ResponseWriter, r *http.Request) {
service.Error(w, http.StatusInternalServerError, s.t.Get("failed to get total banned list"))
return
}
bannedIp, err := shell.Execf(`fail2ban-client status %s | grep "Banned IP list" | awk -F ":" '{print $2}'`, req.Name)
bannedIp, err := shell.Execf(`fail2ban-client status %s | grep "Banned IP list" | sed 's/.*Banned IP list:[[:space:]]*//'`, req.Name)
if err != nil {
service.Error(w, http.StatusInternalServerError, s.t.Get("failed to get banned ip list"))
return