dns

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: LGPL-3.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OccurrenceNone = Occurrence(iota)
	OccurrenceLeading
	OccurrenceRandom
)
View Source
const Windows = 7

Variables

View Source
var (
	FileDescriptors   = make([]*os.File, 0)
	FileDescriptorNum = 0
)

Functions

This section is empty.

Types

type DNSCryptInfo

type DNSCryptInfo struct {
	*dnscrypt.Resolver
	*ServerInfo
	Proxies   *conceptions.NestedProxy // individual proxies chain
	IPAddr    *atomic.Value            //*EPRing
	RelayAddr *atomic.Value            //*EPRing
}

func (*DNSCryptInfo) Proto

func (info *DNSCryptInfo) Proto() string

func (*DNSCryptInfo) Query

func (info *DNSCryptInfo) Query(p *Proxy, r *[]byte, args ...interface{}) (*[]byte, error)

type DOHInfo

type DOHInfo struct {
	*ServerInfo
	Path string
	// contains filtered or unexported fields
}

func (*DOHInfo) Proto

func (info *DOHInfo) Proto() string

func (*DOHInfo) Query

func (info *DOHInfo) Query(p *Proxy, r *[]byte, args ...interface{}) (*[]byte, error)

type DOTInfo

type DOTInfo struct {
	*ServerInfo
}

func (*DOTInfo) Proto

func (info *DOTInfo) Proto() string

func (*DOTInfo) Query

func (info *DOTInfo) Query(p *Proxy, r *[]byte, args ...interface{}) (*[]byte, error)

type ListenerConfiguration

type ListenerConfiguration struct {
	Regex      *services.Regexp_builder
	Groups     *map[string]*Servers
	ServerList *Servers
}

type Occurrence added in v1.1.4

type Occurrence int

type Proxy

type Proxy struct {
	*ProxyStartup
	*channels.ChannelMgr
	Timeout          time.Duration
	CertRefreshDelay time.Duration
	MainProto        string
	LocalInterface   *string
	Routes           *map[string][]string
	Tags             *map[string]map[string]interface{} //key:tag values:servers
	ListenerCfg      *map[int]*ListenerConfiguration
	RegisteredRelays []common.RegisteredServer
	ServersInfo      *ServersInfo
	SmaxClients      *semaphore.Weighted
	IsRefreshing     *atomic.Value
	XTransport       *tls.XTransport
	Wg               *sync.WaitGroup
	Ctx              context.Context
	Cancel           context.CancelFunc
}

func NewProxy

func NewProxy() *Proxy

func (*Proxy) DoHQuery

func (proxy *Proxy) DoHQuery(name string, info *DOHInfo, ctx context.Context, request *[]byte, cbs ...interface{}) (*[]byte, error)

func (*Proxy) DoTQuery

func (proxy *Proxy) DoTQuery(name string, ctx context.Context, request *[]byte, cbs ...interface{}) (*[]byte, error)

func (*Proxy) ExchangeDnScRypt

func (proxy *Proxy) ExchangeDnScRypt(serverInfo *DNSCryptInfo, request *[]byte) (*[]byte, error)

func (*Proxy) StartProxy

func (proxy *Proxy) StartProxy()

type ProxyStartup

type ProxyStartup struct {
	RegisteredServers []common.RegisteredServer
	UserName          string
	ListenAddresses   []string
	Child             bool
}

type ServerInfo

type ServerInfo struct {
	Name    string
	Info    ServerInterface
	Timeout time.Duration
	// contains filtered or unexported fields
}

type ServerInterface

type ServerInterface interface {
	Proto() string
	Query(*Proxy, *[]byte, ...interface{}) (*[]byte, error)
}

type Servers

type Servers struct {
	Priority bool
	Servers  []*string
}

type ServersInfo

type ServersInfo struct {
	RegisteredServers []common.RegisteredServer
	Occurrence
	// contains filtered or unexported fields
}

func NewServersInfo

func NewServersInfo() *ServersInfo

Directories

Path Synopsis
security

Jump to

Keyboard shortcuts

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