| 1234567891011121314151617181920212223 |
- // Package sessionimport converts third-party Telegram session formats
- // (Pyrogram SQLite, Telegram Desktop tdata) to gotd/td's native session.Data.
- package sessionimport
- import "fmt"
- // TGDCAddr maps a Telegram data-center id to its production IP:port.
- // Source: https://core.telegram.org/api/datacenter
- func TGDCAddr(dc int) (string, error) {
- switch dc {
- case 1:
- return "149.154.175.53:443", nil
- case 2:
- return "149.154.167.51:443", nil
- case 3:
- return "149.154.175.100:443", nil
- case 4:
- return "149.154.167.91:443", nil
- case 5:
- return "91.108.56.130:443", nil
- }
- return "", fmt.Errorf("unsupported telegram dc_id: %d", dc)
- }
|