openbullet / OpenBullet2

OpenBullet reinvented
https://docs.openbullet.dev/
MIT License
1.78k stars 479 forks source link

[BUG] Some proxies doesn't work #333

Open jeank93 opened 3 years ago

jeank93 commented 3 years ago

Describe the bug As the title says, for some reason this happens. I did a test in OB1 and other programs, and it worked fine, but in OB2 it does not.

To Reproduce Download and run this https://github.com/Snawoot/hola-proxy/

Screenshots

Additional context This problem has happened to me with other HTTP proxies, so I don't think it's something related to this specific proxies

openbullet commented 3 years ago

Could you send me a proxy that gives this issue via email so I can debug the issue? ruri [at] openbullet (dot) dev

jeank93 commented 3 years ago

Done I have found that the problem only happends with some HTTP proxies and the requested URL is http (With https works) Check the email for more details and proxies to test

openbullet commented 3 years ago

Can you confirm you're running the latest version of OB2? Because we fixed problems with http proxies and http urls a long time ago. Or is this a new problem?

jeank93 commented 3 years ago

Yes the latest v0.1.18

RydjGit commented 3 years ago

I am not sure but this Proxy looks like Http Get proxy type which is not supported by OB2, if you read the responce from the proxy server "can't satisfy CONNECT request: bad responce from upstream proxy server: 403 bad port" . and you confirming it is working with https confirms my assumption.

HTTP CONNECT Method is used primarly to proxy SSl/TLS handshake to client. So in short this is not OB2 bug , it just doesnot support HTTP GET Proxies which is good because most of them are cached and transparent . example for GET Proxy: GET http://www.google.com/ HTTP/1.1 Host: www.google.com User-agent....etc Notice full URI after GET what that means : you are telling the proxy , hey proxy I don't care just go and get me the page for that url. Example Connect request: CONNECT google.com:443 HTTP/1.1 what that means : hey proxy go and connect to google.com at port 443 and forward that connection to my ip and I will do the ssl handshake from there. if proxy successfly connects it responds with 200 OK or 200 Connection Established from here you are connected to google server.

Another possibilty based on last statement "bad port" is that the proxy does not support forwarding connections to port 80 since this is the http port in contrast to https port 443.

openbullet commented 3 years ago

Thanks for the insight @RydjGit I still think it's better to provide the maximum compatibility across the board, so I will be looking to implement support for them eventually.