server

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2022 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Log = logPublic

Functions

func GenerateCerts

func GenerateCerts(cfg *Config)

Types

type Config

type Config struct {
	DNSAddress string `default:"" usage:"Use this DNS server for DNS lookups.  (If left empty, the system resolver will be used.)"`
	DNSPort    int    `default:"53" usage:"Use this port for DNS lookups."`
	ListenIP   string `default:"127.127.127.127" usage:"Listen on this IP address."`

	RootCert    string `default:"root_cert.pem" usage:"Sign with this root CA certificate."`
	RootKey     string `default:"root_key.pem" usage:"Sign with this root CA private key."`
	ListenChain string `default:"listen_chain.pem" usage:"Listen with this TLS certificate chain."`
	ListenKey   string `default:"listen_key.pem" usage:"Listen with this TLS private key."`

	ConfigDir string // path to interpret filenames relative to
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(cfg *Config) (s *Server, err error)

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

Jump to

Keyboard shortcuts

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