-
Hey! Thanks for the project! I have tried to use gotd for testing of https://github.com/9seconds/mtg but can't figure out if it is possible to do that. Let me show you an example: https://github.com/9seconds/mtg/blob/master/mtglib/proxy_test.go#L139-L169 This is a rather simple test. I start mtg and send HTTPS requests to this proxy. My goal is to see a response from the fronting domain. I wanna do the same test but for Telegram itself:
AFAIK, Ping and Pongs are authorization-free and can be sent without any credentials. How can I make such a test? I do not need anything smart here. I just want to get a response from Telegram to check e2e connectivity. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi! There is example how to use MTProxy transport ...
resolver, err := dcs.MTProxyResolver(
os.Getenv("PROXY_ADDR"),
secret,
dcs.MTProxyOptions{},
)
if err != nil {
return xerrors.Errorf("create MTProxy resolver: %w", err)
}
... Also, you can use your own It can be useful for testing transport through |
Beta Was this translation helpful? Give feedback.
-
Thanks, guys! 9seconds/mtg#184 |
Beta Was this translation helpful? Give feedback.
Hi!
There is example how to use MTProxy transport
https://pkg.go.dev/github.com/gotd/[email protected]/telegram#example-Client-Mtproxy
Also, you can use your own
DialFunc
and pass it to theMTProxyResolver
inMTProxyOptions
It can be useful for testing transport through
net.Pipe
.