Skip to content

Instantly share code, notes, and snippets.

@Wolwer1nE
Last active November 29, 2018 07:27
Show Gist options
  • Save Wolwer1nE/2bb0b967fa0aea39d043650d4416b7f9 to your computer and use it in GitHub Desktop.
Save Wolwer1nE/2bb0b967fa0aea39d043650d4416b7f9 to your computer and use it in GitHub Desktop.
Setup telegram-bot-ruby with proxy
# https://github.com/atipugin/telegram-bot-ruby
# Uninstall all other telegram bot gems before installing telegram-bot-ruby
# All of them use same namespace
require 'telegram/bot'
token = '' #your token here
Telegram::Bot::Client.run(token) do |bot|
# we don't have API to setup Faraday connection, so we will override it
bot.api.send(:conn).proxy = 'https://90.176.152.12:41586' #get some free proxy here https://www.sslproxies.org/
#test connection
p bot.api.get_me
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment