detection

package
v0.83.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: BSD-3-Clause Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	// ServerIdentifier is the base response for NetBird SSH servers
	ServerIdentifier = "NetBird-SSH-Server"
	// ProxyIdentifier is the base response for NetBird SSH proxy
	ProxyIdentifier = "NetBird-SSH-Proxy"
	// JWTRequiredMarker is appended to responses when JWT is required
	JWTRequiredMarker = "NetBird-JWT-Required"

	// DefaultTimeout is the default timeout for SSH server detection
	DefaultTimeout = 5 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Dialer

type Dialer interface {
	DialContext(ctx context.Context, network, address string) (net.Conn, error)
}

Dialer provides network connection capabilities

type ServerType

type ServerType string
const (
	ServerTypeNetBirdJWT   ServerType = "netbird-jwt"
	ServerTypeNetBirdNoJWT ServerType = "netbird-no-jwt"
	ServerTypeRegular      ServerType = "regular"
)

func DetectSSHServerType

func DetectSSHServerType(ctx context.Context, dialer Dialer, host string, port int) (ServerType, error)

DetectSSHServerType detects SSH server type using the provided dialer

func (ServerType) ExitCode

func (s ServerType) ExitCode() int

ExitCode returns the exit code for the detect command

func (ServerType) RequiresJWT

func (s ServerType) RequiresJWT() bool

RequiresJWT checks if the server type requires JWT authentication

Jump to

Keyboard shortcuts

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