v0.0.0-...-08dfd99 Latest Latest

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

Go to latest
Published: Jul 8, 2024 License: GPL-3.0 Imports: 41 Imported by: 0



Package Menshen LEAP API

the purpose of this application is to provide a service that uses go code and libraries to define the VPN provisioning API



This section is empty.


This section is empty.


func CertGenHelper

func CertGenHelper(registry *registry, ovpn_ca_crt string, ovpn_ca_key string, algo string, expiryDays int) func(echo.Context) error

GenerateCert godoc @Summary Get openvpn cert @Description Fetch a new key and cert. @Tags Provisioning @Accept json @Produce json @Success 200 {object} string @Failure 400 {object} error @Failure 404 {object} error @Failure 500 {object} error @Router /5/openvpn/cert [get]

func GetLocationsFromEIPData

func GetLocationsFromEIPData(eip *m.EIPServiceV3) locationMap

func InitMetricsServer

func InitMetricsServer() *echo.Echo

func InitServer

func InitServer(cfg *Config) *echo.Echo

func ParseEIPServiceFile

func ParseEIPServiceFile(path string) (*m.EIPServiceV3, error)


type Config

type Config struct {
	EnableCertv3        bool
	AllowGatewayListing bool
	AllowBridgeListing  bool
	AutoTLS             bool
	// EIP is an existing EIPv3 file in the local filesystem (legacy)
	EIP string
	// EIPULR is a remote endpoint where to fetch an existing EIPv3 file from (legacy)
	EIPURL string
	// LocalBridges is a list of addresses where the available bridge
	// containers expose their control ports.
	LocalBridges        []string
	LoadBalancerAddr    string
	Port                int
	PortMetrics         int
	ServerName          string
	ClientCertURL       string
	CaFile              string
	OvpnCaCrt           string
	OvpnCaKey           string
	OvpnClientCrtExpiry int
	Algo                string
	DBFile              string

func (*Config) HasLegacyEIPFile

func (c *Config) HasLegacyEIPFile() bool

Jump to

Keyboard shortcuts

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