clientcfg

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 3 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,omitempty"`
}

Accesskey is the section dealing with accesskey configuration.

type Address

type Address struct {
	// Address.Socks is the SOCKSv5 TCP and UDP listening address.
	Socks *string `json:"socks,omitempty"`
	// Address.H2C is the h2c listening address for local connections.
	H2C *string `json:"h2c,omitempty"`
	// Address.Tun is the listening address configuration for wireleap_tun.
	Tun *string `json:"tun,omitempty"`
}

Address describes the listening addresses and ports.

type C

type C struct {
	// Timeout is the dial timeout.
	Timeout duration.T `json:"timeout,omitempty"`
	// Contract is the service contract used by this wireleap.
	Contract *texturl.URL `json:"contract,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"`
	// Address describes the listening addresses and ports.
	Address Address `json:"address,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 {
	// Whitelist is the optional user-defined list of relays to use exclusively.
	Whitelist *[]string `json:"whitelist,omitempty"`
	// 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 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