server

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const WpadTemplate = `` /* 288-byte string literal not displayed */

Variables

View Source
var WpadPaths = map[string]bool{
	"/proxy.pac": true,
	"/wpad.dat":  true,
	"/wpad.da":   true,
}

Functions

This section is empty.

Types

type ProxyServer

type ProxyServer struct {
	Interface configuration.InterfaceConfig
	Global    *configuration.GlobalConfig
	Listener  *net.TCPListener
	Http      *http.Server
	Log       *log.Entry
	Proxy     *goproxy.ProxyHttpServer
}

func NewProxy

func NewProxy(iface configuration.InterfaceConfig, global *configuration.GlobalConfig, logger *log.Entry) (*ProxyServer, error)

func (ProxyServer) Start

func (p ProxyServer) Start() error

func (ProxyServer) Stop

func (p ProxyServer) Stop() error

type Server

type Server struct {
	Interface      configuration.InterfaceConfig
	Listener       *net.TCPListener
	Http           *http.Server
	Log            *log.Entry
	WpadFile       string
	ReverseProxies map[string]httputil.ReverseProxy
	Proxy          *ProxyServer
}

func New

func (Server) ServeHTTP

func (d Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*Server) Start

func (d *Server) Start() error

func (Server) Stop

func (d Server) Stop() error

Jump to

Keyboard shortcuts

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