Skip to content

erfanshekari/ssh-proxy

Repository files navigation

UDP/TCP Tunnel Over OpenSSH

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)

How to Install

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

How to connect

First set Environment variables in .env file like this example:

Using Password:

SSH_HOST=x.x.x.x
SSH_PORT=22
SSH_USER=root
SSH_PASSWORD=xxxxx

Using Private Key:

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

How to disconnect

sudo ./manage.sh down

About

Tunnel UDP/TCP traffic over SSH connection.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published