softether

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2026 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthType

type AuthType uint32
const (
	AuthPassword AuthType = iota
	AuthPlainPassword
	AuthAnonymous
	AuthCertificate AuthType = 3
)

type Client

type Client struct{ Config Config }

func NewClient

func NewClient(config Config) *Client

func (*Client) Start

func (c *Client) Start(ctx context.Context) (*govpn.Session, error)

type Config

type Config struct {
	Server            string
	Port              int
	Hub               string
	Username          string
	Password          string
	AuthType          AuthType
	ClientCert        []byte
	ClientKey         []byte
	Address           string
	Gateway           string
	CA                []byte
	ServerName        string
	SkipVerify        bool
	MaxConnections    int
	DisableEncryption bool
	EnableCompression bool
	HalfConnection    bool
	EnableQoS         bool
	DHCPTimeout       time.Duration
	Logger            *log.Logger
}

type Server

type Server struct{ Config ServerConfig }

func NewServer

func NewServer(config ServerConfig) *Server

func (*Server) Start

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

type ServerConfig

type ServerConfig struct {
	Cert              []byte
	Key               []byte
	ListenIP          string
	ListenPort        int
	Hub               string
	Pool              string
	Users             map[string]string
	AnonymousUsers    map[string]bool
	UserCertificates  map[string][]byte
	DNS               []string
	EnableCompression bool
	DisableEncryption bool
	MaxConnections    int
	MTU               int
	Logger            *log.Logger
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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