clientcfg

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package clientcfg describes the configuration file format and data types used by wireleap.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accesskey

type Accesskey struct {
	// UseOnDemand sets whether pofs are used to generate new servicekeys
	// automatically.
	UseOnDemand bool `json:"use_on_demand"`
}

Accesskey is the section dealing with accesskey configuration.

type Broker added in v0.6.0

type Broker struct {
	// Address describes the h2c listening address of the broker.
	Address *string `json:"address,omitempty"`
	// Accesskey is the section dealing with accesskey configuration.
	Accesskey Accesskey `json:"accesskey,omitempty"`
	// Circuit describes the configuration of the Wireleap connection circuit.
	Circuit Circuit `json:"circuit,omitempty"`
}

type C

type C struct {
	// Address describes the listening address of the api/controller.
	Address *string `json:"address,omitempty"`
	// Broker holds the settings specific to the wireleap broker.
	Broker Broker `json:"broker,omitempty"`
	// Forwarders holds the settings specific to the wireleap broker.
	Forwarders Forwarders `json:"forwarders,omitempty"`
}

C is the type of the config struct describing the config file format.

func Defaults

func Defaults() C

Defaults provides a config with sane defaults whenever possible.

func (*C) Metadata

func (c *C) Metadata() []*Meta

type Circuit

type Circuit struct {
	// Timeout is the dial timeout for relay connections.
	Timeout duration.T `json:"timeout,omitempty"`
	// Whitelist is the optional user-defined list of relays to use exclusively.
	Whitelist []string `json:"whitelist"`
	// Hops is the desired number of hops to use for the circuit.
	Hops int `json:"hops,omitempty"`
}

Circuit describes the configuration of the Wireleap connection circuit.

type Forwarder added in v0.6.0

type Forwarder struct {
	Address string `json:"address,omitempty"`
}

Forwarder describes a single forwarder.

type Forwarders added in v0.6.0

type Forwarders struct {
	// Socks is the SOCKSv5 TCP and UDP listening address.
	Socks Forwarder `json:"socks,omitempty"`
	// Tun is the listening address configuration for wireleap_tun.
	Tun Forwarder `json:"tun,omitempty"`
}

Forwarders describes the settings of the available forwarders.

type Meta

type Meta struct {
	// Option name
	Name string
	// Name of the "type'
	Type string
	// Description
	Desc string
	// Pointer to value to feed to Unmarshal()
	Val interface{}
	// Whether the input needs to be quoted before calling Unmarshal()
	Quote bool
}

Jump to

Keyboard shortcuts

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