Documentation ¶
Index ¶
- Variables
- func Join(c *conf.Config, api *APIClient, sid string) error
- func StartBroadcast(c *conf.Config, api *APIClient, cmd []string) error
- type APIClient
- func (this *APIClient) CheckVersion() error
- func (this *APIClient) GET(url string) (*http.Response, error)
- func (this *APIClient) GetSessionDetails(wsid string) (*lib.Session, error)
- func (this *APIClient) GetSessionStats(wsid string) (*lib.SessionStats, error)
- func (this *APIClient) POST(url string, contentType string, reader io.Reader) (*http.Response, error)
- func (this *APIClient) PublishSessionID(sid session.ID) error
- func (this *APIClient) RequestNewSession(login string, secrets integration.InstanceSecrets, hostPort string, ...) (*lib.Session, error)
- type App
- type HTTPClientError
Constants ¶
This section is empty.
Variables ¶
var ( DefaultSiteName = "teleconsole-client" // SyncRefreshIntervalMs defines the minimum amount of time it takes for // the local SSH server and the disposable proxy to synchronize the session // state (milliseconds) SyncRefreshInterval = time.Second )
Functions ¶
func StartBroadcast ¶
StartBroadcast starts a new SSH session exposed to the world via disposable SSH proxy.
This function:
- Generates a new SSH keypair and creates a temporary SSH server which trusts this pair.
- Sends the credentials via HTTPS to a Teleconsole server, which will create a single-use, single-tentant (just for us) SSH proxy
- Receives an ID of the server-side proxy session. That ID can be shared with other Teleconsole users so they could join this SSH session via proxy
- Launches shell. When the shell exits, the SSH session is also terminated disconnecting all parties.
Types ¶
type APIClient ¶
type APIClient struct { SessionID string Endpoint *url.URL // contains filtered or unexported fields }
APIClient is an HTTP client for talking to telecast server asking for new Teleport proxy instances
func NewAPIClient ¶
NewAPIClient creates and returns the new API client
func (*APIClient) CheckVersion ¶
Sends the version of the client to the server and receives a session cookie. Every new API conversation must start here
func (*APIClient) GetSessionDetails ¶
GetSessionDetails requests the session details (keys) for a given session from the proxy. The proxy always sends its host public key, and if the session is anonymous, it also sends single-use user keys.
If a session requres a key, a client won't receive them here, he will have to use his own from ~/.ssh
func (*APIClient) GetSessionStats ¶
func (this *APIClient) GetSessionStats(wsid string) (*lib.SessionStats, error)
func (*APIClient) RequestNewSession ¶
func (this *APIClient) RequestNewSession( login string, secrets integration.InstanceSecrets, hostPort string, fport *client.ForwardedPort) (*lib.Session, error)
RequestNewSession makes an HTTP call to a Telecast server, passing the SSH secrets of the local session.
The server will create a disposable SSH proxy pre-configured to trust this instance
type App ¶
type App struct { // CLI arguments Args []string // contains filtered or unexported fields }
func NewApp ¶
NewApp constructs and returns a "Teleconsole application object" initialized with the command line arguments, values from the configuration file, ready to run
func (*App) IsEndpointSpecified ¶
IsEndpointSpecified returns 'true' if the server endpoint has been set either via -s flag, or via a config file
type HTTPClientError ¶
type HTTPClientError struct { StatusCode int Status string Message string // contains filtered or unexported fields }
func (*HTTPClientError) Error ¶
func (this *HTTPClientError) Error() string