server

package
v0.0.0-...-fca7342 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyLeftToRight

func CopyLeftToRight(l net.Conn, r net.Conn, ll chan bool, errChan chan error)

func CopyLoop

func CopyLoop(left net.Conn, right net.Conn) error

CopyLoop is a standard copy loop. We don't care too much who's client and who's server

func CopyRightToLeft

func CopyRightToLeft(l net.Conn, r net.Conn, lr chan bool, errChan chan error)

Types

type BridgeServer

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

func NewHopServer

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

NewHopServer returns a new HopServer

func NewServer

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

NewServer returns a new Server

type HopServer

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

HopServer is a obfsvpn server

func (*HopServer) Start

func (s *HopServer) Start() error

Start starts the obfsvpn server

func (*HopServer) Stop

func (s *HopServer) Stop()

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"`
}

Obfs4Config is an obfs4 specific configuration object

type Server

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

Server is a obfsvpn server

func (*Server) Start

func (s *Server) Start() error

Start starts the obfsvpn server

func (*Server) Stop

func (s *Server) Stop()

type ServerConfig

type ServerConfig struct {
	OpenvpnAddr string
	Obfs4Config Obfs4Config
	StateDir    string
	// Obfs4Network is either "tcp" or "kcp"
	Obfs4Network    string
	Obfs4ListenAddr string
	PortSeed        int64
	PortCount       uint
}

ServerConfig is the configuration for the obfsvpn server

Jump to

Keyboard shortcuts

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