obfuscated

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginDC added in v0.6.0

func LoginDC(sock io.ReadWriteCloser, protocol uint8) (io.ReadWriteCloser, error)

func NewSimpleStream added in v0.6.0

func NewSimpleStream(client io.ReadWriteCloser, ctx *tgcrypt.SimpleClientCtx) *encDecStream

func ObfuscateDC added in v0.6.0

func ObfuscateDC(sock io.ReadWriteCloser, ctx *tgcrypt.DcCtx) (*encDecStream, error)

Types

type DCConnector

type DCConnector interface {
	// Connect to the specified DC by it's number (may be negative)
	ConnectDC(dc int16) (c io.ReadWriteCloser, err error)
	// Connects to specific host (for fallback connections)
	ConnectHost(host string) (c net.Conn, err error)
}

Connects client to the specified DC or fallback host

type DcDirectConnector

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

Directly connects client

func NewDcDirectConnector

func NewDcDirectConnector(allowIPv6 bool) *DcDirectConnector

creates a new DcDirectConnector

func (*DcDirectConnector) ConnectDC

func (dcc *DcDirectConnector) ConnectDC(dc int16) (stream io.ReadWriteCloser, err error)

Connects client to the specified DC directly

func (*DcDirectConnector) ConnectHost

func (dcc *DcDirectConnector) ConnectHost(host string) (net.Conn, error)

type DcSocksConnector

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

Connects client over SOCKS5 proxy

func NewDcSocksConnector

func NewDcSocksConnector(allowIPv6 bool, socks5 string, user, pass *string) *DcSocksConnector

Create a new DcSocksConnector

func (*DcSocksConnector) ConnectDC

func (dsc *DcSocksConnector) ConnectDC(dc int16) (io.ReadWriteCloser, error)

connect to the specified DC over socks5

func (*DcSocksConnector) ConnectHost

func (dsc *DcSocksConnector) ConnectHost(host string) (net.Conn, error)

type ObfuscatedHandler

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

func NewObfuscatedHandler

func NewObfuscatedHandler(cfg *config.Config, client net.Conn) *ObfuscatedHandler

func (*ObfuscatedHandler) HandleObfuscated

func (o *ObfuscatedHandler) HandleObfuscated() (err error)

Jump to

Keyboard shortcuts

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