Skip to content

Usage of gotd for e2e testing #286

Answered by tdakkota
9seconds asked this question in Q&A
Discussion options

You must be logged in to vote

Hi!

There is example how to use MTProxy transport
https://pkg.go.dev/github.com/gotd/td@v0.33.3/telegram#example-Client-Mtproxy

        ...
	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 DialFunc and pass it to the MTProxyResolver in MTProxyOptions

It can be useful for testing transport through net.Pipe.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@ernado
Comment options

@9seconds
Comment options

Answer selected by ernado
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants