Upd proxy example.

This commit is contained in:
Alex Root Junior 2018-04-22 22:16:50 +03:00
parent 573264b422
commit c672faed0b

View file

@ -10,12 +10,13 @@ from aiogram.utils.markdown import bold, code, italic, text
# Configure bot here
API_TOKEN = 'BOT TOKEN HERE'
PROXY_URL = 'http://PROXY_URL'
PROXY_URL = 'http://PROXY_URL' # Or 'socks5://...'
# If authentication is required in your proxy then uncomment next line and change login/password for it
# PROXY_AUTH = aiohttp.BasicAuth(login='login', password='password')
# And add `proxy_auth=PROXY_AUTH` argument in line 25, like this:
# >>> bot = Bot(token=API_TOKEN, loop=loop, proxy=PROXY_URL, proxy_auth=PROXY_AUTH)
# Also you can use Socks5 proxy but you need manually install aiosocksy package.
# Get my ip URL
GET_IP_URL = 'http://bot.whatismyipaddress.com/'