dns

package
v1.26.2 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCachedDnsItem added in v1.8.2

func AddCachedDnsItem(ip, domain string, rule ruleEngine.Rule)

func GetCachedDnsItem added in v1.8.2

func GetCachedDnsItem(ip string) (string, ruleEngine.Rule, bool)

func Handle added in v1.10.0

func Handle(dnsMessage *D.Msg, metadata *constant.Metadata) (*D.Msg, error)

func Hijack added in v0.6.8

func Hijack(_ string, server string, shouldReset bool) ([]string, error)

func ResetCache added in v1.8.2

func ResetCache()

func Resume added in v0.6.8

func Resume(_ string, shouldReset bool) error

func UpdateDnsMap added in v0.11.0

func UpdateDnsMap(local, remote cResolver.Resolver)

Types

type Conn

type Conn interface {
	ReadFrom([]byte) (int, net.Addr, error)
	WriteTo([]byte, net.Addr) (int, error)
}

type Statistic added in v1.25.0

type Statistic struct {
	Proxy  StatisticItem `json:"proxy"`
	Direct StatisticItem `json:"direct"`
}

func GetStatistic added in v1.25.0

func GetStatistic() Statistic

type StatisticItem added in v1.25.0

type StatisticItem struct {
	Success *atomic.Int32 `json:"success"`
	Fail    *atomic.Int32 `json:"fail"`
}

Jump to

Keyboard shortcuts

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