badhost

package
v0.0.0-...-43c24cd Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pool

type Pool struct {
	// contains filtered or unexported fields
}

Pool 保存无法直连的主机列表

func NewPool

func NewPool(useGFWList bool) (p *Pool, err error)

NewPool creat new Pool

func (*Pool) Add

func (p *Pool) Add(host string)

Add 添加一个主机地址,如 google.com

func (*Pool) HasSuffix

func (p *Pool) HasSuffix(host string) bool

HasSuffix 判断是否有无法连接的记录

type Trie

type Trie struct {
	// contains filtered or unexported fields
}

Trie a R-Way Trie data structure.

func NewTrie

func NewTrie() *Trie

NewTrie creates a new Trie with an initialized root Node.

func (*Trie) Add

func (t *Trie) Add(key string) bool

Add adds the key to the Trie.

func (*Trie) Find

func (t *Trie) Find(key string) bool

Find meta data associated with `key`.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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