feat: add fail2ban service
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"syscall"
|
||||
|
||||
"gitea.urkob.com/urko/prosody-password/internal/api"
|
||||
"gitea.urkob.com/urko/prosody-password/internal/services/fail2ban"
|
||||
"gitea.urkob.com/urko/prosody-password/internal/services/prosody"
|
||||
"gitea.urkob.com/urko/prosody-password/kit/config"
|
||||
)
|
||||
@@ -23,7 +24,7 @@ func main() {
|
||||
ctx, cancel := context.WithCancel(signalContext(context.Background()))
|
||||
defer cancel()
|
||||
|
||||
restServer := api.NewRestServer(prosody.NewProsody(cfg.Domain))
|
||||
restServer := api.NewRestServer(prosody.NewProsody(cfg.Domain), fail2ban.NewFail2Ban())
|
||||
|
||||
go func() {
|
||||
if err := restServer.Start(cfg.ApiPort, cfg.Views); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user