Documentation ¶
Index ¶
- func NewChainInterceptor(interceptor ...proxy.Interceptor) proxy.Interceptor
- func NewSSHServer(bind string, handler http.Handler, opts ...sshServerOption) (*sshServer, error)
- func WithAuthHandler(auth AuthHandler) sshServerOption
- func WithAuthorizedKeysAuth(fn string) sshServerOption
- func WithGithubAuth() sshServerOption
- func WithHostKeyFile(fn string) sshServerOption
- func WithRemoteAuth(url string) sshServerOption
- type AuthHandler
- type ChainInterceptor
- type Config
- type InfoInterceptor
- type ReadOnlyInterceptor
- type RulesInterceptor
- type Server
- type StdioAddr
- type StdioConn
- func (sc *StdioConn) Close() error
- func (sc *StdioConn) CloseRead() error
- func (sc *StdioConn) CloseWrite() error
- func (sc *StdioConn) LocalAddr() net.Addr
- func (sc *StdioConn) Read(b []byte) (int, error)
- func (sc *StdioConn) RemoteAddr() net.Addr
- func (sc *StdioConn) SetDeadline(t time.Time) error
- func (sc *StdioConn) SetReadDeadline(t time.Time) error
- func (sc *StdioConn) SetWriteDeadline(t time.Time) error
- func (sc *StdioConn) String() string
- func (sc *StdioConn) Write(b []byte) (int, error)
- type StdioListener
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewChainInterceptor ¶
func NewChainInterceptor(interceptor ...proxy.Interceptor) proxy.Interceptor
NewChainInterceptor returns a new instance of the ChainInterceptor with the provided interceptors.
func NewSSHServer ¶
func WithAuthHandler ¶
func WithAuthHandler(auth AuthHandler) sshServerOption
func WithAuthorizedKeysAuth ¶
func WithAuthorizedKeysAuth(fn string) sshServerOption
func WithGithubAuth ¶
func WithGithubAuth() sshServerOption
func WithHostKeyFile ¶
func WithHostKeyFile(fn string) sshServerOption
func WithRemoteAuth ¶
func WithRemoteAuth(url string) sshServerOption
Types ¶
type AuthHandler ¶
type AuthHandler ssh.PublicKeyHandler
func AuthorizedKeysAuthHandler ¶
func AuthorizedKeysAuthHandler(keys []ssh.PublicKey) AuthHandler
func MultiAuthHandler ¶
func MultiAuthHandler(authz ...AuthHandler) AuthHandler
func NoAuthHandler ¶
func NoAuthHandler() AuthHandler
func RemoteAuthHandler ¶
func RemoteAuthHandler(url string) AuthHandler
type ChainInterceptor ¶
type ChainInterceptor struct {
Interceptors []proxy.Interceptor
}
ChainInterceptor is an interceptor that chains multiple interceptors together returning the first non-nil implementation. If all interceptors are exhausted, then the upstream is returned.
type Config ¶
type Config struct { Debug bool HttpAddr string SshAddr string DockerURL string TLSCACert string TLSCert string TLSKey string AllowInsecure bool }
Config ...
type InfoInterceptor ¶
type ReadOnlyInterceptor ¶
type ReadOnlyInterceptor struct{}
type RulesInterceptor ¶
type StdioAddr ¶
type StdioAddr struct {
// contains filtered or unexported fields
}
StdioAddr implements net.Addr to provide an emulated network address for use with StdioConn.
type StdioConn ¶
StdioConn implements net.Conn to provide an emulated network connection between two processes over stdin/stdout.
func NewStdioConn ¶
func NewStdioConn(localID, remoteID string, in io.ReadCloser, out io.WriteCloser) *StdioConn
func (*StdioConn) CloseWrite ¶
func (*StdioConn) RemoteAddr ¶
func (*StdioConn) SetDeadline ¶
SetDeadline sets the read/write deadline.
func (*StdioConn) SetReadDeadline ¶
SetReadDeadline sets the read/write deadline.
func (*StdioConn) SetWriteDeadline ¶
SetWriteDeadline sets the read/write deadline.
type StdioListener ¶
type StdioListener struct {
// contains filtered or unexported fields
}
StdioListener wraps a *StdioConn to implement net.Listener.
func NewStdioListener ¶
func NewStdioListener(conn *StdioConn) *StdioListener
func (*StdioListener) Addr ¶
func (sl *StdioListener) Addr() net.Addr
func (*StdioListener) Close ¶
func (sl *StdioListener) Close() error