server

package
v0.0.0-...-07b4fab Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FtpServer

type FtpServer struct {
	// contains filtered or unexported fields
}

func NewFtpServer

func NewFtpServer(cfg config.Ftp, handler *Handler) *FtpServer

func (*FtpServer) AuthUser

func (s *FtpServer) AuthUser(cc ftpserver.ClientContext, user, pass string) (ftpserver.ClientDriver, error)

func (*FtpServer) ClientConnected

func (s *FtpServer) ClientConnected(cc ftpserver.ClientContext) (string, error)

func (*FtpServer) ClientDisconnected

func (s *FtpServer) ClientDisconnected(cc ftpserver.ClientContext)

func (*FtpServer) Enabled

func (s *FtpServer) Enabled() bool

func (*FtpServer) GetSettings

func (s *FtpServer) GetSettings() (*ftpserver.Settings, error)

func (*FtpServer) GetTLSConfig

func (s *FtpServer) GetTLSConfig() (*tls.Config, error)

func (*FtpServer) Shutdown

func (s *FtpServer) Shutdown(ctx context.Context) error

func (*FtpServer) Startup

func (s *FtpServer) Startup(ctx context.Context, cancel context.CancelFunc)

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(ctx context.Context, db *model.Database, ipgeoQuerier ipgeo.Querier, abuseipdbClient *abuseipdb.Client) *Handler

func (*Handler) Handle

func (h *Handler) Handle(ctx context.Context, request *Request)

type HttpServer

type HttpServer struct {
	// contains filtered or unexported fields
}

func NewHttpServer

func NewHttpServer(cfg config.Http, handler *Handler, dashboardServer *dashboard.Server) *HttpServer

func (*HttpServer) Enabled

func (s *HttpServer) Enabled() bool

func (*HttpServer) ServeHTTP

func (s *HttpServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

func (*HttpServer) Shutdown

func (s *HttpServer) Shutdown(ctx context.Context) error

func (*HttpServer) Startup

func (s *HttpServer) Startup(ctx context.Context, cancel context.CancelFunc)

type Request

type Request struct {
	Kind          model.BruteAttemptKind
	Time          time.Time
	Ip            string
	User          string
	Password      string
	SessionId     string
	ClientVersion string
}

func (Request) ShortSessionId

func (r Request) ShortSessionId() string

type Server

type Server interface {
	Startup(ctx context.Context, cancel context.CancelFunc)
	Shutdown(ctx context.Context) error
}

type SshServer

type SshServer struct {
	// contains filtered or unexported fields
}

func NewSshServer

func NewSshServer(cfg config.Ssh, handler *Handler) (*SshServer, error)

func (*SshServer) Shutdown

func (s *SshServer) Shutdown(ctx context.Context) error

func (*SshServer) Startup

func (s *SshServer) Startup(ctx context.Context, cancel context.CancelFunc)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL