Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeDialer ¶
MakeDialer creates a new Dialer. Recipients can safely mutate any public field except Control and Resolver, which are both populated.
func MakeListenConfig ¶
func MakeListenConfig(p Protector) *net.ListenConfig
MakeListenConfig returns a new ListenConfig that creates protected listener sockets.
Types ¶
type Protector ¶
type Protector interface { // Protect a socket, i.e. exclude it from the VPN. // This is needed in order to avoid routing loops for the VPN's own sockets. // This is a wrapper for Android's VpnService.protect(). Protect(socket int32) bool // Returns a comma-separated list of the system's configured DNS resolvers, // in roughly descending priority order. // This is needed because (1) Android Java cannot protect DNS lookups but Go can, and // (2) Android Java can determine the list of system DNS resolvers but Go cannot. // A comma-separated list is used because Gomobile cannot bind []string. GetResolvers() string }
Protector provides the ability to bypass a VPN on Android, pre-Lollipop.
Click to show internal directories.
Click to hide internal directories.