mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-30 20:31:01 +08:00
增加刷新、预热缓存任务管理
This commit is contained in:
@@ -10,6 +10,11 @@ import (
|
||||
// AllowIP 检查IP是否被允许访问
|
||||
// 如果一个IP不在任何名单中,则允许访问
|
||||
func AllowIP(ip string, serverId int64) (canGoNext bool, inAllowList bool) {
|
||||
// 放行lo
|
||||
if ip == "127.0.0.1" {
|
||||
return true, true
|
||||
}
|
||||
|
||||
var ipLong = utils.IP2Long(ip)
|
||||
if ipLong == 0 {
|
||||
return false, false
|
||||
|
||||
Reference in New Issue
Block a user