resolve

package
v0.0.0-...-81c6b1d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeByTTL

func AnalyzeByTTL(ip string, ttl uint8)

func AnalyzeByUserAgent

func AnalyzeByUserAgent(ip, ua, host string) string

func DelDeviceIncr

func DelDeviceIncr(ip string, rdb *v9.Client)

DelDeviceIncr 删除设备数量信息

func DeleteRealtime

func DeleteRealtime(ip string)

func Discover

func Discover(ip string)

Discover 检测到当前设备数异常后处理

func GetDeviceIncr

func GetDeviceIncr(ip string, rdb *v9.Client) (all, mobile, pc int)

GetDeviceIncr 获取设备数量

func GetDevicesByIP

func GetDevicesByIP(ip string) ([]types.DeviceRecord, error)

GetDevicesByIP 获取某个 IP 下的所有设备信息

func Handle

func Handle(device types.DeviceRecord)

Handle 设备处理 渠道 sni匹配 useragent匹配 ttl匹配

func HandleProxy

func HandleProxy(record *types.ProxyRecord)

func IsMobile

func IsMobile(device types.DeviceRecord) bool

IsMobile 判断客户端是否为移动设备

func NewRealtime

func NewRealtime(ip string)

func NewRecord

func NewRecord(ip, username string, devices []types.DeviceRecord) *types.ProxyRecord

func StartUserAgentConsumer

func StartUserAgentConsumer()

Types

type Device

type Device struct {
	IP     string
	Record types.DeviceRecord
	// contains filtered or unexported fields
}

type DeviceInterface

type DeviceInterface interface {
	// contains filtered or unexported methods
}

type InfoJson

type InfoJson struct {
	IP       string  `json:"ip" redis:"ip"`
	Username string  `json:"username,omitempty" redis:"username,omitempty"`
	LastSeen float64 `json:"last_seen" redis:"last_seen"`
}

type Tables

type Tables struct {
	Results    []InfoJson `json:"result"`
	TotalCount int64      `json:"totalCount"`
}

func TraversalIP

func TraversalIP(startTime, endTime int64, page, pageSize int64) (result Tables, err error)

TraversalIP 遍历IP表

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL