server

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package server provides an implementation of a TLSProxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy

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

Proxy implements a TLSproxy.

func (*Proxy) Cancel

func (p *Proxy) Cancel() error

Cancel is canceling/shutting down a TLSproxy.

func (*Proxy) Reload

func (*Proxy) Reload() error

Reload wil re-read the configuration of a TLSproxy and apply it.

func (*Proxy) Run

func (p *Proxy) Run() error

Run is starting a TLSproxy that accepts connections.

func (*Proxy) TLSHandler

func (p *Proxy) TLSHandler(fn func(net.Conn))

TLSHandler returns the handler function of a TLSproxy.

type ProxyConfig

type ProxyConfig struct {
	Protocol   string   `default:"http" hcl:"protocol,label"`
	ListenAddr []string `default:"[\":8080\"]" hcl:"listen"`
}

ProxyConfig is a configuration for a TLSproxy.

func (*ProxyConfig) New

func (pc *ProxyConfig) New() *Proxy

New returns a pointer to a TLSproxy created from a TLSproxy configuration.

Jump to

Keyboard shortcuts

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