config

package
v0.0.0-...-ccdaf39 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AcceptRetryWait = 100 * time.Millisecond

AcceptRetryWait is the time to wait before retrying a failed Accept().

View Source
const AgentCancelWait = 3 * time.Second

AgentCancelWait is the timeout for agents to cancel

View Source
const AgentRetryInterval = 15 * time.Second

AgentRetryInterval is the timeout for a failed agent.Start()

View Source
const BufferSize = 1500

BufferSize is the max size of a single message transferred via a tunnel. This should be sufficiently large to prevent fragmentation.

View Source
const GoroutinePoolSize = 10000

GoroutinePoolSize is the size for initializing an ants.Pool.

View Source
const NetDialTimeout = 5 * time.Second

NetDialTimeout is the timeout for agents connecting to the destination

View Source
const SessionIDSize = 16

SessionIDSize is the number of random bytes encoded in a session ID.

View Source
const UdpSessionTimeout = 300 * time.Second

UdpSessionTimeout is the timeout used to kill idle UDP session.

View Source
const WsCloseTimeout = 3 * time.Second

WsCloseTimeout is the timeout of a WebSocket close message.

View Source
const WsHandshakeTimeout = 10 * time.Second

WsHandshakeTimeout is the timeout for agents connecting to tunnel-servers

View Source
const WsKeepliveInterval = 3 * time.Second

WsKeepliveInterval is used for checking websocket connection loss.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowedAgents

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

AllowedAgents is the configuration for the allowed agents.

var AGENTS, AGENTS_TMP AllowedAgents

type Server

type Server struct {
	EnableTLS      bool
	EnablePprof    bool
	ControlAddress string
	ConfigFile     string
	CaFile         string
	CertFile       string
	KeyFile        string
	SocksServer    string
}

Server is the ezvpn server configuration.

var SERVER Server

func (*Server) HotReload

func (server *Server) HotReload()

Jump to

Keyboard shortcuts

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