server

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertConfig

type CertConfig struct {
	Enabled bool   `yaml:"enabled"`
	Email   string `yaml:"email"`
}

type Config

type Config struct {
	// Domain base for HTTP routing (e.g., example.com)
	Domain string `yaml:"domain"`
	// Optional shared token required from clients for registration/auth
	Token      string      `yaml:"token"`
	ServerPort int         `yaml:"server_port"`
	QuicPort   int         `yaml:"quic_port"`
	Cert       *CertConfig `yaml:"cert"`
}

Config represents the configuration for the client. It contains the server address and a map of backend configurations. Each backend configuration includes the host, port, subdomain, and protocol. The server address is the address of the gunnel server.

func DefaultConfig

func DefaultConfig() *Config

func (*Config) LoadConfig

func (c *Config) LoadConfig(configPath string) error

type Server

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

func NewServer

func NewServer(config *Config) *Server

func (*Server) Start

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

func (*Server) StartHTTPServer

func (s *Server) StartHTTPServer(ctx context.Context, errChan chan error, wg *sync.WaitGroup)

func (*Server) StartQUICServer

func (s *Server) StartQUICServer(ctx context.Context, errChan chan error, wg *sync.WaitGroup)

Jump to

Keyboard shortcuts

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