R
R
Ruslan Banochkin2018-04-16 13:34:03
VPN
Ruslan Banochkin, 2018-04-16 13:34:03

How to transfer the work of the server (or rather the bot on Laravel) to VPN or proxy?

In connection with the blocking of Telegram in Russia, one problem has appeared. In my hometown, there is a system unit as a server where CentOS is running in VirtualBox, on which a bot for Telegram is running. Naturally, now it has stopped working, because it cannot reach api.telegram.org.
The problem is aggravated by the fact that the bot was not written by me, but by a friend who is now on vacation and at least a week without a computer. I myself do not know how to program, at most I can edit the scripts a little.
The bot is written in Laravel along with this one: https://github.com/irazasyed/telegram-bot-sdk. It's all spinning on a server with a VestaCP panel, a web server on nginx + apache. The server has its own dedicated ip. If any more details are needed, I will add.
What should I do? I understand that you need to configure the bot so that it proxies requests to api.telegram.org, but I have no idea how to do this. I don’t know much about the settings of the web server, it’s enough just to set it up for a simple job. Everything is bad with Laravel.
Please help me find a solution.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2018-04-16
@Tabletko

Transfer all this bacchanalia to foreign vds / vps

D
devalone, 2018-04-16
@devalone

The easiest option is to set up traffic routing on the server, either using iptables in the proxy, or raise an openvpn client. You can also try writing the following script to launch the bot:

export http_proxy=http://proxy_domain:port
export https_proxy=http://proxy_domain:port
your_program

but then how lucky, not all clients read these variables

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question