Documentation
¶
Index ¶
- Constants
- func SetupTunAsEnclave() (*os.File, error)
- func SetupTunAsProxy() (*os.File, error)
- func ToggleNAT(toggle bool) error
- func TunToVsock(from io.ReadCloser, to io.WriteCloser, ch chan error, wg *sync.WaitGroup)
- func VsockToTun(from io.ReadCloser, to io.WriteCloser, ch chan error, wg *sync.WaitGroup)
Constants ¶
View Source
const ( On = true Off = false )
View Source
const (
DefaultPort = 1024
)
Variables ¶
This section is empty.
Functions ¶
func SetupTunAsEnclave ¶
func SetupTunAsProxy ¶
func ToggleNAT ¶
ToggleNAT toggles our iptables NAT rules, which ensure that the enclave can talk to the Internet.
func TunToVsock ¶
func TunToVsock(from io.ReadCloser, to io.WriteCloser, ch chan error, wg *sync.WaitGroup)
TunToVsock forwards network packets from the tun device to our TCP-over-VSOCK connection. The function keeps on forwarding packets until we encounter an error or EOF. Errors (including EOF) are written to the given channel.
func VsockToTun ¶
func VsockToTun(from io.ReadCloser, to io.WriteCloser, ch chan error, wg *sync.WaitGroup)
VsockToTun forwards network packets from our TCP-over-VSOCK connection to the tun interface. The function keeps on forwarding packets until we encounter an error or EOF. Errors (including EOF) are written to the given channel.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.