Documentation
¶
Index ¶
- func ProxyConnection(client net.Conn, remote net.Conn)
- func Serve(logger *zap.Logger, l net.Listener, hostname string, port int, ...) error
- func TunnelHost() string
- type Border0API
- type E2EEncryptionConn
- type E2EEncryptionMetadata
- type PermanentError
- type Socket
- func (s *Socket) Accept() (net.Conn, error)
- func (s *Socket) Addr() net.Addr
- func (s *Socket) Close() error
- func (s *Socket) GetContext() context.Context
- func (s *Socket) IsClosed() bool
- func (s *Socket) Listen() (net.Listener, error)
- func (s *Socket) WithCertificate(certificate *tls.Certificate)
- func (s *Socket) WithProxy(proxyHost string) error
- func (s *Socket) WithVersion(version string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TunnelHost ¶
func TunnelHost() string
Types ¶
type Border0API ¶
type Border0API interface {
GetUserID() (string, error)
SignSSHKey(ctx context.Context, socketID string, publicKey []byte) (string, string, error)
Evaluate(ctx context.Context, socket *models.Socket, clientIP, userEmail, sessionKey string) ([]any, map[string][]string, error)
UpdateSession(updates models.SessionUpdate) error
SignSshOrgCertificate(ctx context.Context, socketID, sessionID, userEmail string, ticket []byte, publicKey []byte) ([]byte, error)
UploadRecording(content []byte, socketID, sessionKey, recordingID string) error
}
type E2EEncryptionConn ¶
type E2EEncryptionConn struct {
*tls.Conn
Metadata *E2EEncryptionMetadata
}
type E2EEncryptionMetadata ¶
type PermanentError ¶
type PermanentError struct {
Message string
}
func (PermanentError) Error ¶
func (e PermanentError) Error() string
type Socket ¶
type Socket struct {
SocketID string
SocketType string
UpstreamType string
UpstreamUsername string
ConnectorAuthenticationEnabled bool
EndToEndEncryptionEnabled bool
ConnectorAuthenticationTLSConfig *tls.Config
Organization *models.Organization
Socket *models.Socket
RecordingEnabled bool
ConfigHash string
// contains filtered or unexported fields
}
func NewSocketFromConnectorAPI ¶
func NewSocketFromConnectorAPI(ctx context.Context, border0API Border0API, socket models.Socket, org *models.Organization, logger *zap.Logger, certificate *tls.Certificate) (*Socket, error)
func (*Socket) GetContext ¶
func (*Socket) WithCertificate ¶
func (s *Socket) WithCertificate(certificate *tls.Certificate)
func (*Socket) WithVersion ¶
Click to show internal directories.
Click to hide internal directories.