An open API service indexing awesome lists of open source software.

https://github.com/spf50p/get-telegram-proxy-config


https://github.com/spf50p/get-telegram-proxy-config

mtproto mtproto-proxy mtprotoproxy mtproxy proxy telegram

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

          

# get-telegram-proxy-config

Downloads Telegram proxy configuration files from the official Telegram core API and saves them locally. Files are only replaced when their content has changed.

## Downloaded files

| File | Source |
|------|--------|
| `proxy_secret` | http://core.telegram.org/getProxySecret |
| `proxy_config` | http://core.telegram.org/getProxyConfig |
| `proxy_config_v6` | http://core.telegram.org/getProxyConfigV6 |
| `last_updated` | timestamp written on each update (UTC, ISO 8601) |

## Requirements

- `bash`
- `curl`

## Usage

```bash
# Download to default directory (./.configs)
./get-telegram-proxy-config.sh

# Download to a custom directory
OUTPUT_DIR=/etc/telegram ./get-telegram-proxy-config.sh

# Download and pack changed files into proxy_configs.tar.gz
PACK=1 ./get-telegram-proxy-config.sh

# Custom directory with archive
OUTPUT_DIR=/etc/telegram PACK=1 ./get-telegram-proxy-config.sh
```

## Environment variables

| Variable | Default | Description |
|----------|---------|-------------|
| `OUTPUT_DIR` | `./.configs` | Directory to save files into |
| `PACK` | `0` | Set to `1` to create `proxy_configs.tar.gz` after update |