skip to Main Content

OS: CentOS7

I’ve got application for telegram api bot in docker. By deafult it sends all requests to https://api.telegram.org (149.154.167.220) which is blocked in my country. This URL variable can’t be changed from my side.

I installed tor and curl request is completed successfully

curl --socks5-hostname 127.0.0.1:9150 https://api.telegram.org/

Which software can I use to force using socks5 for all https requests to above url? Or maybe there is another more suitable option to proxy all this traffic?

2

Answers


  1. Chosen as BEST ANSWER

    It turnes out that docker itself has option to proxy traffic through specific hostport https://docs.docker.com/network/proxy/#configure-the-docker-client


  2. proxychains is exactly what you are looking for.

    proxychains – a tool that forces any TCP connection made by any given application to follow through proxy like TOR or any other SOCKS4, SOCKS5 or HTTP(S) proxy. Supported auth-types: “user/pass” for SOCKS4/5, “basic” for HTTP.

    I assume it works with CentOS, since it is Linux based, but I’ve never used Cent before.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search