sockproxy

package
v0.0.0-...-97e4c78 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package sockproxy will provide a tcp forwarding proxy as a buildkit session Attachable. This can be used to provide a tcp protocol bridge to the buildkit built-in unix protocol forwarding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(confs []AgentConfig) (session.Attachable, error)

NewProvider creates a session provider for arbitrary socket forwarding by piggy-backing off the SSH forwarding protocol.

func Run

func Run(l net.Listener, dialer func() (net.Conn, error)) error

Run will start the proxy. This must be done before using the session.Attachable in a buildkit solve request. To release resources you MUST Close the provided listener when done using the proxy.

Types

type AgentConfig

type AgentConfig struct {
	// ID should be a digest string that uniquely identifies this config.
	ID string
	// Path is the list of paths to forward.  If empty, SSH_AUTH_SOCK will be
	// used unless SSH is false.
	Paths []string
	// SSH when true will fall back to forward the file located at the
	// SSH_AUTH_SOCK environment variable.
	SSH bool
}

AgentConfig holds data necessary for to create a tcp forwarding agent.

Jump to

Keyboard shortcuts

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