vtun

package
v0.0.242 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(config *config.Config, db *gorm.DB) string

This file will generate the vtun.conf file

func GenerateAndSave

func GenerateAndSave(config *config.Config, db *gorm.DB) error

func GenerateAndSaveClient

func GenerateAndSaveClient(config *config.Config, db *gorm.DB) error

func ReloadAllClients

func ReloadAllClients(db *gorm.DB, watcher *ClientWatcher) error

Types

type ClientWatcher

type ClientWatcher struct {
	// contains filtered or unexported fields
}

func NewVTunClientWatcher

func NewVTunClientWatcher(db *gorm.DB, config *config.Config) *ClientWatcher

func (*ClientWatcher) ReloadTunnel

func (v *ClientWatcher) ReloadTunnel(id uint)

func (*ClientWatcher) Run

func (v *ClientWatcher) Run()

func (*ClientWatcher) Running

func (v *ClientWatcher) Running(id uint) bool

func (*ClientWatcher) Stop

func (v *ClientWatcher) Stop() error

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(config *config.Config) *Service

func (*Service) IsEnabled

func (s *Service) IsEnabled() bool

func (*Service) IsRunning

func (s *Service) IsRunning() bool

func (*Service) Reload

func (s *Service) Reload() error

func (*Service) Start

func (s *Service) Start() error

func (*Service) Stop

func (s *Service) Stop() error

Jump to

Keyboard shortcuts

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