Skip to content

Commit

Permalink
No reason to write to BlockedIPs (#815)
Browse files Browse the repository at this point in the history
  • Loading branch information
somebodywashere committed Jul 26, 2023
1 parent a0ec2f3 commit 09807b3
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions web/job/check_client_ip_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ type CheckClientIpJob struct {}
var job *CheckClientIpJob
var disAllowedIps []string
var ipFiles = []string{
xray.GetBlockedIPsPath(),
xray.GetIPLimitLogPath(),
xray.GetIPLimitBannedLogPath(),
xray.GetAccessPersistentLogPath(),
Expand All @@ -45,11 +44,6 @@ func (j *CheckClientIpJob) Run() {
if j.hasLimitIp() {
j.processLogFile()
}

// write to blocked ips
blockedIps := []byte(strings.Join(disAllowedIps, ","))
err := os.WriteFile(xray.GetBlockedIPsPath(), blockedIps, 0644)
j.checkError(err)
}

func (j *CheckClientIpJob) hasLimitIp() bool {
Expand Down

0 comments on commit 09807b3

Please sign in to comment.