server

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: BSD-2-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BridgeServer

type BridgeServer interface {
	Start() error
	Stop()
}

func NewTCPServer added in v1.0.0

func NewTCPServer(ctx context.Context, stop context.CancelFunc, cfg Config, logger, debug *log.Logger) BridgeServer

NewTCPServer returns a new TCPServer

func NewUDPServer added in v1.0.0

func NewUDPServer(ctx context.Context, stop context.CancelFunc, cfg Config, logger, debug *log.Logger) BridgeServer

NewUDPServer returns a new UDPServer

type Config added in v1.4.0

type Config struct {
	OpenvpnAddr        string
	Obfs4Config        Obfs4Config
	StateDir           string
	Obfs4ListenIP      string
	Obfs4ListenPort    int
	HoppingEnabled     bool
	PortSeed           int64
	PortCount          uint
	MinHopPort         uint
	MaxHopPort         uint
	KCPConfig          obfsvpn.KCPConfig
	QUICConfig         obfsvpn.QUICConfig
	MenshenAgentConfig MenshenAgentConfig
	MetricsTransport   string // Transport label for Prometheus metrics: "tcp", "kcp", or "quic"
}

Config is the configuration for the obfsvpn server

type MenshenAgentConfig added in v1.4.0

type MenshenAgentConfig struct {
	Enabled bool

	agent.Config[models.ModelsBridge]
}

MenshenAgentConfig is for configuring menshen-agent behaviour

type Obfs4Config

type Obfs4Config struct {
	NodeID      string `json:"node-id"`
	PrivateKey  string `json:"private-key"`
	PublicKey   string `json:"public-key"`
	DRBGSeed    string `json:"drbg-seed"`
	IatMode     int    `json:"iat-mode"`
	Certificate string `json:"cert,omitempty"`
}

Obfs4Config is an obfs4 specific configuration object

type TCPServer added in v1.0.0

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

TCPServer is a obfsvpn server

func (*TCPServer) Start added in v1.0.0

func (s *TCPServer) Start() error

Start starts the obfsvpn server

func (*TCPServer) Stop added in v1.0.0

func (s *TCPServer) Stop()

type UDPServer added in v1.0.0

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

UDPServer is a obfsvpn server

func (*UDPServer) Start added in v1.0.0

func (s *UDPServer) Start() error

Start starts the obfsvpn server

func (*UDPServer) Stop added in v1.0.0

func (s *UDPServer) Stop()

Source Files

  • interfaces.go
  • metrics.go
  • server.go
  • tcpserver.go
  • udpserver.go

Directories

Path Synopsis
Package metrics provides Prometheus metrics for the obfsvpn server.
Package metrics provides Prometheus metrics for the obfsvpn server.

Jump to

Keyboard shortcuts

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