tunnel

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 15 Imported by: 1

Documentation

Overview

Package tunnel contains an iap tunnel proxy implementation that exports certain methods used for the provider.

Index

Constants

View Source
const CONNECT_ENDPOINT = "connect"
View Source
const MTLS_URL_HOST = "mtls.tunnel.cloudproxy.app"
View Source
const RECONNECT_ENDPOINT = "reconnect"
View Source
const SEC_PROTOCOL_SUFFIX = "bearer.relay.tunnel.cloudproxy.app"
View Source
const SUBPROTOCOL_HEADER_LEN = SUBPROTOCOL_TAG_LEN + 4
View Source
const SUBPROTOCOL_MAX_DATA_FRAME_SIZE = 16384
View Source
const SUBPROTOCOL_NAME = "relay.tunnel.cloudproxy.app"
View Source
const SUBPROTOCOL_TAG_ACK uint16 = 0x0007
View Source
const SUBPROTOCOL_TAG_CONNECT_SUCCESS_SID uint16 = 0x0001
View Source
const SUBPROTOCOL_TAG_DATA uint16 = 0x0004
View Source
const SUBPROTOCOL_TAG_LEN = 2
View Source
const SUBPROTOCOL_TAG_RECONNECT_SUCCESS_ACK uint16 = 0x0002
View Source
const TUNNEL_CLOUDPROXY_ORIGIN = "bot:iap-tunneler"
View Source
const URL_HOST = "tunnel.cloudproxy.app"
View Source
const URL_PATH_ROOT = "/v4"
View Source
const URL_SCHEME = "wss"

Variables

This section is empty.

Functions

This section is empty.

Types

type TunnelManager

type TunnelManager struct {
	Project    string
	RemotePort int
	LocalPort  int

	Zone      string
	Instance  string
	Interface string
	// contains filtered or unexported fields
}

func (*TunnelManager) SetTokenSource

func (m *TunnelManager) SetTokenSource(source oauth2.TokenSource)

SetTokenSource sets the token source for the tunnel

func (*TunnelManager) StartProxy

func (m *TunnelManager) StartProxy(ctx context.Context) error

func (*TunnelManager) StartTunnel

func (m *TunnelManager) StartTunnel(ctx context.Context) (io.ReadWriteCloser, error)

Jump to

Keyboard shortcuts

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