mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-20 05:52:24 +00:00
iplimit - ipv6 support
This commit is contained in:
parent
5c390341fb
commit
2001d96148
1 changed files with 2 additions and 2 deletions
|
@ -122,13 +122,13 @@ func (j *CheckClientIpJob) processLogFile() bool {
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
line := scanner.Text()
|
line := scanner.Text()
|
||||||
|
|
||||||
ipRegx, _ := regexp.Compile(`(\d+\.\d+\.\d+\.\d+).* accepted`)
|
ipRegx, _ := regexp.Compile(`from \[?([0-9a-fA-F:.]+)\]?:\d+ accepted`)
|
||||||
emailRegx, _ := regexp.Compile(`email:.+`)
|
emailRegx, _ := regexp.Compile(`email:.+`)
|
||||||
|
|
||||||
matches := ipRegx.FindStringSubmatch(line)
|
matches := ipRegx.FindStringSubmatch(line)
|
||||||
if len(matches) > 1 {
|
if len(matches) > 1 {
|
||||||
ip := matches[1]
|
ip := matches[1]
|
||||||
if ip == "127.0.0.1" {
|
if ip == "127.0.0.1" || ip == "::1" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue