Skip to content
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

Proxy support #20

Open
AlwxSin opened this issue Apr 16, 2018 · 6 comments
Open

Proxy support #20

AlwxSin opened this issue Apr 16, 2018 · 6 comments

Comments

@AlwxSin
Copy link

AlwxSin commented Apr 16, 2018

There are countries that tries to block telegram.
I created PR #19 that add basic proxy support, but there are several issues with that.

@vyuldashev
Copy link

Any ETA on this?

@AlwxSin
Copy link
Author

AlwxSin commented Oct 19, 2018

@vyuldashev please, look at getsentry/sentry#6784

@vyuldashev
Copy link

@AlwxSin Well, its not finished

@notarseniy
Copy link

+1

@butorov
Copy link
Owner

butorov commented Apr 14, 2019

@AlwxSin @vyuldashev @notarseniy now you can try to solve your problem with the api_origin option.

@ybolotnikov
Copy link

ybolotnikov commented Aug 9, 2019

Hi! We get to work telegram with next scenario:

  1. Setup nginx with self-signed certs in local network:
    server {
    listen 443 ssl;

     ssl_certificate     /etc/ssl/certs/fakeapi.crt;
     ssl_certificate_key /etc/ssl/certs/fakeapi.key;
    
     server_name api.telegram.ru;
    
     location / {
             proxy_pass http://ourhetznerserver.ip:443;
     }
    

}
2. Nginx on hetzner VM:
server {
listen 443;

    server_name api.telegram.org;

    location / {
            proxy_pass https://api.telegram.org;
    }

}

I think there is one nginx in hetzner enough, but with this we get an error with our another alert services:
curl: (35) Unknown SSL protocol error in connection
(updating rootCA.pem didn't help)

  1. Add line to Dockerfile:
    RUN apt-get update && apt-get install -y python-pip && pip install sentry-telegram && sed -i 's/verify_ssl=True/verify_ssl=False/g' /usr/local/lib/python2.7/site-packages/sentry/http.py

  2. Add record witn local nginx to hosts in docker-compose.yml:
    extra_hosts:

    • "api.telegram.org:192.168.110.35"
  3. Rebuild sentry:
    docker-compose build && docker-compose run --rm web upgrade && docker-compose up -d

Profit!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants