Skip to content

Instantly share code, notes, and snippets.

@arsalanses
Created November 25, 2024 06:16
Show Gist options
  • Select an option

  • Save arsalanses/d6341d0c904fae6d6c85890c28fef822 to your computer and use it in GitHub Desktop.

Select an option

Save arsalanses/d6341d0c904fae6d6c85890c28fef822 to your computer and use it in GitHub Desktop.
telegram bot api proxy
services:
nginx:
image: nginx:bookworm
container_name: "nginx"
restart: always
#ports:
# - "80:80"
volumes:
- ./conf.d:/etc/nginx/conf.d
# - ./log:/var/log/nginx
networks:
- web
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
web:
external: true
server {
listen 80;
server_name proxy.example.com;
location / {
return 444;
}
location ~* ^/bot {
resolver 8.8.8.8;
proxy_buffering off;
proxy_pass https://api.telegram.org$request_uri;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment