tunnel

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package tunnel contains the public tunnel API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleDialer

type SimpleDialer interface {
	DialContext(ctx context.Context, network, endpoint string) (net.Conn, error)
}

SimpleDialer establishes network connections.

type TUN

type TUN = tun.TUN

We're creating a type alias to expose the internal TUN implementation on the public API.

func Start

func Start(ctx context.Context, underlyingDialer SimpleDialer, cfg *config.Config) (*TUN, error)

Start starts a VPN tunnel initialized with the passed dialer and config, and returns a TUN device that can later be stopped. In case there was any error during the initialization of the tunnel, they will also be returned by this function.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL