forward

package
v0.2.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2025 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CoreProxy

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

CoreProxy handles the core proxy logic.

func NewCoreProxy

func NewCoreProxy(logger *zap.Logger, resolveTimeout, dialTimeout, purgeTimeout, purgeInterval time.Duration, disablePurgeInactive bool) *CoreProxy

NewCoreProxy creates a new CoreProxy instance.

func (*CoreProxy) Cleanup

func (cp *CoreProxy) Cleanup() error

Cleanup cleans up the core proxy logic.

func (*CoreProxy) HandlePathUsage

func (cp *CoreProxy) HandlePathUsage(w http.ResponseWriter, r *http.Request) error

func (*CoreProxy) HandlePolicyPath

func (cp *CoreProxy) HandlePolicyPath(w http.ResponseWriter, r *http.Request) error

func (*CoreProxy) HandleResolveHost

func (cp *CoreProxy) HandleResolveHost(w http.ResponseWriter, r *http.Request) error

func (*CoreProxy) HandleResolveURL

func (cp *CoreProxy) HandleResolveURL(w http.ResponseWriter, r *http.Request) error

func (*CoreProxy) HandleTunnelRequest

func (cp *CoreProxy) HandleTunnelRequest(w http.ResponseWriter, r *http.Request) error

func (*CoreProxy) Initialize

func (cp *CoreProxy) Initialize() error

Initialize initializes the core proxy logic.

type HTTPHandler

type HTTPHandler interface {
	ServeHTTP(w http.ResponseWriter, r *http.Request) error
}

HTTPHandler is an interface for handling HTTP requests.

type ResolveHandler

type ResolveHandler interface {
	HandleRedirectBackOrError(w http.ResponseWriter, r *http.Request) error
	HandleHostResolutionRequest(w http.ResponseWriter, r *http.Request) error
}

ResolveHandler defines an interface for handling HTTP requests related to host resolution and redirection. Implementations of this interface should provide mechanisms to handle redirection back or errors, as well as host resolution requests.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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