Documentation ¶
Index ¶
- func DNSProviderConfigured() bool
- func GetBool(key string, defaultValue bool) bool
- func GetString(key, defaultValue string) string
- func GetUint64(key string, defaultValue uint64) uint64
- func KeepAliveInterval() time.Duration
- func MagicDNSSuffix() string
- type Auth
- type AuthProvider
- type Config
- type DERP
- type DERPServer
- type DNS
- type DNSProvider
- type Database
- type Keys
- type Logging
- type PollNet
- type ServerKeys
- type SystemAdminPolicy
- type Tls
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DNSProviderConfigured ¶ added in v0.6.0
func DNSProviderConfigured() bool
func KeepAliveInterval ¶
func MagicDNSSuffix ¶ added in v0.2.0
func MagicDNSSuffix() string
Types ¶
type Auth ¶ added in v0.3.0
type Auth struct { Provider AuthProvider `yaml:"provider,omitempty" envPrefix:"PROVIDER_"` SystemAdminPolicy SystemAdminPolicy `yaml:"system_admins"` }
type AuthProvider ¶
type Config ¶
type Config struct { ListenAddr string `yaml:"listen_addr,omitempty" env:"LISTEN_ADDR"` StunListenAddr string `yaml:"stun_listen_addr,omitempty" env:"STUN_LISTEN_ADDR"` MetricsListenAddr string `yaml:"metrics_listen_addr,omitempty" env:"METRICS_LISTEN_ADDR"` PublicAddr string `yaml:"public_addr,omitempty" env:"PUBLIC_ADDR"` StunPublicAddr string `yaml:"stun_public_addr,omitempty" env:"STUN_PUBLIC_ADDR"` Tls Tls `yaml:"tls,omitempty" envPrefix:"TLS_"` PollNet PollNet `yaml:"poll_net,omitempty" envPrefix:"POLL_NET_"` Keys Keys `yaml:"keys,omitempty" envPrefix:"KEYS_"` Database Database `yaml:"database,omitempty" envPrefix:"DB_"` Auth Auth `yaml:"auth,omitempty" envPrefix:"AUTH_"` DNS DNS `yaml:"dns,omitempty"` DERP DERP `yaml:"derp,omitempty" envPrefix:"DERP_"` Logging Logging `yaml:"logging,omitempty" envPrefix:"LOGGING_"` PublicUrl *url.URL `yaml:"-"` // contains filtered or unexported fields }
func LoadConfig ¶
func (*Config) DefaultDERPMap ¶ added in v0.15.0
func (*Config) ReadServerKeys ¶
func (c *Config) ReadServerKeys(defaultKeys *domain.ControlKeys) (*ServerKeys, error)
type DERP ¶ added in v0.15.0
type DERP struct { Server DERPServer `yaml:"server,omitempty"` Sources []string `yaml:"sources,omitempty"` }
type DERPServer ¶ added in v0.15.0
type DNS ¶ added in v0.2.0
type DNS struct { MagicDNSSuffix string `yaml:"magic_dns_suffix"` Provider DNSProvider `yaml:"provider,omitempty"` }
type DNSProvider ¶ added in v0.3.0
type Database ¶
type Database struct { Type string `yaml:"type,omitempty" env:"TYPE"` Url string `yaml:"url,omitempty" env:"URL"` MaxOpenConns int `yaml:"max_open_conns,omitempty" env:"MAX_OPEN_CONNS"` MaxIdleConns int `yaml:"max_idle_conns,omitempty" env:"MAX_IDLE_CONNS"` ConnMaxLifetime time.Duration `yaml:"conn_max_life_time,omitempty" env:"CONN_MAX_LIFE_TIME"` ConnMaxIdleTime time.Duration `yaml:"conn_max_idle_time,omitempty" env:"CONN_MAX_IDLE_TIME"` }
type ServerKeys ¶
type ServerKeys struct { SystemAdminKey *key.ServerPrivate ControlKey tkey.MachinePrivate LegacyControlKey tkey.MachinePrivate }
type SystemAdminPolicy ¶
type Tls ¶
type Tls struct { Disable bool `yaml:"disable" env:"DISABLE"` ForceHttps bool `yaml:"force_https" env:"FORCE_HTTPS"` CertFile string `yaml:"cert_file,omitempty" env:"CERT_FILE"` KeyFile string `yaml:"key_file,omitempty" env:"KEY_FILE"` AcmeEnabled bool `yaml:"acme,omitempty" env:"ACME_ENABLED"` AcmeEmail string `yaml:"acme_email,omitempty" env:"ACME_EMAIL"` AcmeCA string `yaml:"acme_ca,omitempty" env:"ACME_CA"` }
Click to show internal directories.
Click to hide internal directories.