Skip to content

Add Telegram proxy support#26

Open
GuruJung wants to merge 1 commit intokstost:mainfrom
GuruJung:feat/telegram-proxy-support
Open

Add Telegram proxy support#26
GuruJung wants to merge 1 commit intokstost:mainfrom
GuruJung:feat/telegram-proxy-support

Conversation

@GuruJung
Copy link
Copy Markdown

@GuruJung GuruJung commented Apr 2, 2026

Summary

Add Telegram proxy support for the bot's Telegram API traffic.

Motivation

In some environments, Telegram access needs to go through a proxy.
Before this change, there was no project-level Telegram proxy setting, and the file download path did not share the same proxy-
aware client.

Changes

  • add telegram_proxy_url to settings.json
  • build a proxy-aware Telegram HTTP client at bot startup
  • use the same client for Telegram file downloads
  • enable SOCKS support in reqwest
  • align the direct reqwest dependency with the version used by teloxide 0.13 to avoid proxy client type mismatches

Testing

  • cargo check
  • cargo build
  • verified Telegram API access through a proxy
  • verified bot startup and command registration
  • verified live message handling during manual testing

If you'd prefer a different config key or a smaller change scope, I can adjust the PR accordingly.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants