loopback

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package loopback fronts an agent tunnel as a local TCP endpoint. Clients that bypass a custom dialer — Docker's exec hijack, client-go's SPDY/WebSocket upgraders — need a real socket; each accepted connection is piped to a fresh tunnel stream. It listens on 127.0.0.1 only, for the session's lifetime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

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

func New

func New(dial func(context.Context) (net.Conn, error)) (*Bridge, error)

New starts a bridge that pipes each accepted connection to dial's tunnel stream.

func (*Bridge) Addr

func (b *Bridge) Addr() string

Addr is the bridge's host:port; Host is it as an http:// URL.

func (*Bridge) Close

func (b *Bridge) Close() error

func (*Bridge) Host

func (b *Bridge) Host() string

Jump to

Keyboard shortcuts

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