Documentation ¶
Overview ¶
Package protected is used for creating "protected" connections that bypass Android's VpnService
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
func Configure(protector SocketProtector, dnsServer string, mode bool)
func SplitHostPort ¶
wrapper around net.SplitHostPort that also converts uses strconv to convert the port to an int
Types ¶
type DnsResponse ¶
type DnsResponse struct {
// contains filtered or unexported fields
}
func (*DnsResponse) PickRandomIP ¶
func (response *DnsResponse) PickRandomIP() (net.IP, error)
PickRandomIP picks a random IP address from a DNS response
type ProtectedConn ¶
func Dial ¶
func Dial(network, addr string, timeout time.Duration) (*ProtectedConn, error)
Dial creates a new protected connection
- syscall API calls are used to create and bind to the specified system device (this is primarily used for Android VpnService routing functionality)
func (*ProtectedConn) Close ¶
func (conn *ProtectedConn) Close() (err error)
Close is used to destroy a protected connection
type SocketProtector ¶
Click to show internal directories.
Click to hide internal directories.