reverseproxy

package
v0.0.0-...-9b4d37b Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Proxy

func Proxy(req Request) error

Proxy will open a reverse tcp proxy, listening to the provided local port and proxies this to the given remote ip and destination port. based on: https://gist.github.com/vmihailenco/1380352

Types

type Request

type Request struct {
	// LocalPort is the local port that will be selected for the reverse proxy
	LocalPort int
	// PodPort is the target port for the reverse proxy
	RemotePort int
	// RemoteIP is the target ip for the reverse proxy
	RemoteIP string
	// StopCh is the channel used to manage the reverse proxy lifecycle
	StopCh <-chan struct{}
	// MaxRetry is the maximum number of retries (equals to seconds) upon error
	// and initial connection.
	MaxRetry int
}

Request is the structure used as argument for Proxy

Jump to

Keyboard shortcuts

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