Package-Level Type Names (total 13, in which 8 are exported)
/* sort exporteds by: | */
DialFunc connects to the address on the named network.
DNSConfig is DC connection config obtained from DNS. Date field of HelpConfigSimple. Expires field of HelpConfigSimple. Rules field of HelpConfigSimple. Options returns DC options from this config.
func ParseDNSConfig(txt []string) (DNSConfig, error)
MTProxyOptions is MTProxy resolver creation options. Dial specifies the dial function for creating unencrypted TCP connections.
If Dial is nil, then the resolver dials using package net. Network to use. Defaults to "tcp" Random source for MTProxy obfuscator.(*MTProxyOptions) setDefaults()
func MTProxy(addr string, secret []byte, opts MTProxyOptions) (Resolver, error)
PlainOptions is plain resolver creation options. Dial specifies the dial function for creating unencrypted TCP connections.
If Dial is nil, then the resolver dials using package net. Network to use. Defaults to "tcp". NoObfuscated denotes to filter out TCP Obfuscated Only DCs. Obfuscated enables transport obfuscation (Obfuscated2) for all
connections, not only for TCP-obfuscated-only DCs.
The official clients (e.g. Telegram Desktop) always obfuscate direct
connections, so enabling this together with Protocol: transport.Abridged
makes the connection indistinguishable from Telegram Desktop on the wire. PreferIPv6 gives IPv6 DCs higher precedence.
Default is to prefer IPv4 DCs over IPv6. Protocol is the transport protocol to use. Defaults to intermediate. Random source for TCPObfuscated DCs.(*PlainOptions) setDefaults()
func Plain(opts PlainOptions) Resolver
WebsocketOptions is Websocket resolver creation options. Dialer specifies the websocket dialer.
If Dialer is nil, then the resolver dials using websocket.DefaultDialer. Random source for MTProxy obfuscator.(*WebsocketOptions) setDefaults()
func Websocket(opts WebsocketOptions) Resolver
Package-Level Functions (total 12, in which 10 are exported)
DefaultResolver returns default DC resolver for current platform.
FindDCs searches DCs candidates from given config.
FindPrimaryDCs searches new primary DC from given config.
Unlike FindDC, it filters CDNs and MediaOnly servers, returns error
if not found.
MTProxy creates MTProxy obfuscated DC resolver.
See https://core.telegram.org/mtproto/mtproto-transports#transport-obfuscation.
ParseDNSConfig parses tg.HelpConfigSimple from TXT response.
Plain creates plain DC resolver.
Prod returns production DC list.
Staging returns staging DC list.
Deprecated: Use Test().
Test returns test DC list.
NB: as of 2026, the test DCs no longer auto-provision accounts for randomly
generated 99966X test phone numbers (auth.Test) — sign in fails with
PHONE_CODE_INVALID. A real, pre-registered test account is required; see
https://core.telegram.org/api/auth#test-accounts.
Websocket creates Websocket DC resolver.
See https://core.telegram.org/mtproto/transports#websocket.
The pages are generated with Goldsv0.8.4. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.