Documentation ¶
Index ¶
- func AddRoute(tunAddr string, tunGw string, tunMask string) error
- func CmdHide(name string, arg ...string) *exec.Cmd
- 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 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, dnsIpv6 string)
- func TcpPipe(src CommConn, dst CommConn, duration time.Duration)
- func TunNatSawp(_udpNat *sync.Map, conn core.CommUDPConn, ep core.CommEndpoint, dstAddr string, ...)
- type CommConn
- type DnsCache
- type IpInfo
- 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 TunNatSawp ¶
func TunNatSawp(_udpNat *sync.Map, conn core.CommUDPConn, ep core.CommEndpoint, dstAddr string, duration time.Duration)
udp nat sawp
Types ¶
type DnsCache ¶
func (*DnsCache) ReadDnsCache ¶
type TimeoutConn ¶
Click to show internal directories.
Click to hide internal directories.