Skip to content

feat: add proxy URL setting for bot connection - #353

Closed
sheben404 wants to merge 7 commits into
soberhacker:developfrom
sheben404:main
Closed

feat: add proxy URL setting for bot connection#353
sheben404 wants to merge 7 commits into
soberhacker:developfrom
sheben404:main

Conversation

@sheben404

Copy link
Copy Markdown

Summary

  • Adds a Proxy URL field in Advanced Settings for configuring an HTTP proxy
  • Passes the proxy to node-telegram-bot-api's request options when creating the bot instance
  • Fixes bot connection issues in regions where Telegram is blocked (e.g., China, Iran)

Why

node-telegram-bot-api uses Node.js native http/https modules, which bypass Electron's session proxy set by plugins like Global Proxy. This means users behind a proxy cannot connect the bot without a built-in proxy setting.

Changes

  • src/settings/Settings.ts — added proxyUrl field to settings interface and defaults
  • src/settings/modals/AdvancedSettings.ts — added proxy URL text input in the Advanced Settings modal
  • src/telegram/bot/bot.ts — passes proxy to TelegramBot constructor via request options

Test plan

  • Set a valid HTTP proxy URL in Advanced Settings, restart the plugin, verify bot connects through the proxy
  • Leave proxy URL empty, verify bot connects directly as before (no regression)

soberhacker and others added 3 commits October 6, 2024 12:16
node-telegram-bot-api uses Node.js native HTTP which bypasses
Electron's session proxy. This adds a proxy URL field in Advanced
Settings and passes it to the bot constructor's request options.
@sheben404
sheben404 changed the base branch from main to develop March 28, 2026 13:40
@sheben404 sheben404 mentioned this pull request Mar 28, 2026
@pav18

pav18 commented Mar 29, 2026

Copy link
Copy Markdown

How to install?

generateMarkdownLink may omit the ! prefix for media files,
causing images/videos/audio to render as plain links instead of
embeds. This checks the file extension and prepends ! when needed.
- Update README, manifest, package.json with fork author info
- Simplify CI release workflow to trigger on tag push
- Update CONTRIBUTING with new release process
- Remove donation links and FUNDING.yml
- Update doc links to point to fork repository
- Credit original author in settings page and README
@sheben404

Copy link
Copy Markdown
Author

How to install?

Hi! The original repo seems to be no longer actively maintained, so I've been maintaining this fork with some additional fixes.

You can find the installation instructions here: sheben404/obsidian-telegram-sync

@sheben404 sheben404 closed this Mar 29, 2026
@pav18

pav18 commented Apr 1, 2026

Copy link
Copy Markdown

Doesn't work.... Would you be so kind to add Issues to your fork?

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.

3 participants