The problem is that the OpenSSH connection itself does not support UDP, so it is not a good solution for VPN. But with the power of TProxy we can also send udp traffic which solves common problems related to DNS queries etc.
This setup will provide you with socks5 and bind9 services which you can customize the configurations according to your needs. Customize the ports in the compose.override.yaml file.
services:
proxy:
ports:
- '1089:1089' # Socks5 Proxy
dns:
ports:
- '5300:53/udp' # DNS Server (bind9)
First Clone repository
git clone https://github.com/erfanshekari/ssh-proxy
Then change current directory to ssh-proxy
cd ssh-proxy
Now you need to install docker and pull images. The command below will do that for you.
sudo ./manage.sh install
First set Environment variables in .env file like this example:
SSH_HOST=x.x.x.x
SSH_PORT=22
SSH_USER=root
SSH_PASSWORD=xxxxx
SSH_HOST=x.x.x.x
SSH_PORT=22
SSH_USER=root
SSH_KEY=/path/to/key.pem
after that run services:
sudo ./manage.sh up
sudo ./manage.sh down