Documentation
¶
Index ¶
- Constants
- Variables
- func BoolPtr(b bool) *bool
- func CompiletimeArch() string
- func CompiletimeOS() string
- func ConnFromPacketConn(c net.PacketConn, raddr net.Addr) net.Conn
- func FormatForwardedAddr(addr net.TCPAddr, props TunnelProperties) (string, error)
- func FormatForwardedHostPort(host, port string, props TunnelProperties) (string, error)
- func FormatForwardingAddr(props TunnelProperties) (string, error)
- func GenerateStableDomain(engine string) (string, bool, error)
- func GenerateStableHostname(engine string) (string, bool, error)
- func GenerateWebhookSigningSecret() (string, error)
- func IsWebhookDeliverableEventType(eventType string) bool
- func MaybeSetGeneratedStableDomain(props *TunnelProperties, engine string) error
- func MaybeSetGeneratedStableHostname(props *TunnelProperties, engine string) error
- func NetIPFromPbValue(ip *pb.IpAddress) net.IP
- func PacketConnFromConn(c net.Conn, raddr net.Addr, mode PacketMode) net.PacketConn
- func PacketConnFromDTLSConn(c *dtls.Conn) net.PacketConn
- func PacketConnFromPacketListener(l PacketListener) net.PacketConn
- func RuntimeArch() string
- func RuntimeOS() string
- func SignWebhookPayload(body []byte, secret string, timestamp time.Time) (string, error)
- func StrOrUndef(s *string) string
- func StringPtr(s string) *string
- func Uint16Ptr(u uint16) *uint16
- func Uint32Ptr(u uint32) *uint32
- func Uint32ToIPv4(ip uint32) net.IP
- type Addr
- type AttachWebTTYParticipantRequest
- type BytestreamTunnel
- type Client
- func (c *Client) AttachWebTTYParticipant(ctx context.Context, sessionID string, req AttachWebTTYParticipantRequest) (*WebTTYParticipant, error)
- func (c *Client) Connect(ctx context.Context, cfg *Config) (ControlChannel, error)
- func (c *Client) CreateWebTTYControlRequest(ctx context.Context, sessionID string, req CreateWebTTYControlRequest) (*WebTTYControlRequest, error)
- func (c *Client) DetachWebTTYParticipant(ctx context.Context, sessionID string, participantID string, ...) (*WebTTYParticipant, error)
- func (c *Client) Dial(ctx context.Context, raddr Addr) (net.Conn, error)
- func (c *Client) DialEngineHTTP1(ctx context.Context, addr string) (net.Conn, error)
- func (c *Client) GetTunnel(ctx context.Context, id string) (*TunnelProperties, error)
- func (c *Client) GetWebTTYCapabilities(ctx context.Context) (*WebTTYCapabilities, error)
- func (c *Client) GetWebTTYSession(ctx context.Context, id string) (*WebTTYSession, error)
- func (c *Client) GetWebTTYSessionGroup(ctx context.Context, id string) (*WebTTYSessionGroup, error)
- func (c *Client) ListClients(ctx context.Context, params *ListClientsParams) (*ListClientsResponse, error)
- func (c *Client) ListTunnels(ctx context.Context, params *ListTunnelsParams) (*ListTunnelsResponse, error)
- func (c *Client) ListWebTTYControlRequests(ctx context.Context, sessionID string, params *ListWebTTYControlRequestsParams) (*ListWebTTYControlRequestsResponse, error)
- func (c *Client) ListWebTTYKeyGrantDecryptMaterial(ctx context.Context, sessionID string, ...) (*ListWebTTYKeyGrantDecryptMaterialResponse, error)
- func (c *Client) ListWebTTYKeyGrants(ctx context.Context, sessionID string) (*ListWebTTYKeyGrantsResponse, error)
- func (c *Client) ListWebTTYParticipants(ctx context.Context, sessionID string) (*ListWebTTYParticipantsResponse, error)
- func (c *Client) ListWebTTYSessionEvents(ctx context.Context, sessionID string, params *ListWebTTYSessionEventsParams) (*ListWebTTYSessionEventsResponse, error)
- func (c *Client) ListWebTTYSessionGroups(ctx context.Context, params *ListWebTTYSessionGroupsParams) (*ListWebTTYSessionGroupsResponse, error)
- func (c *Client) ListWebTTYSessions(ctx context.Context, params *ListWebTTYSessionsParams) (*ListWebTTYSessionsResponse, error)
- func (c *Client) Login(ctx context.Context) (*string, error)
- func (c *Client) Logout(ctx context.Context) (*string, error)
- func (c *Client) PacketDial(ctx context.Context, raddr Addr) (net.PacketConn, error)
- func (c *Client) ResolveWebTTYControlRequest(ctx context.Context, sessionID string, requestID string, ...) (*WebTTYControlRequest, error)
- func (c *Client) Watch(ctx context.Context, transport string, params *WatchParams, ...) error
- func (c *Client) WatchSSE(ctx context.Context, params *WatchParams, handler func(Event) error) error
- func (c *Client) WatchWS(ctx context.Context, params *WatchParams, handler func(Event) error) error
- type ClientDetails
- type ClientOptions
- type ClientProperties
- type Config
- type ControlChannel
- type CreateTURNCredentialsOptions
- type CreateWebTTYControlRequest
- type DatagramProvider
- type DatagramTunnel
- type DetachWebTTYParticipantRequest
- type Dialer
- type Event
- type HTTPVersion
- type Identity
- type ListClientsFilters
- type ListClientsParams
- type ListClientsResponse
- type ListTunnelsFilters
- type ListTunnelsParams
- type ListTunnelsResponse
- type ListWebTTYControlRequestsFilters
- type ListWebTTYControlRequestsParams
- type ListWebTTYControlRequestsResponse
- type ListWebTTYKeyGrantDecryptMaterialParams
- type ListWebTTYKeyGrantDecryptMaterialResponse
- type ListWebTTYKeyGrantsResponse
- type ListWebTTYParticipantsResponse
- type ListWebTTYSessionEventsParams
- type ListWebTTYSessionEventsResponse
- type ListWebTTYSessionGroupsFilters
- type ListWebTTYSessionGroupsParams
- type ListWebTTYSessionGroupsResponse
- type ListWebTTYSessionsFilters
- type ListWebTTYSessionsParams
- type ListWebTTYSessionsResponse
- type PacketListener
- type PacketMode
- type Protocol
- type QUICTransport
- type ResolveWebTTYControlRequest
- type ServerDetails
- type TLSMode
- type TURNCredentialMode
- type TURNCredentials
- type Transport
- type Tunnel
- type TunnelInventory
- type TunnelProperties
- type TunnelType
- type WatchParams
- type WebTTYCapabilities
- type WebTTYContextMetadata
- type WebTTYControlRequest
- type WebTTYControlRequestStatus
- type WebTTYCryptoMetadata
- type WebTTYEncryptionMode
- type WebTTYEventDirection
- type WebTTYEventType
- type WebTTYInitiatorKind
- type WebTTYKeyGrant
- type WebTTYKeyGrantDecryptMaterial
- type WebTTYOrigin
- type WebTTYParticipant
- type WebTTYParticipantLive
- type WebTTYParticipantRole
- type WebTTYRecordingMode
- type WebTTYSession
- type WebTTYSessionEvent
- type WebTTYSessionGroup
- type WebTTYSessionLive
- type WebTTYSessionMode
- type WebTTYSessionStatus
- type WebTTYStreamType
- type WebTTYTransport
- type WebhookEvent
- type WebhookHeaderOptions
- type WebhookHeaderValues
Constants ¶
const ( WebhookSignatureHeader = "rstream-signature" WebhookEventIDHeader = "rstream-event-id" WebhookEventTypeHeader = "rstream-event-type" WebhookIDHeader = "rstream-webhook-id" WebhookDeliveryIDHeader = "rstream-delivery-id" )
Variables ¶
var ( Agent = "rstream" Channel = "dev" Version = "development" OS = "" Arch = "" )
var ErrDatagramTooLarge = errors.New("datagram payload too large")
ErrDatagramTooLarge is returned by datagram channel writes when the payload exceeds what the underlying QUIC connection can carry in a single datagram.
Functions ¶
func CompiletimeArch ¶ added in v1.3.2
func CompiletimeArch() string
CompiletimeArch returns the arch value embedded at build time.
func CompiletimeOS ¶ added in v1.3.2
func CompiletimeOS() string
CompiletimeOS returns the OS value embedded at build time.
func ConnFromPacketConn ¶ added in v1.15.0
ConnFromPacketConn adapts a PacketConn with a fixed remote address into a net.Conn.
func FormatForwardedAddr ¶
func FormatForwardedAddr(addr net.TCPAddr, props TunnelProperties) (string, error)
func FormatForwardedHostPort ¶ added in v1.2.0
func FormatForwardedHostPort(host, port string, props TunnelProperties) (string, error)
func FormatForwardingAddr ¶
func FormatForwardingAddr(props TunnelProperties) (string, error)
func GenerateStableDomain ¶ added in v1.13.0
func GenerateStableHostname ¶ added in v1.13.0
func GenerateWebhookSigningSecret ¶ added in v1.21.0
func IsWebhookDeliverableEventType ¶ added in v1.21.0
func MaybeSetGeneratedStableDomain ¶ added in v1.13.0
func MaybeSetGeneratedStableDomain(props *TunnelProperties, engine string) error
func MaybeSetGeneratedStableHostname ¶ added in v1.13.0
func MaybeSetGeneratedStableHostname(props *TunnelProperties, engine string) error
func PacketConnFromConn ¶ added in v1.2.0
func PacketConnFromConn(c net.Conn, raddr net.Addr, mode PacketMode) net.PacketConn
func PacketConnFromDTLSConn ¶ added in v1.2.0
func PacketConnFromDTLSConn(c *dtls.Conn) net.PacketConn
func PacketConnFromPacketListener ¶ added in v1.2.0
func PacketConnFromPacketListener(l PacketListener) net.PacketConn
func RuntimeArch ¶ added in v1.3.2
func RuntimeArch() string
RuntimeArch returns the arch detected at runtime.
func RuntimeOS ¶ added in v1.3.2
func RuntimeOS() string
RuntimeOS returns the OS detected at runtime.
func SignWebhookPayload ¶ added in v1.21.0
func StrOrUndef ¶
func Uint32ToIPv4 ¶ added in v1.2.0
Types ¶
type AttachWebTTYParticipantRequest ¶ added in v1.22.0
type AttachWebTTYParticipantRequest struct {
Role string `json:"role,omitempty"`
DeviceID string `json:"device_id,omitempty"`
BrowserID string `json:"browser_id,omitempty"`
Transport WebTTYTransport `json:"transport,omitempty"`
GrantState string `json:"grant_state,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
}
type BytestreamTunnel ¶
type Client ¶
type Client struct {
Transport Dialer
TLSClientConfig *tls.Config
EngineURL *string
Token *string
NoToken *bool
ZeroRTT *bool
}
func NewClient ¶ added in v1.3.0
func NewClient(options ClientOptions) (*Client, error)
func (*Client) AttachWebTTYParticipant ¶ added in v1.22.0
func (c *Client) AttachWebTTYParticipant(ctx context.Context, sessionID string, req AttachWebTTYParticipantRequest) (*WebTTYParticipant, error)
func (*Client) CreateWebTTYControlRequest ¶ added in v1.22.0
func (c *Client) CreateWebTTYControlRequest(ctx context.Context, sessionID string, req CreateWebTTYControlRequest) (*WebTTYControlRequest, error)
func (*Client) DetachWebTTYParticipant ¶ added in v1.22.0
func (c *Client) DetachWebTTYParticipant(ctx context.Context, sessionID string, participantID string, req DetachWebTTYParticipantRequest) (*WebTTYParticipant, error)
func (*Client) DialEngineHTTP1 ¶ added in v1.22.0
func (*Client) GetWebTTYCapabilities ¶ added in v1.22.0
func (c *Client) GetWebTTYCapabilities(ctx context.Context) (*WebTTYCapabilities, error)
func (*Client) GetWebTTYSession ¶ added in v1.22.0
func (*Client) GetWebTTYSessionGroup ¶ added in v1.22.0
func (*Client) ListClients ¶ added in v1.8.0
func (c *Client) ListClients(ctx context.Context, params *ListClientsParams) (*ListClientsResponse, error)
func (*Client) ListTunnels ¶ added in v1.2.0
func (c *Client) ListTunnels(ctx context.Context, params *ListTunnelsParams) (*ListTunnelsResponse, error)
func (*Client) ListWebTTYControlRequests ¶ added in v1.22.0
func (c *Client) ListWebTTYControlRequests(ctx context.Context, sessionID string, params *ListWebTTYControlRequestsParams) (*ListWebTTYControlRequestsResponse, error)
func (*Client) ListWebTTYKeyGrantDecryptMaterial ¶ added in v1.22.0
func (c *Client) ListWebTTYKeyGrantDecryptMaterial(ctx context.Context, sessionID string, params *ListWebTTYKeyGrantDecryptMaterialParams) (*ListWebTTYKeyGrantDecryptMaterialResponse, error)
func (*Client) ListWebTTYKeyGrants ¶ added in v1.22.0
func (*Client) ListWebTTYParticipants ¶ added in v1.22.0
func (*Client) ListWebTTYSessionEvents ¶ added in v1.22.0
func (c *Client) ListWebTTYSessionEvents(ctx context.Context, sessionID string, params *ListWebTTYSessionEventsParams) (*ListWebTTYSessionEventsResponse, error)
func (*Client) ListWebTTYSessionGroups ¶ added in v1.22.0
func (c *Client) ListWebTTYSessionGroups(ctx context.Context, params *ListWebTTYSessionGroupsParams) (*ListWebTTYSessionGroupsResponse, error)
func (*Client) ListWebTTYSessions ¶ added in v1.22.0
func (c *Client) ListWebTTYSessions(ctx context.Context, params *ListWebTTYSessionsParams) (*ListWebTTYSessionsResponse, error)
func (*Client) PacketDial ¶
func (*Client) ResolveWebTTYControlRequest ¶ added in v1.22.0
func (c *Client) ResolveWebTTYControlRequest(ctx context.Context, sessionID string, requestID string, req ResolveWebTTYControlRequest) (*WebTTYControlRequest, error)
type ClientDetails ¶ added in v1.3.2
type ClientOptions ¶ added in v1.3.0
type ClientProperties ¶ added in v1.8.0
type ClientProperties struct {
ID string `json:"id"`
Status string `json:"status"`
UserID *string `json:"user_id,omitempty"`
WorkspaceID *string `json:"workspace_id,omitempty"`
ProjectID *string `json:"project_id,omitempty"`
ClusterID *string `json:"cluster_id,omitempty"`
Plan *string `json:"plan,omitempty"`
Provider *string `json:"provider,omitempty"`
Region *string `json:"region,omitempty"`
Agent *string `json:"agent,omitempty"`
Channel *string `json:"channel,omitempty"`
Version *string `json:"version,omitempty"`
OS *string `json:"os,omitempty"`
Arch *string `json:"arch,omitempty"`
ProtocolVersion *string `json:"protocol_version,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
type ControlChannel ¶
type ControlChannel interface {
CreateTunnel(ctx context.Context, props TunnelProperties) (Tunnel, error)
Close() error
Done() <-chan error
Err() error
ServerDetails() *ServerDetails
}
type CreateTURNCredentialsOptions ¶ added in v1.10.0
type CreateWebTTYControlRequest ¶ added in v1.22.0
type DatagramProvider ¶ added in v1.12.0
type DatagramProvider interface {
SendDatagram(data []byte) error
ReceiveDatagram(ctx context.Context) ([]byte, error)
}
DatagramProvider is implemented by transports that support sending and receiving raw datagrams alongside the stream-based control channel. QUICTransport implements this interface, enabling datagram tunnel connections to bypass the 4-byte framing overhead used by stream-based tunnels.
type DatagramTunnel ¶
type DatagramTunnel interface {
Tunnel
PacketListener
}
type DetachWebTTYParticipantRequest ¶ added in v1.22.0
type DetachWebTTYParticipantRequest struct {
Reason string `json:"reason,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
}
type Event ¶ added in v1.2.0
type Event struct {
ID string `json:"id,omitempty"`
Type string `json:"type"`
CreatedAt string `json:"created_at,omitempty"`
UserID string `json:"user_id,omitempty"`
WorkspaceID string `json:"workspace_id,omitempty"`
ProjectID string `json:"project_id,omitempty"`
ClusterID string `json:"cluster_id,omitempty"`
Object json.RawMessage `json:"object"`
}
type HTTPVersion ¶
type HTTPVersion string
const ( HTTP1_1 HTTPVersion = "http/1.1" // HTTP/1.1 (cleartext) HTTP2 HTTPVersion = "h2c" // HTTP/2 (cleartext) HTTP3 HTTPVersion = "h3" // HTTP/3 )
func HTTPVersionPtr ¶
func HTTPVersionPtr(h HTTPVersion) *HTTPVersion
type Identity ¶ added in v1.3.2
Identity represents the OS/arch pair.
func CompiletimeIdentity ¶ added in v1.3.2
func CompiletimeIdentity() Identity
CompiletimeIdentity returns the OS/arch values embedded at build time.
func RuntimeIdentity ¶ added in v1.3.2
func RuntimeIdentity() Identity
RuntimeIdentity returns the OS/arch detected at runtime.
type ListClientsFilters ¶ added in v1.8.0
type ListClientsFilters struct {
ID *string `json:"id,omitempty"`
Status *string `json:"status,omitempty"`
UserID *string `json:"user_id,omitempty"`
Agent *string `json:"agent,omitempty"`
Channel *string `json:"channel,omitempty"`
Version *string `json:"version,omitempty"`
OS *string `json:"os,omitempty"`
Arch *string `json:"arch,omitempty"`
ProtocolVersion *string `json:"protocol_version,omitempty"`
Labels map[string]*string `json:"labels,omitempty"`
}
type ListClientsParams ¶ added in v1.8.0
type ListClientsParams struct {
Limit *int `json:"limit,omitempty"`
Filters *ListClientsFilters `json:"filters,omitempty"`
}
type ListClientsResponse ¶ added in v1.8.0
type ListClientsResponse = []ClientProperties
type ListTunnelsFilters ¶ added in v1.2.0
type ListTunnelsFilters struct {
ID *string `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
Type *string `json:"type,omitempty"`
Status *string `json:"status,omitempty"`
ClientID *string `json:"client_id,omitempty"`
UserID *string `json:"user_id,omitempty"`
Protocol *string `json:"protocol,omitempty"`
Hostname *string `json:"hostname,omitempty"`
Publish *bool `json:"publish,omitempty"`
HTTPVersion *string `json:"http_version,omitempty"`
Labels map[string]*string `json:"labels,omitempty"`
}
type ListTunnelsParams ¶ added in v1.2.0
type ListTunnelsParams struct {
Limit *int `json:"limit,omitempty"`
Filters *ListTunnelsFilters `json:"filters,omitempty"`
}
type ListTunnelsResponse ¶ added in v1.2.0
type ListTunnelsResponse = []TunnelInventory
type ListWebTTYControlRequestsFilters ¶ added in v1.22.0
type ListWebTTYControlRequestsParams ¶ added in v1.22.0
type ListWebTTYControlRequestsParams struct {
Limit *int `json:"limit,omitempty"`
Filters *ListWebTTYControlRequestsFilters `json:"filters,omitempty"`
}
type ListWebTTYControlRequestsResponse ¶ added in v1.22.0
type ListWebTTYControlRequestsResponse = []WebTTYControlRequest
type ListWebTTYKeyGrantDecryptMaterialParams ¶ added in v1.22.0
type ListWebTTYKeyGrantDecryptMaterialResponse ¶ added in v1.22.0
type ListWebTTYKeyGrantDecryptMaterialResponse = []WebTTYKeyGrantDecryptMaterial
type ListWebTTYKeyGrantsResponse ¶ added in v1.22.0
type ListWebTTYKeyGrantsResponse = []WebTTYKeyGrant
type ListWebTTYParticipantsResponse ¶ added in v1.22.0
type ListWebTTYParticipantsResponse = []WebTTYParticipant
type ListWebTTYSessionEventsParams ¶ added in v1.22.0
type ListWebTTYSessionEventsResponse ¶ added in v1.22.0
type ListWebTTYSessionEventsResponse = []WebTTYSessionEvent
type ListWebTTYSessionGroupsFilters ¶ added in v1.22.0
type ListWebTTYSessionGroupsParams ¶ added in v1.22.0
type ListWebTTYSessionGroupsParams struct {
Limit *int `json:"limit,omitempty"`
Filters *ListWebTTYSessionGroupsFilters `json:"filters,omitempty"`
}
type ListWebTTYSessionGroupsResponse ¶ added in v1.22.0
type ListWebTTYSessionGroupsResponse = []WebTTYSessionGroup
type ListWebTTYSessionsFilters ¶ added in v1.22.0
type ListWebTTYSessionsFilters struct {
ServerID *string `json:"server_id,omitempty"`
TunnelID *string `json:"tunnel_id,omitempty"`
UserID *string `json:"user_id,omitempty"`
GroupID *string `json:"group_id,omitempty"`
Origin *string `json:"origin,omitempty"`
Status *string `json:"status,omitempty"`
StartedFrom *time.Time `json:"started_from,omitempty"`
StartedTo *time.Time `json:"started_to,omitempty"`
}
type ListWebTTYSessionsParams ¶ added in v1.22.0
type ListWebTTYSessionsParams struct {
Limit *int `json:"limit,omitempty"`
Filters *ListWebTTYSessionsFilters `json:"filters,omitempty"`
}
type ListWebTTYSessionsResponse ¶ added in v1.22.0
type ListWebTTYSessionsResponse = []WebTTYSession
type PacketListener ¶ added in v1.2.0
type PacketListener interface {
Accept() (net.PacketConn, net.Addr, error)
Close() error
Addr() net.Addr
}
func PacketListenerFromListener ¶ added in v1.2.0
func PacketListenerFromListener(l net.Listener) PacketListener
type PacketMode ¶ added in v1.2.0
type PacketMode int
const ( PacketModeFramed PacketMode = iota PacketModeRaw )
type QUICTransport ¶ added in v1.12.0
type QUICTransport struct {
LocalAddr *string
NetworkInterface *string
ForceIPv4 *bool
ForceIPv6 *bool
DNSOverride *string
DNSOverTLS *bool
DNSServerName *string
DNSSECEnabled *bool
ProxyHTTP *string
ProxySOCKS5 *string
ProxyUsername *string
ProxyPassword *string
ProxyHTTPHeaders map[string]string
TLSProxyConfig *tls.Config
ProxyFromEnvironment *bool
// contains filtered or unexported fields
}
QUICTransport is a stateful Dialer that multiplexes all connections over a single QUIC connection. The first call to Dial establishes the underlying QUIC connection; subsequent calls open a new QUIC stream on that connection. It also implements DatagramProvider so that datagram tunnels can bypass the 4-byte framing overhead used by stream-based tunnels.
No reconnection on error — let the control channel error propagate naturally.
func (*QUICTransport) Close ¶ added in v1.12.0
func (t *QUICTransport) Close() error
Close closes the underlying QUIC connection and the UDP socket beneath it.
func (*QUICTransport) Dial ¶ added in v1.12.0
func (t *QUICTransport) Dial(ctx context.Context, addr string, tlsCfg *tls.Config) (net.Conn, error)
Dial establishes or reuses a QUIC connection to addr, then opens and returns a new QUIC stream wrapped as a net.Conn.
func (*QUICTransport) ReceiveDatagram ¶ added in v1.12.0
func (t *QUICTransport) ReceiveDatagram(ctx context.Context) ([]byte, error)
ReceiveDatagram receives a datagram from the underlying QUIC connection. It implements DatagramProvider.
func (*QUICTransport) SendDatagram ¶ added in v1.12.0
func (t *QUICTransport) SendDatagram(data []byte) error
SendDatagram sends a datagram over the underlying QUIC connection. It implements DatagramProvider.
type ResolveWebTTYControlRequest ¶ added in v1.22.0
type ServerDetails ¶ added in v1.3.0
type TURNCredentialMode ¶ added in v1.10.0
type TURNCredentialMode string
const ( TURNCredentialModeAPI TURNCredentialMode = "api" TURNCredentialModePAT TURNCredentialMode = "pat" )
type TURNCredentials ¶ added in v1.10.0
type TURNCredentials = controlplane.TURNCredentials
func CreateTURNCredentials ¶ added in v1.10.0
func CreateTURNCredentials(ctx context.Context, opts CreateTURNCredentialsOptions) (*TURNCredentials, error)
type Transport ¶
type Transport struct {
LocalAddr *string
NetworkInterface *string
ForceIPv4 *bool
ForceIPv6 *bool
DNSOverride *string
DNSOverTLS *bool
DNSServerName *string
DNSSECEnabled *bool
MPTCPEnabled *bool
ProxyHTTP *string
ProxySOCKS5 *string
ProxyUsername *string
ProxyPassword *string
ProxyHTTPHeaders map[string]string
TLSProxyConfig *tls.Config
ProxyFromEnvironment *bool
}
Default transport implementation
type Tunnel ¶
type Tunnel interface {
ForwardingAddress() (string, error)
Properties() (TunnelProperties, error)
Close() error
}
type TunnelInventory ¶ added in v1.9.0
type TunnelInventory struct {
TunnelProperties
WorkspaceID string `json:"workspace_id,omitempty"`
ProjectID string `json:"project_id,omitempty"`
Status string `json:"status"`
ClientID string `json:"client_id,omitempty"`
}
type TunnelProperties ¶
type TunnelProperties struct {
ID *string `json:"id,omitempty"`
CreationDate *time.Time `json:"creation_date,omitempty"`
Name *string `json:"name,omitempty"`
Type *TunnelType `json:"type,omitempty"`
Publish *bool `json:"publish,omitempty"`
Protocol *Protocol `json:"protocol,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
GeoIP []string `json:"geo_ip,omitempty"`
TrustedIPs []string `json:"trusted_ips,omitempty"`
Host *string `json:"host,omitempty"`
Hostname *string `json:"hostname,omitempty"`
Port *uint32 `json:"port,omitempty"`
TLSMode *TLSMode `json:"tls_mode,omitempty"`
TLSALPNs []string `json:"tls_alpns,omitempty"`
TLSMinVersion *string `json:"tls_min_version,omitempty"`
TLSCiphers []string `json:"tls_ciphers,omitempty"`
MTLSAuth *bool `json:"mtls_auth,omitempty"`
HTTPVersion *HTTPVersion `json:"http_version,omitempty"`
HTTPUseTLS *bool `json:"http_use_tls,omitempty"`
UpstreamTLS *bool `json:"upstream_tls,omitempty"`
TokenAuth *bool `json:"token_auth,omitempty"`
RstreamAuth *bool `json:"rstream_auth,omitempty"`
ChallengeMode *bool `json:"challenge_mode,omitempty"`
}
type TunnelType ¶
type TunnelType string
const ( TunnelTypeBytestream TunnelType = "bytestream" TunnelTypeDatagram TunnelType = "datagram" )
func TunnelTypePtr ¶
func TunnelTypePtr(t TunnelType) *TunnelType
type WatchParams ¶ added in v1.8.0
type WatchParams struct {
Clients *ListClientsFilters `json:"clients,omitempty"`
Tunnels *ListTunnelsFilters `json:"tunnels,omitempty"`
}
type WebTTYCapabilities ¶ added in v1.22.0
type WebTTYCapabilities struct {
ManagedProtocol bool `json:"managed_protocol"`
StoreConfigured bool `json:"store_configured"`
SessionListing bool `json:"session_listing"`
Recording bool `json:"recording"`
Replay bool `json:"replay"`
LiveAttach bool `json:"live_attach"`
ControlTransfer bool `json:"control_transfer"`
E2E bool `json:"e2e"`
ImplementedTransports []WebTTYTransport `json:"implemented_transports"`
RecordingModes []WebTTYRecordingMode `json:"recording_modes"`
EncryptionModes []WebTTYEncryptionMode `json:"encryption_modes"`
RequiredPermissions map[string][]string `json:"required_permissions"`
}
type WebTTYContextMetadata ¶ added in v1.22.0
type WebTTYContextMetadata struct {
Origin WebTTYOrigin `json:"origin,omitempty"`
OriginID string `json:"origin_id,omitempty"`
Purpose string `json:"purpose,omitempty"`
InitiatorKind WebTTYInitiatorKind `json:"initiator_kind,omitempty"`
AgentName string `json:"agent_name,omitempty"`
AgentVersion string `json:"agent_version,omitempty"`
RequestID string `json:"request_id,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
}
type WebTTYControlRequest ¶ added in v1.22.0
type WebTTYControlRequest struct {
ID string `json:"id"`
SessionID string `json:"session_id"`
RequesterParticipantID string `json:"requester_participant_id"`
RequesterUserID string `json:"requester_user_id,omitempty"`
ApproverParticipantID string `json:"approver_participant_id,omitempty"`
ApproverUserID string `json:"approver_user_id,omitempty"`
Status WebTTYControlRequestStatus `json:"status"`
Reason string `json:"reason,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ResolvedAt *time.Time `json:"resolved_at,omitempty"`
ExpiresAt *time.Time `json:"expires_at,omitempty"`
}
type WebTTYControlRequestStatus ¶ added in v1.22.0
type WebTTYControlRequestStatus string
const ( WebTTYControlRequestPending WebTTYControlRequestStatus = "pending" WebTTYControlRequestGranted WebTTYControlRequestStatus = "granted" WebTTYControlRequestRefused WebTTYControlRequestStatus = "refused" WebTTYControlRequestRevoked WebTTYControlRequestStatus = "revoked" WebTTYControlRequestExpired WebTTYControlRequestStatus = "expired" )
type WebTTYCryptoMetadata ¶ added in v1.22.0
type WebTTYCryptoMetadata struct {
PayloadSuite string `json:"payload_suite,omitempty"`
PayloadKeyID string `json:"payload_key_id,omitempty"`
Nonce string `json:"nonce,omitempty"`
KeyEnvelopeSuite string `json:"key_envelope_suite,omitempty"`
KeyEnvelopes json.RawMessage `json:"key_envelopes,omitempty"`
KeyContext json.RawMessage `json:"key_context,omitempty"`
KeyContextRaw string `json:"key_context_raw,omitempty"`
}
type WebTTYEncryptionMode ¶ added in v1.22.0
type WebTTYEncryptionMode string
const ( WebTTYEncryptionModeManaged WebTTYEncryptionMode = "managed" WebTTYEncryptionModeE2E WebTTYEncryptionMode = "e2e" )
type WebTTYEventDirection ¶ added in v1.22.0
type WebTTYEventDirection string
const ( WebTTYDirectionClientToServer WebTTYEventDirection = "client_to_server" WebTTYDirectionServerToClient WebTTYEventDirection = "server_to_client" WebTTYDirectionEngineInternal WebTTYEventDirection = "engine_internal" )
type WebTTYEventType ¶ added in v1.22.0
type WebTTYEventType string
const ( WebTTYSessionEventOpen WebTTYEventType = "open" WebTTYSessionEventAck WebTTYEventType = "ack" WebTTYSessionEventData WebTTYEventType = "data" WebTTYSessionEventResize WebTTYEventType = "resize" WebTTYSessionEventClose WebTTYEventType = "close" WebTTYSessionEventError WebTTYEventType = "error" WebTTYSessionEventParticipant WebTTYEventType = "participant" WebTTYSessionEventControl WebTTYEventType = "control" WebTTYSessionEventRecordingState WebTTYEventType = "recording_state" )
type WebTTYInitiatorKind ¶ added in v1.22.0
type WebTTYInitiatorKind string
const ( WebTTYInitiatorUser WebTTYInitiatorKind = "user" WebTTYInitiatorApp WebTTYInitiatorKind = "app" WebTTYInitiatorAgent WebTTYInitiatorKind = "agent" WebTTYInitiatorServiceAccount WebTTYInitiatorKind = "service-account" )
type WebTTYKeyGrant ¶ added in v1.22.0
type WebTTYKeyGrant struct {
ID string `json:"id"`
SessionID string `json:"session_id"`
RecipientID string `json:"recipient_id"`
RecipientKind string `json:"recipient_kind"`
GrantedBy string `json:"granted_by,omitempty"`
Crypto WebTTYCryptoMetadata `json:"crypto"`
CreatedAt time.Time `json:"created_at"`
RevokedAt *time.Time `json:"revoked_at,omitempty"`
}
func (*WebTTYKeyGrant) UnmarshalJSON ¶ added in v1.22.0
func (g *WebTTYKeyGrant) UnmarshalJSON(data []byte) error
type WebTTYKeyGrantDecryptMaterial ¶ added in v1.22.0
type WebTTYKeyGrantDecryptMaterial struct {
ID string `json:"id"`
SessionID string `json:"session_id"`
RecipientID string `json:"recipient_id"`
RecipientKind string `json:"recipient_kind"`
GrantedBy string `json:"granted_by,omitempty"`
WrappedKey []byte `json:"wrapped_key,omitempty"`
Crypto WebTTYCryptoMetadata `json:"crypto"`
CreatedAt time.Time `json:"created_at"`
RevokedAt *time.Time `json:"revoked_at,omitempty"`
}
type WebTTYOrigin ¶ added in v1.22.0
type WebTTYOrigin string
const ( WebTTYOriginHuman WebTTYOrigin = "human" WebTTYOriginCodex WebTTYOrigin = "codex" WebTTYOriginAPI WebTTYOrigin = "api" WebTTYOriginAutomation WebTTYOrigin = "automation" WebTTYOriginCI WebTTYOrigin = "ci" WebTTYOriginScheduledJob WebTTYOrigin = "scheduled-job" )
type WebTTYParticipant ¶ added in v1.22.0
type WebTTYParticipant struct {
ID string `json:"id"`
SessionID string `json:"session_id"`
UserID string `json:"user_id,omitempty"`
DeviceID string `json:"device_id,omitempty"`
BrowserID string `json:"browser_id,omitempty"`
Role WebTTYParticipantRole `json:"role"`
AttachedAt time.Time `json:"attached_at"`
DetachedAt *time.Time `json:"detached_at,omitempty"`
Controller bool `json:"controller"`
GrantState string `json:"grant_state,omitempty"`
AttachGrant []byte `json:"attach_grant,omitempty"`
AttachGrantExpiresAt *time.Time `json:"attach_grant_expires_at,omitempty"`
Live WebTTYParticipantLive `json:"live"`
}
type WebTTYParticipantLive ¶ added in v1.22.0
type WebTTYParticipantRole ¶ added in v1.22.0
type WebTTYParticipantRole string
const ( WebTTYParticipantRoleController WebTTYParticipantRole = "controller" WebTTYParticipantRoleSpectator WebTTYParticipantRole = "spectator" )
type WebTTYRecordingMode ¶ added in v1.22.0
type WebTTYRecordingMode string
const ( WebTTYRecordingModeRecorded WebTTYRecordingMode = "recorded" WebTTYRecordingModePrivate WebTTYRecordingMode = "private" )
type WebTTYSession ¶ added in v1.22.0
type WebTTYSession struct {
ID string `json:"id"`
WorkspaceID string `json:"workspace_id,omitempty"`
ProjectID string `json:"project_id,omitempty"`
ClusterID string `json:"cluster_id,omitempty"`
ServerID string `json:"server_id,omitempty"`
TunnelID string `json:"tunnel_id"`
ClientID string `json:"client_id,omitempty"`
InitiatorUserID string `json:"initiator_user_id,omitempty"`
GroupID string `json:"group_id,omitempty"`
Status WebTTYSessionStatus `json:"status"`
SessionMode WebTTYSessionMode `json:"session_mode"`
RecordingMode WebTTYRecordingMode `json:"recording_mode"`
EncryptionMode WebTTYEncryptionMode `json:"encryption_mode"`
DownTransport WebTTYTransport `json:"downstream_transport,omitempty"`
UpTransport WebTTYTransport `json:"upstream_transport,omitempty"`
CommandMeta json.RawMessage `json:"command_meta,omitempty"`
Context WebTTYContextMetadata `json:"context,omitempty"`
StartedAt time.Time `json:"started_at"`
EndedAt *time.Time `json:"ended_at,omitempty"`
ExitCode *int32 `json:"exit_code,omitempty"`
ErrorCode string `json:"error_code,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
Live WebTTYSessionLive `json:"live"`
}
type WebTTYSessionEvent ¶ added in v1.22.0
type WebTTYSessionEvent struct {
ID string `json:"id"`
SessionID string `json:"session_id"`
Seq string `json:"seq"`
CreatedAt time.Time `json:"created_at"`
Type WebTTYEventType `json:"type"`
Direction WebTTYEventDirection `json:"direction,omitempty"`
StreamType WebTTYStreamType `json:"stream_type,omitempty"`
ParticipantID string `json:"participant_id,omitempty"`
PayloadLength int `json:"payload_length,omitempty"`
PayloadCiphertext []byte `json:"payload_ciphertext,omitempty"`
PayloadPlaintext []byte `json:"payload_plaintext,omitempty"`
Crypto *WebTTYCryptoMetadata `json:"crypto,omitempty"`
PrevHash []byte `json:"prev_hash,omitempty"`
Hash []byte `json:"hash,omitempty"`
Metadata json.RawMessage `json:"metadata,omitempty"`
}
func (*WebTTYSessionEvent) UnmarshalJSON ¶ added in v1.22.0
func (e *WebTTYSessionEvent) UnmarshalJSON(data []byte) error
type WebTTYSessionGroup ¶ added in v1.22.0
type WebTTYSessionGroup struct {
ID string `json:"id"`
WorkspaceID string `json:"workspace_id,omitempty"`
ProjectID string `json:"project_id,omitempty"`
InitiatorUserID string `json:"initiator_user_id,omitempty"`
Context WebTTYContextMetadata `json:"context,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ClosedAt *time.Time `json:"closed_at,omitempty"`
}
type WebTTYSessionLive ¶ added in v1.22.0
type WebTTYSessionMode ¶ added in v1.22.0
type WebTTYSessionMode string
const ( WebTTYSessionModeInteractive WebTTYSessionMode = "interactive" WebTTYSessionModeNonInteractive WebTTYSessionMode = "non-interactive" )
type WebTTYSessionStatus ¶ added in v1.22.0
type WebTTYSessionStatus string
const ( WebTTYSessionStatusOpening WebTTYSessionStatus = "opening" WebTTYSessionStatusActive WebTTYSessionStatus = "active" WebTTYSessionStatusClosing WebTTYSessionStatus = "closing" WebTTYSessionStatusClosed WebTTYSessionStatus = "closed" WebTTYSessionStatusErrored WebTTYSessionStatus = "errored" )
type WebTTYStreamType ¶ added in v1.22.0
type WebTTYStreamType string
const ( WebTTYStreamTypeStdin WebTTYStreamType = "stdin" WebTTYStreamTypeStdout WebTTYStreamType = "stdout" WebTTYStreamTypeStderr WebTTYStreamType = "stderr" )
type WebTTYTransport ¶ added in v1.22.0
type WebTTYTransport string
const ( WebTTYTransportPlain WebTTYTransport = "plain" WebTTYTransportWebSocket WebTTYTransport = "websocket" WebTTYTransportWebTransport WebTTYTransport = "webtransport" )
type WebhookEvent ¶ added in v1.21.0
type WebhookEvent struct {
ID string `json:"id"`
Type string `json:"type"`
CreatedAt string `json:"created_at,omitempty"`
UserID string `json:"user_id,omitempty"`
WorkspaceID string `json:"workspace_id,omitempty"`
ProjectID string `json:"project_id,omitempty"`
ClusterID string `json:"cluster_id,omitempty"`
Object json.RawMessage `json:"object"`
}
func EventToWebhookEvent ¶ added in v1.21.0
type WebhookHeaderOptions ¶ added in v1.21.0
type WebhookHeaderValues ¶ added in v1.21.0
type WebhookHeaderValues struct {
Signature string
EventID string
EventType string
WebhookID string
DeliveryID string
}
func BuildWebhookHeaderValues ¶ added in v1.21.0
func BuildWebhookHeaderValues(body []byte, event WebhookEvent, secret string, opts WebhookHeaderOptions) (WebhookHeaderValues, error)
func (WebhookHeaderValues) ApplyTo ¶ added in v1.21.0
func (h WebhookHeaderValues) ApplyTo(headers http.Header)
Source Files
¶
- addr.go
- api.go
- client.go
- client_options.go
- client_properties.go
- dialer.go
- dns_resolution.go
- ech_client.go
- gen.go
- helpers.go
- logging.go
- masque_udp_proxy.go
- net.go
- proxy_config.go
- quic_proxy.go
- quic_transport.go
- runtime.go
- runtime_unix.go
- socks5_proxy.go
- stable_domains.go
- transport.go
- tunnel.go
- tunnel_properties.go
- turn.go
- types.go
- version.go
- webhook.go
- webtty_api.go