Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proxy option for Telegram. #141

Closed
Aqaao opened this issue Feb 26, 2024 · 3 comments
Closed

Add proxy option for Telegram. #141

Aqaao opened this issue Feb 26, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Aqaao
Copy link

Aqaao commented Feb 26, 2024

Implementing this is simple. The following is the document of python-telegram-bot. Just load proxy url from config.json or
environment variables.
https://github.com/python-telegram-bot/python-telegram-bot/wiki/Working-Behind-a-Proxy

from telegram.ext import ApplicationBuilder

# "USERNAME:PASSWORD@" is optional, if you need authentication:
proxy_url = 'http://USERNAME:PASSWORD@PROXY_HOST:PROXY_PORT'  # can also be a https proxy
app = ApplicationBuilder().token("TOKEN").proxy(proxy_url).get_updates_proxy(proxy_url).build()
@F33RNI F33RNI added enhancement New feature or request good first issue Good for newcomers labels Mar 8, 2024
@F33RNI
Copy link
Owner

F33RNI commented Apr 19, 2024

#160

@F33RNI
Copy link
Owner

F33RNI commented Apr 19, 2024

Can u please check?

@Aqaao
Copy link
Author

Aqaao commented Apr 20, 2024

#160

It work well. thank you😘.

@F33RNI F33RNI closed this as completed Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants