Comments (5)
Hi there, you did nothing wrong, but I'm not able to reproduce this on my machine. To see what's going on update Pyrogram using pip install --upgrade git+https://github.com/pyrogram/pyrogram.git@issue-12
and show me the full logs again. Also tell me where you are running it: OS, Python version.
from pyrogram.
Ooops, may be it's our vpn+proxy:
>>> b'TTP/1.0 400 Bad Request\r\nServer: squid/2.6.STABLE21\r\nDate: Mon, 29 Jan 2018 10:49:53 GMT\r\nContent-Type: text/html\r\nContent-Length: 1162\r\nExpires: Mon, 29 Jan 2018 10:49:53 GMT\r\nX-Squid-Error: ERR_INVALID_REQ 0\r\nX-Cache: MISS from openvpn.serv\r\nX-Cache-Lookup: NONE from openvpn.serv:3121\r'
I use Ubuntu 16.04, python 3.5.
May be I can change port, because I guess proxy catches all connection on 80 port.
from pyrogram.
Yep. I've extensively tested Pyrogram with proxies, but let me know if you think it should work by kindly opening a new issue. If it works with another proxy there's definitely something wrong with yours. Thanks.
from pyrogram.
Do I have a possibility to change datacenter ip and port? Because I have recommended ip/port on telegram panel. When I changed in connection.py:
self.address = (ipv4, 80)
to
self.address = ("149.154.167.50", 443)
I successfully logged. It's not a proxy like package expects, it's just transparent and caching proxy in our office. I can't bypass it without modifying source code.
from pyrogram.
The recommended ip/port you see on your panel are only meaningful for client developers, the DC IP changes depending on where the user is located - Pyrogram automatically manages this. Port 80 and 443 offer the exact same service, but I found Telegram switching off port 443 rather often, that's why I'm using port 80. You don't really have to mess with this.
If you can confirm self.address = (ipv4, 443)
works for you without changing the IP, then I might think of switching back to port 443 as default.
But again, I think is just your proxy misbehaving and we really should discuss this in another issue you can open.
from pyrogram.
Related Issues (20)
- CHAT_ADMIN_REQUIRED HOT 5
- Unable to connect due to network issues: Connection timed out HOT 1
- Hardcoded Session.START_TIMEOUT
- issue tiwh
- Trouble Accessing Messages Containing Quotes HOT 2
- Fetch more than 200 or filter by deleted / last seen a long time ago #4342 HOT 1
- Ability to specify session file path HOT 1
- Issue: Ban from 'pyrogramchat' Telegram Group Due to Verification Bot Malfunction HOT 1
- Slow Upload Speed HOT 1
- [400 PEER_ID_INVALID] but I met this peer in a group chat! On real client I can DM them. HOT 2
- 求大佬维护群聊管理员匿名用户的识别问题
- the handler receives the user's message twice
- Missing RDNS Parameter in proxy connection settings
- Missing Parameter in ban_member Method HOT 6
- Health Check HOT 1
- Document download problem
- [PROPOSAL] Pass the project to someone else HOT 3
- Message not received from a certain telegram channel HOT 17
- Can't send media due to 401(AuthKeyUnregistered) error HOT 1
- Clarification related to how it upload more than 50mb? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyrogram.