Documentation ¶
Index ¶
Constants ¶
View Source
const ApiVersion = "noisysockets.github.com/v1alpha1"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v0.5.0
type Config struct { types.TypeMeta `yaml:",inline" mapstructure:",squash"` // Name is the optional hostname of this peer. Name string `yaml:"name,omitempty" mapstructure:"name,omitempty"` // ListenPort is an optional port on which to listen for incoming packets. // If not specified, one will be chosen randomly. ListenPort uint16 `yaml:"listenPort,omitempty" mapstructure:"listenPort,omitempty"` // PrivateKey is the private key for this peer. PrivateKey string `yaml:"privateKey" mapstructure:"privateKey"` // IPs is a list of IP addresses assigned to this peer. IPs []string `yaml:"ips,omitempty" mapstructure:"ips,omitempty"` // DNSServers is an optional list of DNS servers to use for host resolution. DNSServers []string `yaml:"dnsServers,omitempty" mapstructure:"dnsServers,omitempty"` // Routes is the routing table to use for the network. Routes []RouteConfig `yaml:"routes,omitempty" mapstructure:"routes,omitempty"` // Peers is a list of known peers to which we can send and receive packets. Peers []PeerConfig `yaml:"peers,omitempty" mapstructure:"peers,omitempty"` }
Config is the configuration for a NoisySockets network. It is analogous to the configuration for a WireGuard interface.
func (Config) GetAPIVersion ¶ added in v0.5.0
type PeerConfig ¶ added in v0.9.2
type PeerConfig struct { // Name is the optional hostname of the peer. Name string `yaml:"name,omitempty" mapstructure:"name,omitempty"` // PublicKey is the public key of the peer. PublicKey string `yaml:"publicKey" mapstructure:"publicKey"` // Endpoint is an optional endpoint to which the peer's packets should be sent. // If not specified, the peers endpoint will be determined from received packets. Endpoint string `yaml:"endpoint,omitempty" mapstructure:"endpoint,omitempty"` // IPs is a list of IP addresses assigned to the peer, this is optional for gateways. // Traffic with a source IP not in this list will be dropped. IPs []string `yaml:"ips,omitempty" mapstructure:"ips,omitempty"` }
PeerConfig is the configuration for a known wireguard peer.
type RouteConfig ¶ added in v0.15.0
type RouteConfig struct { // Destinations is a list of CIDR blocks for which this route should be used. // If not specified and Default is set then the default IPv4/IPv6 routes will be used. Destinations []string `yaml:"destinations" mapstructure:"destinations"` // Via is the name of the peer to use as the gateway for this route. Via string `yaml:"via" mapstructure:"via"` // Default indicates this route should be used as the default route. Default bool `yaml:"default,omitempty" mapstructure:"default,omitempty"` }
RouteConfig is the configuration for a route in the routing table.
Click to show internal directories.
Click to hide internal directories.