vpn

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitSetupSuccess = 0
	ExitSetupFailed  = 1
)
View Source
const (
	ENV_WG_TUN_FD  = "WG_TUN_FD"
	ENV_WG_UAPI_FD = "WG_UAPI_FD"
)
View Source
const APPLICATION_NAME = "pnc"
View Source
const IFCONFIG = "/sbin/ifconfig"
View Source
const OPENID_SCOPE = "email"
View Source
const ROUTE = "/sbin/route"
View Source
const VENDOR = "com.paranoco"

Variables

This section is empty.

Functions

func StatusCommand

func StatusCommand(c *cli.Context) error

func VpnCommand

func VpnCommand(c *cli.Context) error

func VpnConfigCommand

func VpnConfigCommand(c *cli.Context) error

Types

type ConfigurationFunc

type ConfigurationFunc func(interfaceName string) error

type PeerRequest

type PeerRequest struct {
	JWT             string
	HostId          string
	WireguardPubKey string
}

type PeerResponse

type PeerResponse struct {
	YourIP                  string
	RouterIP                string
	RouterKey               string
	RouterEndpoint          string
	RouterNetworks          []string
	AuthorizationExpiration time.Time
}

type VPNLoginConfiguration

type VPNLoginConfiguration struct {
	SSOClientID     string
	SSOClientSecret string
	SSOEndpoint     string
	VPNEndpoint     string
}

func FetchRemoteConfig

func FetchRemoteConfig(url string) (*VPNLoginConfiguration, error)

func GetVpnConfig

func GetVpnConfig() (*VPNLoginConfiguration, error)

func (*VPNLoginConfiguration) Save

func (c *VPNLoginConfiguration) Save() error

type WireguardSessionConfiguration

type WireguardSessionConfiguration struct {
	LocalIP                 string
	LocalKey                string
	RouterIP                string
	RouterKey               string
	RouterEndpoint          string
	RouterNetworks          []string
	AuthorizationExpiration time.Time
}

Jump to

Keyboard shortcuts

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