tunnels

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressData added in v0.1.3

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

type BastionEntity

type BastionEntity struct {
	Id   string `json:"id"`
	IP   string `json:"ip"`
	User string `json:"user"`
}

type BastionService

type BastionService interface {
	GetBastion(ctx context.Context) (*BastionEntity, error)
	PushKey(ctx context.Context, bastion *BastionEntity, pub string) error
}

type EndpointInfo

type EndpointInfo struct {
	Protocol string `json:"protocol"`
	Host     string `json:"host"`
	Port     int    `json:"port"`
}

func (*EndpointInfo) String

func (e *EndpointInfo) String() string

type EndpointProvider

type EndpointProvider interface {
	GetEndpoint(ctx context.Context) (*EndpointInfo, error)
}

type KeyProvider

type KeyProvider interface {
	RetireveKey() ([]byte, []byte)
}

type Request added in v0.1.3

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

type SocksTunnel added in v0.1.3

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

func NewSocksTunnel added in v0.1.3

func NewSocksTunnel(
	bastionService BastionService,
	keyProvider KeyProvider,
	endpointProviders []EndpointProvider,
	proxyPort int,
) *SocksTunnel

func (*SocksTunnel) Start added in v0.1.3

func (self *SocksTunnel) Start(ctx context.Context)

func (*SocksTunnel) Stop added in v0.1.3

func (self *SocksTunnel) Stop()

type SshTunnel added in v0.1.3

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

func NewSshTunnel added in v0.1.3

func NewSshTunnel(
	bastionService BastionService,
	keyProvider KeyProvider,
	destination EndpointProvider,
	localPort int,
) *SshTunnel

func (*SshTunnel) Start added in v0.1.3

func (self *SshTunnel) Start(ctx context.Context)

func (*SshTunnel) Stop added in v0.1.3

func (self *SshTunnel) Stop()

Jump to

Keyboard shortcuts

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