-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Socks proxy error #1077
Comments
Hi First of all revoke your token, it's in these logs. |
@Eldinnie thanks, token's revoked, but don't think I will suffer from stealing my token :) the bot was created only for reproducing this issue. |
Ok thanks. Could you try another thing. |
|
@Eldinnie I see your vendored fork of urllib3 is not in sync to the current urllib3 original repo. |
Yes I believe this is the root of the problem. So I hand it over to @tsnoam |
|
@tsnoam thank you! |
@maxgrechnev For future reference, this is the setup I've created: edit /etc/danted.conf
run dante:
|
@maxgrechnev |
@maxgrechnev |
@tsnoam I have contacted the provider of the proxy I use. He noticed the difference between two requests:
I don't know which behaviour is correct, maybe both. |
@maxgrechnev Thanks for the clarification. Everything makes much more sense now. On a side note, I would personally recommend that you'd use a proxy provider which supports resolution of hostnames over the proxy. With the latest developments in Russia I would be surprised if they hadn't already tampered with DNS records. |
How will the ready-made solution for launching python-telegram-bot through a proxy for Russia look like, using the user and password? |
@ruslan1990 |
@tsnoam
But I get this error.
These proxy parameters work in the telegram application on the phone. |
@ruslan1990 First of all, replace your password to the socks proxy. You've just posted it cleartext. Regarding the error you get, it's a server side error. You should check the socks server logs for more insight. |
@tsnoam |
@ruslan1990 The error message is from the server side. Please check the server logs so we can understand what the problem is. |
@maxgrechnev @ruslan1990 You can get this patched version by running: git clone --branch=urllib3_socks5h --recursive https://github.com/python-telegram-bot/python-telegram-bot |
@tsnoam |
@ruslan1990 Have you created a new clone of the git repo exactly as specified in the command I supplied? |
@tsnoam Yes, I use copy paste. |
@ruslan1990 In that case, I believe that this is a different issue than @maxgrechnev experienced. |
@maxgrechnev |
@tsnoam |
@ruslan1990 Thanks for the update. |
@tsnoam |
@tsnoam Glad to inform you that the fix works well. Thank you! |
@maxgrechnev |
FIxes #1077 Changes semantics of socks proxy behaviour. Until now - socks5:// was actually socs5h:// and we didn't really have socks5://
Steps to reproduce
The code compares behaviour of two libs: urllib3 and python-telegram-bot:
Expected behaviour
I expect the same behaviour of both libraries: urllib3 and python-telegram-bot.
Actual behaviour
urllib3 works well, but python-telegram-bot raises telegram.error.NetworkError.
Configuration
Operating System:
Linux test 4.14.30-v7+ #1102 SMP Mon Mar 26 16:45:49 BST 2018 armv7l GNU/Linux
Raspbian GNU/Linux 9 (stretch)
Version of Python, python-telegram-bot & dependencies:
python-telegram-bot 10.0.2
certifi 2018.01.18
future 0.16.0
urllib3 1.22
PySocks 1.6.8
Python 2.7.13 (default, Nov 24 2017, 17:33:09) [GCC 6.3.0 20170516]
Logs
Output of the code:
The text was updated successfully, but these errors were encountered: