vpn

package
v0.0.0-...-4b0d453 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdateConfig

func UpdateConfig(login, rawPassword string) error

Function for recreate VPN config

Types

type VpnClient

type VpnClient struct {
	VpnService string
	Login      string
	Password   string
}

Vpn CLient struct for comunicate with vpn service

func CreateVpnCLient

func CreateVpnCLient(login string, args ...string) *VpnClient

Generator function for initializate Vpn Client It returns Vpn client Object

func (*VpnClient) AddRoute

func (c *VpnClient) AddRoute(subnetAddress string) error

Function for download vpn config from vpn service. In future release this function will be changed to request to S3 storage Now it returns vpn config in plain text and error

func (*VpnClient) CreateConfig

func (c *VpnClient) CreateConfig() error

Create VPN config for VpnClient This function send http request to ovpn service to register new user It returns nill or error from vpn service if user already exists or connection error

func (*VpnClient) DownloadVpnConfig

func (c *VpnClient) DownloadVpnConfig() (string, error)

Function for download vpn config from vpn service. In future release this function will be changed to request to S3 storage Now it returns vpn config in plain text and error

Jump to

Keyboard shortcuts

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