GitXplorerGitXplorer
a

Amal

public
0 stars
0 forks
0 issues

Commits

List of commits on branch Merging.
Verified
dde856c6219a0339ad8f07f6e81790bd27fce29c

Bot Token

TTGExplore committed 4 years ago
Verified
877c1f3fb5856507b2f4b43f9fed76f1e4f615a9

Add Bot Token

TTGExplore committed 4 years ago
Verified
6eeb7c456086ac82f061cbeebf1f872b55a76a3c

Update requirements.txt

TTGExplore committed 4 years ago
Verified
b43a53b4ed92f78a572fb029a0e4aaec0419cc03

Update paralleltransfer.py

TTGExplore committed 4 years ago
Verified
b12556dd0d4706c8207b687714605cb5978610e9

Update paralleltransfer.py

TTGExplore committed 4 years ago
Verified
a55c8ad2ddff324edfaf19aea784f76a58b468eb

Update paralleltransfer.py

TTGExplore committed 4 years ago

README

The README file for this repository.

Telegram File To Link Generation Bot

A Telegram bot that can stream Telegram files to users over HTTP.

Setup

Install dependencies (see requirements.txt), configure environment variables (see below) and run with python3 -m tgfilestream.

A reverse proxy is recommended to add TLS. When using a reverse proxy, keep HOST as-is, but add the publicly accessible URL to PUBLIC_URL. The URL should include the protocol, e.g. https://example.com.

You can also tap the Deploy To Heroku button below to deploy straight to Heroku!

Deploy

Environment variables

  • TG_API_ID (required) - Your Telegram API ID.
  • TG_API_HASH (required) - Your Telegram API hash.
  • TG_SESSION_NAME (defaults to tgfilestream) - The name of the Telethon session file to use.
  • TG_BOT_FATHER_TOKEN - Your bot token, as a string..
  • PORT (defaults to 8080) - The port to listen at.
  • HOST (defaults to localhost) - The host to listen at.
  • PUBLIC_URL (defaults to http://localhost:8080) - The prefix for links that the bot gives.
  • TRUST_FORWARD_HEADERS (defaults to false) - Whether or not to trust X-Forwarded-For headers when logging requests.
  • DEBUG (defaults to false) - Whether or not to enable extra prints.
  • LOG_CONFIG - Path to a Python basic log config. Overrides DEBUG.
  • REQUEST_LIMIT (default 5) - The maximum number of requests a single IP can have active at a time.
  • CONNECTION_LIMIT (default 20) - The maximum number of connections to a single Telegram datacenter.
  • TG_START_MESG - The message that should be shown in Telegram chat, in case of non-media message.

Issue Bot stopped responding

If bot is not responding, open https://<appname>.herokuapp.com/ and try again. Issue - https://github.com/tulir/tgfilestream/issues/9