obfuscated

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 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) *rawStream

func ObfuscateDC added in v0.6.0

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

Types

type ClientHandler added in v0.7.1

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

func NewClient added in v0.7.1

func NewClient(cfg *config.Config, client net.Conn) *ClientHandler

func (*ClientHandler) HandleClient added in v0.7.1

func (o *ClientHandler) HandleClient() (err error)

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)

Jump to

Keyboard shortcuts

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