# Functions
ManualPairAndConnectToTunnel tries to verify an existing pairing, and if this fails it triggers a new manual pairing process.
NewPairRecordManager creates a PairRecordManager that reads/stores the pair records information at the given path To use the same pair records as macOS does, this path should be /var/db/lockdown/RemotePairing/user_501 (user_501 is the default for the root user).
NewTunnelManager creates a new TunnelManager instance for setting up device tunnels for all connected devices If userspaceTUN is set to true, the network stack will run in user space.
RWCEndpointNew creates a new io.ReadWriter based endpoint.
ServeTunnelInfo starts a simple http serve that exposes the tunnel information about the running tunnel.
# Structs
Endpoint implements the interface of stack.LinkEndpoint from io.ReadWriter.
PairRecordManager implements the same logic as macOS related to remote pair records.
Tunnel describes the parameters of an established tunnel to the device.
TunnelManager starts tunnels for devices when needed (if no tunnel is running yet) and stores the information how those tunnels are reachable (address and remote service discovery port).
UserSpaceTUNInterface uses gVisor's netstack to create a userspace virtual network interface.