Documentation ¶
Index ¶
- Constants
- func Cipher(name string) uint16
- func CipherName(value uint16) string
- func ContainsString(slice []string, s string) bool
- func GetLocalNameServers() ([]string, error)
- func HasECCCiphers(cipherSuites []uint16) bool
- func IOCopy(dst io.Writer, src io.Reader) (written int64, err error)
- func LocalIPv4s() ([]net.IP, error)
- func LocalPreferIPv4() (net.IP, error)
- func LookupIP(host string) (ips []net.IP, err error)
- func SetConsoleTextColorGreen() error
- func SetConsoleTextColorRed() error
- func SetConsoleTextColorReset() error
- func SetConsoleTextColorYellow() error
- func SetConsoleTitle(name string)
- func SetFlagsIfAbsent(m map[string]string)
- func ShuffleInts(slice []int)
- func ShuffleStrings(slice []string)
- func ShuffleStringsN(slice []string, n int)
- func ShuffleUint16s(slice []uint16)
- func ShuffleUints(slice []uint)
- func UniqueStrings(slice []string) []string
- type Dialer
- type HostMatcher
- type MultiDialer
- func (d *MultiDialer) ClearCache()
- func (d *MultiDialer) Dial(network, address string) (net.Conn, error)
- func (d *MultiDialer) DialTLS(network, address string) (net.Conn, error)
- func (d *MultiDialer) DialTLS2(network, address string, cfg *tls.Config) (net.Conn, error)
- func (d *MultiDialer) LookupAlias(alias string) (addrs []string, err error)
- type MultiResolver
- type Resolver
Constants ¶
View Source
const ( DefaultDNSCacheExpiry time.Duration = time.Hour DefaultDNSCacheSize uint = 8 * 1024 )
View Source
const (
BUFSZ = 32 * 1024
)
Variables ¶
This section is empty.
Functions ¶
func CipherName ¶
func ContainsString ¶
func GetLocalNameServers ¶
func HasECCCiphers ¶
func LocalIPv4s ¶
func LocalPreferIPv4 ¶
func SetConsoleTextColorGreen ¶
func SetConsoleTextColorGreen() error
func SetConsoleTextColorRed ¶
func SetConsoleTextColorRed() error
func SetConsoleTextColorReset ¶
func SetConsoleTextColorReset() error
func SetConsoleTextColorYellow ¶
func SetConsoleTextColorYellow() error
func SetConsoleTitle ¶
func SetConsoleTitle(name string)
func SetFlagsIfAbsent ¶
func ShuffleInts ¶
func ShuffleInts(slice []int)
func ShuffleStrings ¶
func ShuffleStrings(slice []string)
func ShuffleStringsN ¶
func ShuffleUint16s ¶
func ShuffleUint16s(slice []uint16)
func ShuffleUints ¶
func ShuffleUints(slice []uint)
func UniqueStrings ¶
Types ¶
type Dialer ¶
type HostMatcher ¶
type HostMatcher struct {
// contains filtered or unexported fields
}
func NewHostMatcher ¶
func NewHostMatcher(hosts []string) *HostMatcher
func NewHostMatcherWithString ¶
func NewHostMatcherWithString(hosts map[string]string) *HostMatcher
func NewHostMatcherWithStrings ¶
func NewHostMatcherWithStrings(hosts map[string][]string) *HostMatcher
func NewHostMatcherWithValue ¶
func NewHostMatcherWithValue(values map[string]interface{}) *HostMatcher
func (*HostMatcher) AddHost ¶
func (hm *HostMatcher) AddHost(host string)
func (*HostMatcher) AddHostWithValue ¶
func (hm *HostMatcher) AddHostWithValue(host string, value interface{})
func (*HostMatcher) Lookup ¶
func (hm *HostMatcher) Lookup(host string) (interface{}, bool)
func (*HostMatcher) Match ¶
func (hm *HostMatcher) Match(host string) bool
type MultiDialer ¶
type MultiDialer struct { Dialer interface { Dial(network, addr string) (net.Conn, error) } Resolver *Resolver SSLVerify bool LogToStderr bool TLSConfig *tls.Config SiteToAlias *HostMatcher GoogleTLSConfig *tls.Config GoogleG2PKP []byte IPBlackList lrucache.Cache HostMap map[string][]string TLSConnDuration lrucache.Cache TLSConnError lrucache.Cache TLSConnReadBuffer int GoodConnExpiry time.Duration ErrorConnExpiry time.Duration Level int }
func (*MultiDialer) ClearCache ¶
func (d *MultiDialer) ClearCache()
func (*MultiDialer) DialTLS ¶
func (d *MultiDialer) DialTLS(network, address string) (net.Conn, error)
func (*MultiDialer) LookupAlias ¶
func (d *MultiDialer) LookupAlias(alias string) (addrs []string, err error)
type MultiResolver ¶
type MultiResolver struct {
*MultiDialer
}
func (*MultiResolver) LookupHost ¶
func (r *MultiResolver) LookupHost(host string) ([]string, error)
Click to show internal directories.
Click to hide internal directories.