openvpn

package
v0.0.0-...-14875fc Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: BSD-2-Clause Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConfig

type ClientConfig struct {
	ClientName    ClientName
	ServerConfig  ServerConfig
	ServerAddress ServerAddress
	Routes        Routes
	Device        Device
}

func (*ClientConfig) CaCrt

func (c *ClientConfig) CaCrt() content.Func

func (*ClientConfig) ClientCertifcate

func (c *ClientConfig) ClientCertifcate() *x509.Certificate

func (*ClientConfig) ClientCrt

func (c *ClientConfig) ClientCrt() content.Func

func (*ClientConfig) ClientKey

func (c *ClientConfig) ClientKey() content.Func

func (*ClientConfig) ConfigContent

func (c *ClientConfig) ConfigContent() content.HasContent

func (*ClientConfig) LocalPathCaCrt

func (c *ClientConfig) LocalPathCaCrt() file.HasPath

func (*ClientConfig) LocalPathClientCrt

func (c *ClientConfig) LocalPathClientCrt() file.HasPath

func (*ClientConfig) LocalPathClientKey

func (c *ClientConfig) LocalPathClientKey() file.HasPath

func (*ClientConfig) LocalPathConfig

func (c *ClientConfig) LocalPathConfig() file.HasPath

func (*ClientConfig) LocalPathTaKey

func (c *ClientConfig) LocalPathTaKey() file.HasPath

func (*ClientConfig) TAKey

func (c *ClientConfig) TAKey() content.Func

func (ClientConfig) Validate

func (c ClientConfig) Validate(ctx context.Context) error

type ClientIP

type ClientIP struct {
	Name ClientName
	IP   network.IP
}

func (ClientIP) Validate

func (c ClientIP) Validate(ctx context.Context) error

type ClientIPs

type ClientIPs []ClientIP

func (ClientIPs) Validate

func (c ClientIPs) Validate(ctx context.Context) error

type ClientName

type ClientName string

func (ClientName) String

func (c ClientName) String() string

func (ClientName) Validate

func (c ClientName) Validate(ctx context.Context) error

type Device

type Device string
const Tap Device = "tap"
const Tun Device = "tun"

func (Device) String

func (d Device) String() string

func (Device) Validate

func (d Device) Validate(ctx context.Context) error

type IRoute

type IRoute struct {
	Name  ClientName
	IPNet network.IPNet
}

func (IRoute) Validate

func (r IRoute) Validate(ctx context.Context) error

type IRoutes

type IRoutes []IRoute

func (IRoutes) Validate

func (r IRoutes) Validate(ctx context.Context) error

type LocalClient

type LocalClient struct {
	ClientName    ClientName
	ServerName    ServerName
	ServerAddress ServerAddress
	Routes        Routes
	ServerPort    network.Port
	Device        Device
}

func (*LocalClient) Applier

func (l *LocalClient) Applier() (world.Applier, error)

func (*LocalClient) Children

func (l *LocalClient) Children(ctx context.Context) (world.Configurations, error)

func (*LocalClient) Validate

func (l *LocalClient) Validate(ctx context.Context) error

type RemoteClient

type RemoteClient struct {
	SSH           *ssh.SSH
	ClientName    ClientName
	ServerName    ServerName
	ServerAddress ServerAddress
	ServerPort    network.Port
	Routes        Routes
	Device        Device
}

func (*RemoteClient) Applier

func (r *RemoteClient) Applier() (world.Applier, error)

func (*RemoteClient) Children

func (r *RemoteClient) Children(ctx context.Context) (world.Configurations, error)

func (*RemoteClient) Validate

func (r *RemoteClient) Validate(ctx context.Context) error

type Route

type Route struct {
	Gateway network.IP
	IPNet   network.IPNet
}

func (Route) Validate

func (r Route) Validate(ctx context.Context) error

type Routes

type Routes []Route

func (Routes) Validate

func (r Routes) Validate(ctx context.Context) error

type Server

type Server struct {
	SSH         *ssh.SSH
	ServerName  ServerName
	ServerPort  network.Port
	ServerIPNet network.IPNet
	Routes      Routes
	IRoutes     IRoutes
	ClientIPs   ClientIPs
	Device      Device
}

func (*Server) Applier

func (s *Server) Applier() (world.Applier, error)

func (*Server) Children

func (s *Server) Children(ctx context.Context) (world.Configurations, error)

func (*Server) Validate

func (s *Server) Validate(ctx context.Context) error

type ServerAddress

type ServerAddress string

func (ServerAddress) String

func (s ServerAddress) String() string

func (ServerAddress) Validate

func (s ServerAddress) Validate(ctx context.Context) error

type ServerConfig

type ServerConfig struct {
	ServerName  ServerName
	ServerIPNet network.IPNet
	ServerPort  network.Port
	Routes      Routes
	Device      Device
}

func (*ServerConfig) CACertifcate

func (s *ServerConfig) CACertifcate() *x509.Certificate

func (*ServerConfig) CAPrivateKey

func (s *ServerConfig) CAPrivateKey() content.Func

func (*ServerConfig) CaCrt

func (s *ServerConfig) CaCrt() content.Func

func (*ServerConfig) DHPem

func (s *ServerConfig) DHPem() content.Func

func (*ServerConfig) LocalPathCAPrivateKey

func (s *ServerConfig) LocalPathCAPrivateKey() file.HasPath

func (*ServerConfig) LocalPathCaCrt

func (s *ServerConfig) LocalPathCaCrt() file.HasPath

func (*ServerConfig) LocalPathDhPem

func (s *ServerConfig) LocalPathDhPem() file.HasPath

func (*ServerConfig) LocalPathServerCrt

func (s *ServerConfig) LocalPathServerCrt() file.HasPath

func (*ServerConfig) LocalPathServerKey

func (s *ServerConfig) LocalPathServerKey() file.HasPath

func (*ServerConfig) LocalPathTaKey

func (s *ServerConfig) LocalPathTaKey() file.HasPath

func (*ServerConfig) OpenvpnDefaultConf

func (s *ServerConfig) OpenvpnDefaultConf() content.Func

func (*ServerConfig) ServerCertifcate

func (s *ServerConfig) ServerCertifcate() *x509.Certificate

func (*ServerConfig) ServerConfigContent

func (s *ServerConfig) ServerConfigContent() content.Func

func (*ServerConfig) ServerCrt

func (s *ServerConfig) ServerCrt() content.Func

func (*ServerConfig) ServerKey

func (s *ServerConfig) ServerKey() content.Func

func (*ServerConfig) TAKey

func (s *ServerConfig) TAKey() content.Func

func (ServerConfig) Validate

func (s ServerConfig) Validate(ctx context.Context) error

type ServerName

type ServerName string

func (ServerName) String

func (s ServerName) String() string

func (ServerName) Validate

func (s ServerName) Validate(ctx context.Context) error

Jump to

Keyboard shortcuts

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