Documentation ¶
Index ¶
- Constants
- Variables
- func CheckFile(data []byte) bool
- func GetOnline() ([]byte, error)
- func LoadCustomTaskWorkspace() (workspace map[string]struct{})
- type BlackCheckType
- type BlackTarget
- type BlackTargetCheck
- type CDNCheck
- type Config
- type DomainTarget
- type HoneyDef
- type HoneyPot
- type IPTarget
- type Ipv4Location
- type Ipv6Location
- type QQwry
- type Response
- type ResultQQwry
- type Service
Constants ¶
View Source
const ( // IndexLen 索引长度 IndexLen = 7 // RedirectMode1 国家的类型, 指向另一个指向 RedirectMode1 = 0x01 // RedirectMode2 国家的类型, 指向一个指向 RedirectMode2 = 0x02 )
View Source
const UnknownService = "unknown"
Variables ¶
View Source
var IPData fileData
IPData IP库的数据
Functions ¶
func LoadCustomTaskWorkspace ¶
func LoadCustomTaskWorkspace() (workspace map[string]struct{})
Types ¶
type BlackCheckType ¶
type BlackCheckType int
const ( CheckIP BlackCheckType = iota CheckDomain CheckAll )
type BlackTarget ¶
type BlackTargetCheck ¶
type BlackTargetCheck struct {
// contains filtered or unexported fields
}
func NewBlackTargetCheck ¶
func NewBlackTargetCheck(checkType BlackCheckType) *BlackTargetCheck
NewBlackTargetCheck 创建黑名单检查
func (*BlackTargetCheck) AppendBlackTarget ¶
func (c *BlackTargetCheck) AppendBlackTarget(target string) error
AppendBlackTarget 追加黑名单
func (*BlackTargetCheck) CheckBlack ¶
func (c *BlackTargetCheck) CheckBlack(target string) bool
CheckBlack 检查黑名单
func (*BlackTargetCheck) GetBlackFileName ¶
func (c *BlackTargetCheck) GetBlackFileName() string
GetBlackFileName 获取黑名单文件名
type CDNCheck ¶
type CDNCheck struct {
// contains filtered or unexported fields
}
func (*CDNCheck) CheckCName ¶
CheckCName 检查域名的CNAME,判断是否是CDN
type DomainTarget ¶
type DomainTarget struct {
BlackMapList map[string]struct{}
}
func (*DomainTarget) CheckBlackTarget ¶
func (t *DomainTarget) CheckBlackTarget(target string) bool
CheckBlackTarget 检查黑名单
func (*DomainTarget) GetBlackFileName ¶
func (t *DomainTarget) GetBlackFileName() string
GetBlackFileName 获取黑名单文件名
func (*DomainTarget) LoadBlackTargetList ¶
func (t *DomainTarget) LoadBlackTargetList() error
LoadBlackTargetList 加载黑名单列表
type IPTarget ¶
func (*IPTarget) CheckBlackTarget ¶
CheckBlackTarget 检查黑名单
func (*IPTarget) GetBlackFileName ¶
GetBlackFileName 获取黑名单文件名
func (*IPTarget) LoadBlackTargetList ¶
LoadBlackTargetList 加载黑名单列表
type Ipv4Location ¶
type Ipv4Location struct {
// contains filtered or unexported fields
}
func (*Ipv4Location) FindCustomIP ¶
func (ipl *Ipv4Location) FindCustomIP(ip string) string
FindCustomIP 查询自定义IP归属地
func (*Ipv4Location) FindPublicIP ¶
func (ipl *Ipv4Location) FindPublicIP(ip string) string
FindPublicIP 查询纯真数据库获取公网IP归属地
type Ipv6Location ¶
func NewIPv6Location ¶
func NewIPv6Location() (*Ipv6Location, error)
func (*Ipv6Location) Find ¶
func (db *Ipv6Location) Find(query string) string
type QQwry ¶
type QQwry struct { Data *fileData Offset int64 }
QQwry 纯真ip库
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Response 向客户端返回数据的
type ResultQQwry ¶
type ResultQQwry struct { IP string `json:"ip"` Country string `json:"country"` Area string `json:"area"` }
ResultQQwry 归属地信息
Click to show internal directories.
Click to hide internal directories.