Documentation ¶
Index ¶
Constants ¶
const AcceptRetryWait = 100 * time.Millisecond
AcceptRetryWait is the time to wait before retrying a failed Accept().
const AgentCancelWait = 3 * time.Second
AgentCancelWait is the timeout for agents to cancel
const AgentRetryInterval = 15 * time.Second
AgentRetryInterval is the timeout for a failed agent.Start()
const BufferSize = 1500
BufferSize is the max size of a single message transferred via a tunnel. This should be sufficiently large to prevent fragmentation.
const GoroutinePoolSize = 10000
GoroutinePoolSize is the size for initializing an ants.Pool.
const NetDialTimeout = 5 * time.Second
NetDialTimeout is the timeout for agents connecting to the destination
const SessionIDSize = 16
SessionIDSize is the number of random bytes encoded in a session ID.
const UdpSessionTimeout = 300 * time.Second
UdpSessionTimeout is the timeout used to kill idle UDP session.
const WsCloseTimeout = 3 * time.Second
WsCloseTimeout is the timeout of a WebSocket close message.
const WsHandshakeTimeout = 10 * time.Second
WsHandshakeTimeout is the timeout for agents connecting to tunnel-servers
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