server

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ZapLoggerMiddleware

func ZapLoggerMiddleware(logger *zap.Logger) echo.MiddlewareFunc

ZapLoggerMiddleware creates a custom Echo logging middleware

Types

type AllowedAgents

type AllowedAgents struct {
	Agents []struct {
		Name       string `mapstructure:"name"`
		AuthKey    string `mapstructure:"auth_key"`
		ApprovedCN string `mapstructure:"approved_cn"`
	}
}

type Server

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

func NewServer

func NewServer(cfg *ServerConfig) (*Server, error)

func (*Server) CleanUp

func (s *Server) CleanUp()

CleanUp do cleanup work when the server is stopped

func (*Server) GetRegister

func (s *Server) GetRegister(c echo.Context) error

GetRegister

func (*Server) Start

func (s *Server) Start() error

func (*Server) StartSocksServer

func (s *Server) StartSocksServer() error

type ServerConfig

type ServerConfig struct {
	AgentsFile    string
	ListenAddress string
	CaFile        string
	CertFile      string
	KeyFile       string
	LogFile       string
	LogLevel      string
	SocksServer   string

	EnableTLS         bool
	EnableInlineSocks bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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