This commit is contained in:
arraykeys@gmail.com
2018-11-30 13:12:35 +08:00
parent 44909ea6c6
commit 9004913483

View File

@ -172,11 +172,13 @@ func (c *Checker) IsBlocked(domain string) (blocked, isInMap bool, failN, succes
case "parent":
return true, true, 0, 0
case "intelligent":
fallthrough
default:
item := _item.(CheckerItem)
return (item.FailCount >= item.SuccessCount) && (time.Now().Unix()-item.Lasttime < 1800), true, item.FailCount, item.SuccessCount
}
return true, false, 0, 0
}
func (c *Checker) domainIsInMap(address string, blockedMap bool) bool {
u, err := url.Parse("http://" + address)
if err != nil {