Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

agentssh

package
v0.27.3Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License:AGPL-3.0Imports:32Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

View Source
const (// MagicSessionErrorCode indicates that something went wrong with the session, rather than the// command just returning a nonzero exit code, and is chosen as an arbitrary, high number// unlikely to shadow other exit codes, which are typically 1, 2, 3, etc.MagicSessionErrorCode = 229// MagicSessionTypeEnvironmentVariable is used to track the purpose behind an SSH connection.// This is stripped from any commands being executed, and is counted towards connection stats.MagicSessionTypeEnvironmentVariable = "CODER_SSH_SESSION_TYPE"// MagicSessionTypeVSCode is set in the SSH config by the VS Code extension to identify itself.MagicSessionTypeVSCode = "vscode"// MagicSessionTypeJetBrains is set in the SSH config by the JetBrains extension to identify itself.MagicSessionTypeJetBrains = "jetbrains")

Variables

This section is empty.

Functions

funcBicopy

func Bicopy(ctxcontext.Context, c1, c2io.ReadWriteCloser)

Bicopy copies all of the data between the two connections and will close themafter one or both of them are done writing. If the context is canceled, bothof the connections will be closed.

Types

typeConnStats

type ConnStats struct {Sessionsint64VSCodeint64JetBrainsint64}

typeServer

type Server struct {Env           map[string]stringAgentToken    func()stringManifest      *atomic.Pointer[agentsdk.Manifest]ServiceBanner *atomic.Pointer[codersdk.ServiceBannerConfig]// contains filtered or unexported fields}

funcNewServer

func NewServer(ctxcontext.Context, loggerslog.Logger, prometheusRegistry *prometheus.Registry, fsafero.Fs, maxTimeouttime.Duration, x11SocketDirstring) (*Server,error)

func (*Server)Close

func (s *Server) Close()error

Close the server and all active connections. Server can be re-usedafter Close is done.

func (*Server)ConnStats

func (s *Server) ConnStats()ConnStats

func (*Server)CreateCommand

func (s *Server) CreateCommand(ctxcontext.Context, scriptstring, env []string) (*pty.Cmd,error)

CreateCommand processes raw command input with OpenSSH-like behavior.If the script provided is empty, it will default to the users shell.This injects environment variables specified by the user at launch too.

func (*Server)Serve

func (s *Server) Serve(lnet.Listener) (retErrerror)

func (*Server)Shutdown

func (*Server) Shutdown(_context.Context)error

Shutdown gracefully closes all active SSH connections and stopsaccepting new connections.

Shutdown is not implemented.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp