tcpproxy

package
v0.0.0-...-dea0195 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TCPProxy

type TCPProxy struct {
	ServerList []*TCPServer
	Default    *TCPServer
}

TCPProxy describes the passthrough servers and a default as catch all.

func (*TCPProxy) Get

func (p *TCPProxy) Get(host string) *TCPServer

Get returns the TCPServer to use for a given host.

func (*TCPProxy) Handle

func (p *TCPProxy) Handle(conn net.Conn)

Handle reads enough information from the connection to extract the hostname and open a connection to the passthrough server.

type TCPServer

type TCPServer struct {
	Hostname      string
	IP            string
	Port          int
	ProxyProtocol bool
}

TCPServer describes a server that works in passthrough mode.

Jump to

Keyboard shortcuts

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