vysheng / tg

telegram-cli
GNU General Public License v2.0
6.45k stars 1.53k forks source link

How can adopt proxy? #291

Open itanoss opened 9 years ago

itanoss commented 9 years ago

Hi. My env is ubuntu 14.04 x64 and tg which is latest version(=master). Even if $http_proxy is set, it seems to be blocked.

svenkost commented 9 years ago

Use proxychains. http://man.cx/proxychains Works like a charm for me. so: proxychains bin/telegram-cli

itanoss commented 9 years ago

Thanks so much for helping me. :) But there is a new blocker with the following message.

[warn] Epoll ADD(4) on fd 10 failed. Old events were 0; read change was 0 (none); write change was 1 (add): Bad file descriptor

Almost every 1min, this message is being shown.

vysheng commented 9 years ago

And does telegram-cli work or it just fails to connect and tries to reconnect every minute?

itanoss commented 9 years ago

Not working. I doubt that the reason is non-http transaction. Is it related that my company blocks non-http tcp packet? I figured out that proxychains attempts to use port 25. Port 80 is http and port 443 is https as you know.

svenkost commented 9 years ago

This is the entries that I have in my /etc/proxychains.conf file:

[ProxyList]

add proxy here ...

meanwile

defaults set to "tor"

http proxy-ip proxy-port proxy-uid proxy-pwd https proxy-ip proxy-port proxy-uid proxy-pwd