Documentation ¶
Index ¶
- Constants
- func AppendVarInt(b []byte, i uint64) []byte
- func AppendVarIntWithLen(b []byte, i uint64, length uint64) []byte
- func CertHasIPSANs(cert *x509.Certificate) (bool, error)
- func ConfigureLogger(logLevel string)
- func DumpCertAndKeyToFiles(cert *x509.Certificate, pubkey crypto.PublicKey, privkey crypto.PrivateKey, ...) error
- func EqualFold(s, t string) bool
- func ExpandTildeWithHomeDir(filepath string) string
- func GenerateCert(priv crypto.PrivateKey) (*x509.Certificate, error)
- func GenerateKey() (crypto.PublicKey, crypto.PrivateKey, error)
- func JWTSigningMethodFromCryptoPubkey(pubkey crypto.PublicKey) (jwt.SigningMethod, error)
- func MinUint64(a uint64, b uint64) uint64
- func ParseSSHString(buf Reader) (string, error)
- func ReadVarInt(r Reader) (uint64, error)
- func SSHStringLen(s string) int
- func Sha256Fingerprint(in []byte) string
- func VarIntLen(i uint64) uint64
- func WriteSSHString(out []byte, s string) (int, error)
- type AcceptQueue
- type BytesReadCloser
- type ChannelID
- type ChannelNotFound
- type DatagramSender
- type DatagramsQueue
- type InvalidConfig
- type InvalidSSHString
- type JWTTokenString
- type OtherHTTPError
- type Reader
- type SSH3DatagramSenderFunc
- type SSHForwardingAddressFamily
- type SSHForwardingProtocol
- type SyncMap
- type Unauthorized
- type UnknownSSHPubkeyType
- type UserNotFound
- type Writer
Constants ¶
const ( SSHProtocolUDP = SSHForwardingProtocol(0) SSHForwardingProtocolTCP = SSHForwardingProtocol(1) )
const ( SSHAFIpv4 = SSHForwardingAddressFamily(4) SSHAFIpv6 = SSHForwardingAddressFamily(6) )
const ( // Min is the minimum value allowed for a QUIC varint. Min = 0 // Max is the maximum allowed value for a QUIC varint (2^62-1). Max = maxVarInt8 )
taken from the QUIC draft
Variables ¶
This section is empty.
Functions ¶
func AppendVarInt ¶
AppendVarInt appends i in the QUIC varint format.
func AppendVarIntWithLen ¶
AppendVarIntWithLen append i in the QUIC varint format with the desired length.
func CertHasIPSANs ¶
func CertHasIPSANs(cert *x509.Certificate) (bool, error)
returns true whether the certificat contains a SubjectAltName extension with at least one IP address record
func ConfigureLogger ¶
func ConfigureLogger(logLevel string)
func DumpCertAndKeyToFiles ¶
func DumpCertAndKeyToFiles(cert *x509.Certificate, pubkey crypto.PublicKey, privkey crypto.PrivateKey, certPath, keyPath string) error
func EqualFold ¶
copied from "net/http/internal/ascii" EqualFold is strings.EqualFold, ASCII only. It reports whether s and t are equal, ASCII-case-insensitively.
func ExpandTildeWithHomeDir ¶
func GenerateCert ¶
func GenerateCert(priv crypto.PrivateKey) (*x509.Certificate, error)
func GenerateKey ¶
func GenerateKey() (crypto.PublicKey, crypto.PrivateKey, error)
func ParseSSHString ¶
func ReadVarInt ¶
ReadVarInt reads a number in the QUIC varint format from r.
func SSHStringLen ¶
func Sha256Fingerprint ¶
Types ¶
type AcceptQueue ¶
type AcceptQueue[T any] struct { // contains filtered or unexported fields }
Accept queue copied from https://github.com/quic-go/webtransport-go/blob/master/session.go
func NewAcceptQueue ¶
func NewAcceptQueue[T any]() *AcceptQueue[T]
func (*AcceptQueue[T]) Add ¶
func (q *AcceptQueue[T]) Add(str T)
func (*AcceptQueue[T]) Chan ¶
func (q *AcceptQueue[T]) Chan() <-chan struct{}
func (*AcceptQueue[T]) Next ¶
func (q *AcceptQueue[T]) Next() T
type BytesReadCloser ¶
func (*BytesReadCloser) Close ¶
func (b *BytesReadCloser) Close() error
type ChannelNotFound ¶
type ChannelNotFound struct {
ChannelID ChannelID
}
func (ChannelNotFound) Error ¶
func (e ChannelNotFound) Error() string
type DatagramSender ¶
type DatagramsQueue ¶
type DatagramsQueue struct {
// contains filtered or unexported fields
}
func NewDatagramsQueue ¶
func NewDatagramsQueue(len uint64) *DatagramsQueue
func (*DatagramsQueue) Add ¶
func (q *DatagramsQueue) Add(datagram []byte) bool
returns true if added, false otherwise
func (*DatagramsQueue) Next ¶
func (q *DatagramsQueue) Next() []byte
type InvalidConfig ¶
func (InvalidConfig) Error ¶
func (e InvalidConfig) Error() string
type InvalidSSHString ¶
type InvalidSSHString struct {
Reason error
}
func (InvalidSSHString) Error ¶
func (e InvalidSSHString) Error() string
type JWTTokenString ¶
type JWTTokenString struct {
Token string
}
a JWT bearer token, encoded following the JWT specification
type OtherHTTPError ¶
func (OtherHTTPError) Error ¶
func (e OtherHTTPError) Error() string
type Reader ¶
type Reader interface { io.ByteReader io.Reader }
Reader implements both the io.ByteReader and io.Reader interfaces.
type SSH3DatagramSenderFunc ¶
sends an ssh3 datagram. The function must know the ID of the channel
type SSHForwardingAddressFamily ¶
type SSHForwardingAddressFamily = uint64
type SSHForwardingProtocol ¶
type SSHForwardingProtocol = uint64
type SyncMap ¶
type SyncMap[K comparable, V any] struct { // contains filtered or unexported fields }
func NewSyncMap ¶
func NewSyncMap[K comparable, V any]() SyncMap[K, V]
type Unauthorized ¶
type Unauthorized struct{}
func (Unauthorized) Error ¶
func (e Unauthorized) Error() string
type UnknownSSHPubkeyType ¶
type UnknownSSHPubkeyType struct {
// contains filtered or unexported fields
}
func (UnknownSSHPubkeyType) Error ¶
func (m UnknownSSHPubkeyType) Error() string
type UserNotFound ¶
type UserNotFound struct {
Username string
}
func (UserNotFound) Error ¶
func (e UserNotFound) Error() string