Versions in this module Expand all Collapse all v0 v0.9.9 Dec 20, 2024 Changes in this version + const DcMaxIdx + var DcIp4 = maplist.MapList[int16, string] + var DcIp6 = maplist.MapList[int16, string] + var ErrInvalidDigestError = errors.New("invalid client digest") + func GetDcAddr(dc int16) (ipv4, ipv6 string, err error) + type ErrInvalidProtocol struct + func (ip ErrInvalidProtocol) Error() string + type ErrInvalidProtocolFields struct + func (ipf ErrInvalidProtocolFields) Error() string + type ErrSecretLength struct + func (e ErrSecretLength) Error() string v0.9.8 Aug 21, 2024 Changes in this version + const Abridged + const AddTagLength + const FakeTlsHandshakeLen + const FlagAbbridged + const FlagExtNode2 + const FlagHasAdTag + const FlagIntermediate + const FlagMagic + const FlagNotEncrypted + const FlagPad + const FlagQuickAck + const Full + const Intermediate + const MaxPayloadSize + const MiddleConfigIp4 + const MiddleConfigIp6 + const MiddleSecretUrl + const NonceSize + const Padded + const RpcNonceLen + var ExtraSize = [4]byte + var FakeTlsHeader = [...]byte + var PaddingFiller = [4]byte + var ProxyTag = [4]byte + var RpcCloseExtTag = [4]byte + var RpcCryptoAesTag = [4]byte + var RpcHandShakeTag = [4]byte + var RpcNonceTag = [4]byte + var RpcProxyAnsTag = [4]byte + var RpcProxyReqTag = [4]byte + var RpcSimpleAckTag = [4]byte + var RpcUnknown = [4]byte + var WrongNonceStarters = [...][]byte + func IsWrongNonce(nonce Nonce) bool + type DcCtx struct + Nonce Nonce + Protocol uint8 + func DcCtxNew(dc int16, protocol byte) (c *DcCtx) + func (c *DcCtx) DecryptNext(buf []byte) + func (c *DcCtx) EncryptNext(buf []byte) + type FakeTlsCtx struct + Digest [32]byte + Header FakeTlsHandshake + Secret *Secret + Timestamp uint32 + func FakeTlsCtxFromTlsHeader(header FakeTlsHandshake, secret *Secret) (c *FakeTlsCtx, err error) + type FakeTlsHandshake = [FakeTlsHandshakeLen]byte + type MiddleCtx struct + AdTag []byte + CliNonce RpcNonce + MP netip.AddrPort + Obf *MpCtx + Out netip.AddrPort + func NewMiddleCtx(ipOut netip.AddrPort, ipMP netip.AddrPort, adTag []byte) (m *MiddleCtx) + func (m *MiddleCtx) BlockSize() int + func (m *MiddleCtx) DecryptBlock(buf []byte) + func (m *MiddleCtx) EncryptBlock(buf []byte) + func (m *MiddleCtx) SetObf(MpNonce, CliTimestamp, MpSecret []byte) + type MpCtx struct + func (m *MpCtx) BlockSize() int + func (m *MpCtx) DecryptBlocks(buf []byte) + func (m *MpCtx) EncryptBlocks(buf []byte) + type Nonce [NonceSize]byte + type ObfCtx struct + Dc int16 + Nonce Nonce + Protocol uint8 + Random [2]byte + Secret *Secret + func ObfCtxFromNonce(header Nonce, secret *Secret) (c *ObfCtx, err error) + func (c *ObfCtx) DecryptNext(buf []byte) + func (c *ObfCtx) EncryptNext(buf []byte) + type Obfuscator interface + DecryptNext func(buf []byte) + EncryptNext func(buf []byte) + type RpcNonce [RpcNonceLen]byte + type Secret struct + Fakehost string + RawSecret []byte + Tag byte + Type SecretType + func NewSecret(secret []byte) (*Secret, error) + func NewSecretHex(secret string) (*Secret, error) + type SecretType int + const FakeTLS + const Secured + const Simple