Documentation
¶
Index ¶
- Variables
- func Start(opt Opt) error
- type AuthRequest
- func (*AuthRequest) Descriptor() ([]byte, []int)deprecated
- func (x *AuthRequest) GetAuthorizedKey() []byte
- func (x *AuthRequest) GetClientVersion() string
- func (x *AuthRequest) GetRemoteAddr() string
- func (*AuthRequest) ProtoMessage()
- func (x *AuthRequest) ProtoReflect() protoreflect.Message
- func (x *AuthRequest) Reset()
- func (x *AuthRequest) String() string
- type CreateSessionRequest
- func (*CreateSessionRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateSessionRequest) GetClientAuthorizedKeys() [][]byte
- func (x *CreateSessionRequest) GetHostPublicKeys() [][]byte
- func (x *CreateSessionRequest) GetHostUser() string
- func (*CreateSessionRequest) ProtoMessage()
- func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message
- func (x *CreateSessionRequest) Reset()
- func (x *CreateSessionRequest) String() string
- type CreateSessionResponse
- func (*CreateSessionResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateSessionResponse) GetNodeAddr() string
- func (x *CreateSessionResponse) GetSessionID() string
- func (*CreateSessionResponse) ProtoMessage()
- func (x *CreateSessionResponse) ProtoReflect() protoreflect.Message
- func (x *CreateSessionResponse) Reset()
- func (x *CreateSessionResponse) String() string
- type HostCertSigner
- type MemoryProvider
- type NetworkOptions
- type NetworkProvider
- type Opt
- type SSHDDialListener
- type SSHRouting
- type Server
- type ServerInfo
- type SessionDialListener
- type UnixProvider
- type UserCertChecker
- type UserCertSigner
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrListnerClosed = errors.New("routing: listener closed")
)
View Source
var File_server_proto protoreflect.FileDescriptor
Functions ¶
Types ¶
type AuthRequest ¶
type AuthRequest struct { ClientVersion string `protobuf:"bytes,1,opt,name=client_version,json=clientVersion,proto3" json:"client_version,omitempty"` RemoteAddr string `protobuf:"bytes,2,opt,name=remote_addr,json=remoteAddr,proto3" json:"remote_addr,omitempty"` AuthorizedKey []byte `protobuf:"bytes,3,opt,name=authorized_key,json=authorizedKey,proto3" json:"authorized_key,omitempty"` // contains filtered or unexported fields }
func (*AuthRequest) Descriptor
deprecated
func (*AuthRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthRequest.ProtoReflect.Descriptor instead.
func (*AuthRequest) GetAuthorizedKey ¶
func (x *AuthRequest) GetAuthorizedKey() []byte
func (*AuthRequest) GetClientVersion ¶
func (x *AuthRequest) GetClientVersion() string
func (*AuthRequest) GetRemoteAddr ¶
func (x *AuthRequest) GetRemoteAddr() string
func (*AuthRequest) ProtoMessage ¶
func (*AuthRequest) ProtoMessage()
func (*AuthRequest) ProtoReflect ¶ added in v0.5.0
func (x *AuthRequest) ProtoReflect() protoreflect.Message
func (*AuthRequest) Reset ¶
func (x *AuthRequest) Reset()
func (*AuthRequest) String ¶
func (x *AuthRequest) String() string
type CreateSessionRequest ¶
type CreateSessionRequest struct { HostUser string `protobuf:"bytes,1,opt,name=hostUser,proto3" json:"hostUser,omitempty"` HostPublicKeys [][]byte `protobuf:"bytes,2,rep,name=hostPublicKeys,proto3" json:"hostPublicKeys,omitempty"` ClientAuthorizedKeys [][]byte `protobuf:"bytes,3,rep,name=clientAuthorizedKeys,proto3" json:"clientAuthorizedKeys,omitempty"` // contains filtered or unexported fields }
func (*CreateSessionRequest) Descriptor
deprecated
func (*CreateSessionRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateSessionRequest.ProtoReflect.Descriptor instead.
func (*CreateSessionRequest) GetClientAuthorizedKeys ¶
func (x *CreateSessionRequest) GetClientAuthorizedKeys() [][]byte
func (*CreateSessionRequest) GetHostPublicKeys ¶
func (x *CreateSessionRequest) GetHostPublicKeys() [][]byte
func (*CreateSessionRequest) GetHostUser ¶
func (x *CreateSessionRequest) GetHostUser() string
func (*CreateSessionRequest) ProtoMessage ¶
func (*CreateSessionRequest) ProtoMessage()
func (*CreateSessionRequest) ProtoReflect ¶ added in v0.5.0
func (x *CreateSessionRequest) ProtoReflect() protoreflect.Message
func (*CreateSessionRequest) Reset ¶
func (x *CreateSessionRequest) Reset()
func (*CreateSessionRequest) String ¶
func (x *CreateSessionRequest) String() string
type CreateSessionResponse ¶
type CreateSessionResponse struct { SessionID string `protobuf:"bytes,1,opt,name=sessionID,proto3" json:"sessionID,omitempty"` NodeAddr string `protobuf:"bytes,2,opt,name=nodeAddr,proto3" json:"nodeAddr,omitempty"` // contains filtered or unexported fields }
func (*CreateSessionResponse) Descriptor
deprecated
func (*CreateSessionResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateSessionResponse.ProtoReflect.Descriptor instead.
func (*CreateSessionResponse) GetNodeAddr ¶
func (x *CreateSessionResponse) GetNodeAddr() string
func (*CreateSessionResponse) GetSessionID ¶
func (x *CreateSessionResponse) GetSessionID() string
func (*CreateSessionResponse) ProtoMessage ¶
func (*CreateSessionResponse) ProtoMessage()
func (*CreateSessionResponse) ProtoReflect ¶ added in v0.5.0
func (x *CreateSessionResponse) ProtoReflect() protoreflect.Message
func (*CreateSessionResponse) Reset ¶
func (x *CreateSessionResponse) Reset()
func (*CreateSessionResponse) String ¶
func (x *CreateSessionResponse) String() string
type HostCertSigner ¶ added in v0.5.0
type HostCertSigner struct {
Hostnames []string
}
type MemoryProvider ¶
type MemoryProvider struct { SocketPath string // contains filtered or unexported fields }
func (*MemoryProvider) Name ¶
func (p *MemoryProvider) Name() string
func (*MemoryProvider) Opts ¶
func (p *MemoryProvider) Opts() string
func (*MemoryProvider) SSHD ¶
func (p *MemoryProvider) SSHD() SSHDDialListener
func (*MemoryProvider) Session ¶
func (p *MemoryProvider) Session() SessionDialListener
func (*MemoryProvider) SetOpts ¶
func (p *MemoryProvider) SetOpts(opts NetworkOptions) error
type NetworkOptions ¶
type NetworkProvider ¶
type NetworkProvider interface { SetOpts(opts NetworkOptions) error Session() SessionDialListener SSHD() SSHDDialListener Name() string Opts() string }
type SSHDDialListener ¶
type SSHRouting ¶
type SSHRouting struct { HostSigners []ssh.Signer AuthPiper *authPiper Logger log.FieldLogger MetricsProvider provider.Provider // contains filtered or unexported fields }
func (*SSHRouting) Shutdown ¶
func (p *SSHRouting) Shutdown() error
type Server ¶
type Server struct { NodeAddr string HostSigners []ssh.Signer Signers []ssh.Signer NetworkProvider NetworkProvider MetricsProvider provider.Provider Logger log.FieldLogger // contains filtered or unexported fields }
func (*Server) ServeWithContext ¶
type ServerInfo ¶
type ServerInfo struct {
NodeAddr string
}
type SessionDialListener ¶
type UnixProvider ¶
type UnixProvider struct {
// contains filtered or unexported fields
}
func (*UnixProvider) Name ¶
func (p *UnixProvider) Name() string
func (*UnixProvider) Opts ¶
func (p *UnixProvider) Opts() string
func (*UnixProvider) SSHD ¶
func (p *UnixProvider) SSHD() SSHDDialListener
func (*UnixProvider) Session ¶
func (p *UnixProvider) Session() SessionDialListener
func (*UnixProvider) SetOpts ¶
func (p *UnixProvider) SetOpts(opts NetworkOptions) error
type UserCertChecker ¶ added in v0.5.0
type UserCertChecker struct {
UserKeyFallback func(user string, key ssh.PublicKey) (ssh.PublicKey, error)
}
func (*UserCertChecker) Authenticate ¶ added in v0.5.0
func (c *UserCertChecker) Authenticate(user string, key ssh.PublicKey) (*AuthRequest, ssh.PublicKey, error)
Authenticate tries to pass auth request and public key from a cert. If the public key is not a cert, it calls the UserKeyFallback func. Otherwise it returns an error.
type UserCertSigner ¶ added in v0.5.0
type UserCertSigner struct { SessionID string User string AuthRequest *AuthRequest }
Click to show internal directories.
Click to hide internal directories.