mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-01 08:44:01 +03:00
Add required things for middlehandshake
This commit is contained in:
@@ -10,9 +10,7 @@ import (
|
||||
"github.com/9seconds/mtg/wrappers"
|
||||
)
|
||||
|
||||
type TelegramProtocol struct{}
|
||||
|
||||
func (t *TelegramProtocol) Handshake(req *protocol.TelegramRequest) (wrappers.Wrap, error) {
|
||||
func TelegramProtocol(req *protocol.TelegramRequest) (wrappers.Wrap, error) {
|
||||
socket, err := telegram.Direct.Dial(req.Ctx,
|
||||
req.Cancel,
|
||||
req.ClientProtocol.DC(),
|
||||
@@ -39,10 +37,6 @@ func (t *TelegramProtocol) Handshake(req *protocol.TelegramRequest) (wrappers.Wr
|
||||
return wrappers.NewObfuscated2(socket, encryptor, decryptor), nil
|
||||
}
|
||||
|
||||
func MakeTelegramProtocol() protocol.TelegramProtocol {
|
||||
return &TelegramProtocol{}
|
||||
}
|
||||
|
||||
func generateFrame(cp protocol.ClientProtocol) (fm Frame) {
|
||||
data := fm.Bytes()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user