0

I run a V2ray server and client and created a Inbound Socks5. I want to forward 0.0.0.0:8443 to a remote machine with IP and port number.

I know that dokodemo-door in v2ray can do this, but my ISP has been blocked this protocol. So I need another solution. IS there any solution to generally forward ports over a socks proxy?

raitech
  • 91
  • 6

1 Answers1

0

There are several solutions you can try to forward ports over a SOCKS proxy without using dokodemo-door. Here are two possible options:

Use SSH Tunneling

SSH tunneling allows you to forward ports over a SOCKS proxy by using the SSH protocol. Here's how to do it:

  1. Start an SSH connection to your remote machine with the following command:

ssh -D 1080 -f -C -q -N user@remote_machine_ip

This command starts an SSH connection to your remote machine and creates a SOCKS proxy on your local machine's port 1080.

  1. Configure your V2ray client to use the SOCKS proxy on port 1080.
  2. Forward the desired port using the following command:

ssh -L 8443:remote_machine_ip:remote_port user@remote_machine_ip

This command forwards port 8443 on your local machine to the remote machine's IP address and port number specified by remote_ip and remote_port, respectively.

Use socat

socat is a command-line utility that can be used to create bidirectional data streams between two endpoints. Here's how to use it to forward a port over a SOCKS proxy:

  1. Start a SOCKS proxy on your local machine's port 1080 using the following command:

socat TCP-LISTEN:1080,fork SOCKS4A:proxy_ip:remote_machine_ip:remote_port,socksport=1080

This command starts a SOCKS proxy on your local machine's port 1080 and forwards incoming traffic to the remote machine's IP address and port number specified by remote_ip and remote_port, respectively, via the SOCKS proxy at proxy_ip.

  1. Configure your V2ray client to use the SOCKS proxy on port 1080.
  2. Forward the desired port using the following command:

socat TCP-LISTEN:8443,fork SOCKS4A:proxy_ip:remote_machine_ip:remote_port,socksport=1080

This command forwards port 8443 on your local machine to the remote machine's IP address and port number specified by remote_ip and remote_port, respectively, via the SOCKS proxy at proxy_ip.

Note that in both cases, you need to replace remote_machine_ip and remote_port with the IP address and port number of your remote machine, respectively. Additionally, you need to replace proxy_ip with the IP address of your SOCKS proxy server.

iamenr0s
  • 1
  • 2