-
Notifications
You must be signed in to change notification settings - Fork 233
Proxy
Ilya Ableev edited this page Apr 17, 2018
·
10 revisions
How to test proxy server:
curl -IL --socks5 host:port --proxy-user username:password https://api.telegram.org
WARNING: if you are using public "socks5 proxy server for Telegram" it might not work!!!
Preparation:
- Update the script (
zbxtg.py
) to the latest revision - update pip:
sudo pip install --upgrade pip
- update
requests
:sudo pip install requests --upgrade
(right now working version is 2.18.4) - install
pysocks
:sudo pip install pysocks
Make sure that everything is ok:
$ sudo pip freeze | grep -iE 'sock|req'
PySocks==1.6.8
requests==2.18.4
requests-oauthlib==0.6.2
requests-toolbelt==0.8.0
Settings in zbxtg_settings.py
:
-
if you are using socks5 proxy with username and password
proxy_to_tg = "socks5://username:password@host:port"
-
if you are using socks5 proxy without username and password
proxy_to_tg = "socks5://host:port"
-
http/https proxy (such as squid) should be working as before