proxy

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2014 License: Apache-2.0 Imports: 5 Imported by: 12 modules, 11 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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