tlstunnel

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 24 Imported by: 0

README

tlstunnel

builds.sr.ht status

A TLS reverse proxy.

  • Automatic TLS with Let's Encrypt
  • Route incoming connections to backends using Server Name Indication
  • Support for the PROXY protocol

Example configuration:

frontend example.org:443 {
    backend localhost:8080
}

See the man page for more information.

Contributing

Send patches to the mailing list, report bugs on the issue tracker. Discuss in #emersion on Libera Chat.

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	Network      string
	Address      string
	Proxy        bool
	ProxyVersion int
	TLSConfig    *tls.Config // nil if no TLS
}

type Frontend

type Frontend struct {
	Backend   Backend
	Protocols []string
}

type Listener

type Listener struct {
	Address string
	// contains filtered or unexported fields
}

func (*Listener) RegisterFrontend

func (ln *Listener) RegisterFrontend(name string, fe *Frontend) error

func (*Listener) Start

func (ln *Listener) Start() error

func (*Listener) Stop

func (ln *Listener) Stop() error

func (*Listener) UpdateFrom

func (ln *Listener) UpdateFrom(new *Listener) *Listener

type Server

type Server struct {
	Listeners map[string]*Listener // indexed by listening address
	Frontends []*Frontend
	Debug     bool

	ManagedNames   []string
	UnmanagedCerts []tls.Certificate

	ACMEIssuer *certmagic.ACMEIssuer
	ACMEConfig *certmagic.Config
	// contains filtered or unexported fields
}

func NewServer

func NewServer() *Server

func (*Server) Load

func (srv *Server) Load(cfg scfg.Block) error

func (*Server) RegisterListener

func (srv *Server) RegisterListener(addr string) *Listener

func (*Server) Replace

func (srv *Server) Replace(old *Server) error

Replace starts the server but takes over existing listeners from an old Server instance. The old instance keeps running unchanged if Replace returns an error.

func (*Server) Start

func (srv *Server) Start() error

func (*Server) Stop

func (srv *Server) Stop()

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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