MCPcopy Create free account
hub / github.com/Invisv-Privacy/masque / SocketProtector

FuncType SocketProtector

http2/android.go:14–14  ·  view source on GitHub ↗

SocketProtector is a type representing a function that overrides Android's VpnService.protect(). Android's VPN hooks are necessary to capture and redirect all of a phone's traffic through the MASQUE tunnel, but to avoid an infinite loop, the traffic sent to the MASQUE proxy needs to be exempted fro

func(fileDescriptor int) error

Source from the content-addressed store, hash-verified

12// that redirection. This function enables "protection" of the given file
13// descriptor (the underlying system fd for the MASQUE tunnel) from Android's VPN.
14type SocketProtector func(fileDescriptor int) error
15
16func dialerControlProtect(prot SocketProtector, logger *slog.Logger) func(network, address string, c syscall.RawConn) error {
17 return func(network, address string, c syscall.RawConn) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected