proxy

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2014 License: Apache-2.0 Imports: 5 Imported by: 12

Documentation

Overview

package proxy provides the implementations of the client and server proxies

Index

Constants

View Source
const (
	X_LANTERN_PUBLIC_IP = "X-LANTERN-PUBLIC-IP" // Client's public IP as seen by the proxy

	HR = "--------------------------------------------------------------------------------"
)

Variables

This section is empty.

Functions

func DumpHeaders

func DumpHeaders(category string, headers *http.Header)

DumpHeaders logs the given headers (request or response).

Types

type ProxyConfig

type ProxyConfig struct {
	ShouldDumpHeaders bool          // whether or not to dump headers of requests and responses
	Addr              string        // listen address in form of host:port
	ReadTimeout       time.Duration // (optional) timeout for read ops
	WriteTimeout      time.Duration // (optional) timeout for write ops
	TLSConfig         *tls.Config   // (optional) TLS configuration for inbound connections, if nil then DEFAULT_TLS_SERVER_CONFIG is used
}

ProxyConfig encapsulates common proxy configuration

Jump to

Keyboard shortcuts

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