Documentation ¶
Index ¶
- func AddRoute(tunAddr string, tunGw string, tunMask string) error
- func CmdHide(name string, arg ...string) *exec.Cmd
- func ConnPipe(src CommConn, dst CommConn, duration time.Duration)
- func GetCidrRandIp(cidr string) string
- func GetCidrRandIpByNet(tunAddr string, tunMask string) string
- func GetDnsServer() []string
- func GetLocalAddresses() ([]lAddr, error)
- func GetLocalIpV4() string
- func GetNetworkInfo() ([]lAddr, error)
- func GetPortDialer(min int, max int) *net.Dialer
- func GetUnusedTunAddr() (string, string)
- func GetUseDns(dnsAddr string, tunGW string, _tunGW string) string
- func GetWaterConf(tunAddr string, tunMask string) water.Config
- func IntnRange(min, max int) int
- func IsChinaMainlandIP(IP string) bool
- func IsPublicIP(ip net.IP) bool
- func ResetNetConf(ip string)
- func SetNetConf(dnsIpv4 string)
- type CachedResponse
- type CommConn
- type DnsCacheV1
- type TimeoutConn
- type UdpLimit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCidrRandIp ¶
func GetCidrRandIpByNet ¶
根据子网掩码返回一个IP段
func GetDnsServer ¶
func GetDnsServer() []string
func GetLocalAddresses ¶
func GetLocalAddresses() ([]lAddr, error)
func GetLocalIpV4 ¶
func GetLocalIpV4() string
func GetNetworkInfo ¶
func GetNetworkInfo() ([]lAddr, error)
func IsChinaMainlandIP ¶
func IsPublicIP ¶
func ResetNetConf ¶
func ResetNetConf(ip string)
func SetNetConf ¶
func SetNetConf(dnsIpv4 string)
Types ¶
type CachedResponse ¶
type CachedResponse struct {
// contains filtered or unexported fields
}
type DnsCacheV1 ¶
type DnsCacheV1 struct { Cache map[string]CachedResponse sync.Mutex }
func (*DnsCacheV1) Free ¶
func (rd *DnsCacheV1) Free(expired int64)
func (*DnsCacheV1) ReadDnsCache ¶
func (rd *DnsCacheV1) ReadDnsCache(domain string, expired int64) *dns.Msg
func (*DnsCacheV1) WriteDnsCache ¶
func (rd *DnsCacheV1) WriteDnsCache(domain string, msg *dns.Msg) string
type TimeoutConn ¶
Click to show internal directories.
Click to hide internal directories.