-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Socks5 as TELEGRAM_PROXY in .env file #773
Comments
i think it only support http proxy not socks5 |
It do supports http but they updated the library and now It also supports socks5 P.S.:
now you can use http proxy as TELEGRAM_PROXY |
marzban is using 4.9.0 version and latest version is 4.15.2 |
I'm a newbie in github, cannot do that. it would be great if you guys make it for next marzban update. |
In the .env file there is a variable called "TELEGRAM_PROXY" which is being used as proxy server to connect to TelegramAPI servers using python telebot library
using socks5 as proxy in python telebot is possible and supported IF "pysocks" and "requests[socks]" is available in python libraries.
To Reproduce the issue:
simply use any socks5 proxy address as TELEGRAM_PROXY in .env file.
(I always alternatively check the proxy response with this command, you can do it too:
curl -x <socks5Proxy> ip.sb
socks5Proxy format: socks5://userproxy:password@proxy_address:port
this must return the proxy public ipv4)
restart the marzban and you constantly get this error which can be solved if you install "pysocks" and "requests[socks]" on the docker container.
LOG:
Additional context:
If you have trouble finding a socks5 proxy, you can use ssh connection to one of your servers as a socks proxy server. Here is how you can do:
screen -S proxy
ssh -N -D <custom_port> user@server
Press CTRL+A+D
use this command to check if your proxy is running well or not. this should return the public IP of your ssh server.
curl -x localhost:<custom_port> ip.sb
The text was updated successfully, but these errors were encountered: