Versions in this module Expand all Collapse all v1 v1.0.1 Dec 12, 2024 Changes in this version + const HISTORY_CLIENT_IP_MAX_ENTRIES + const HISTORY_CLIENT_IP_TTL + const HISTORY_SEED_MAX_ENTRIES + const HISTORY_SEED_TTL + const OBFUSCATE_CLIENT_TO_SERVER_IV + const OBFUSCATE_HASH_ITERATIONS + const OBFUSCATE_KEY_LENGTH + const OBFUSCATE_MAGIC_VALUE + const OBFUSCATE_MAX_PADDING + const OBFUSCATE_SEED_LENGTH + const OBFUSCATE_SERVER_TO_CLIENT_IV + const OBFUSCATION_CONN_MODE_CLIENT + const OBFUSCATION_CONN_MODE_SERVER + const OBFUSCATION_READ_STATE_CLIENT_READ_PREFIX + const OBFUSCATION_READ_STATE_FINISHED + const OBFUSCATION_READ_STATE_FLUSH + const OBFUSCATION_READ_STATE_IDENTIFICATION_LINES + const OBFUSCATION_READ_STATE_KEX_PACKETS + const OBFUSCATION_WRITE_STATE_CLIENT_SEND_PREAMBLE + const OBFUSCATION_WRITE_STATE_FINISHED + const OBFUSCATION_WRITE_STATE_IDENTIFICATION_LINE + const OBFUSCATION_WRITE_STATE_KEX_PACKETS + const OBFUSCATION_WRITE_STATE_SERVER_SEND_PREFIX_AND_IDENTIFICATION_LINE_PADDING + const PREAMBLE_HEADER_LENGTH + const PREFIX_MAX_HEADER_LENGTH + const PREFIX_MAX_LENGTH + const PREFIX_TERMINATOR_LENGTH + const PREFIX_TERM_SEARCH_BUF_SIZE + const SSH_MAX_PACKET_LENGTH + const SSH_MAX_PADDING_LENGTH + const SSH_MAX_SERVER_LINE_LENGTH + const SSH_MSG_NEWKEYS + const SSH_PACKET_PREFIX_LENGTH + const SSH_PADDING_MULTIPLE + const TLS_PASSTHROUGH_HISTORY_TTL + const TLS_PASSTHROUGH_KEY_SIZE + const TLS_PASSTHROUGH_MESSAGE_SIZE + const TLS_PASSTHROUGH_NONCE_SIZE + const TLS_PASSTHROUGH_TIME_PERIOD + func MakeTLSPassthroughMessage(useTimeFactor bool, obfuscatedKey string) ([]byte, error) + func VerifyTLSPassthroughMessage(useTimeFactor bool, obfuscatedKey string, message []byte) bool + func WrapConnWithSkipReader(conn net.Conn) net.Conn + type OSSHPrefixHeader struct + SpecName string + type OSSHPrefixSpec struct + Name string + Seed *prng.Seed + Spec transforms.Spec + type OSSHPrefixSplitConfig struct + MaxDelay time.Duration + MinDelay time.Duration + Seed *prng.Seed + type ObfuscatedSSHConn struct + func NewClientObfuscatedSSHConn(conn net.Conn, obfuscationKeyword string, ...) (*ObfuscatedSSHConn, error) + func NewObfuscatedSSHConn(mode ObfuscatedSSHConnMode, conn net.Conn, obfuscationKeyword string, ...) (*ObfuscatedSSHConn, error) + func NewServerObfuscatedSSHConn(conn net.Conn, obfuscationKeyword string, seedHistory *SeedHistory, ...) (*ObfuscatedSSHConn, error) + func (conn *ObfuscatedSSHConn) Close() error + func (conn *ObfuscatedSSHConn) GetDerivedPRNG(salt string) (*prng.PRNG, error) + func (conn *ObfuscatedSSHConn) GetMetrics() common.LogFields + func (conn *ObfuscatedSSHConn) IsOSSHPrefixStream() bool + func (conn *ObfuscatedSSHConn) Read(buffer []byte) (int, error) + func (conn *ObfuscatedSSHConn) SetOSSHPrefixSplitConfig(minDelay, maxDelay time.Duration) error + func (conn *ObfuscatedSSHConn) Write(buffer []byte) (int, error) + type ObfuscatedSSHConnMode int + type ObfuscatedSSHReadState int + type ObfuscatedSSHWriteState int + type Obfuscator struct + func NewClientObfuscator(config *ObfuscatorConfig) (obfuscator *Obfuscator, err error) + func NewServerObfuscator(config *ObfuscatorConfig, clientIP string, clientReader io.Reader) (obfuscator *Obfuscator, err error) + func (obfuscator *Obfuscator) GetDerivedPRNG(salt string) (*prng.PRNG, error) + func (obfuscator *Obfuscator) GetDerivedPRNGSeed(salt string) (*prng.Seed, error) + func (obfuscator *Obfuscator) GetPaddingLength() int + func (obfuscator *Obfuscator) ObfuscateClientToServer(buffer []byte) + func (obfuscator *Obfuscator) ObfuscateServerToClient(buffer []byte) + func (obfuscator *Obfuscator) SendPreamble() ([]byte, int) + type ObfuscatorConfig struct + ClientPrefixSpec *OSSHPrefixSpec + DisableStrictHistoryMode bool + IrregularLogger func(clientIP string, err error, logFields common.LogFields) + IsOSSH bool + Keyword string + MaxPadding *int + MinPadding *int + OSSHPrefixSplitConfig *OSSHPrefixSplitConfig + ObfuscatorSeedTransformerParameters *transforms.ObfuscatorSeedTransformerParameters + PaddingPRNGSeed *prng.Seed + SeedHistory *SeedHistory + ServerPrefixSpecs transforms.Specs + type SeedHistory struct + func NewSeedHistory(config *SeedHistoryConfig) *SeedHistory + func (h *SeedHistory) AddNew(strictMode bool, clientIP string, seedType string, seed []byte) (bool, *common.LogFields) + func (h *SeedHistory) AddNewWithTTL(strictMode bool, clientIP string, seedType string, seed []byte, ...) (bool, *common.LogFields) + type SeedHistoryConfig struct + ClientIPMaxEntries int + ClientIPTTL time.Duration + SeedMaxEntries int + SeedTTL time.Duration + type SkipReader struct + func (sr *SkipReader) Read(b []byte) (int, error) + func (sr *SkipReader) SkipUpToToken(token []byte, readSize, maxSearchSize int) error