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:
- 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.
- Configure your V2ray client to use the SOCKS proxy on port 1080.
- 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:
- 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.
- Configure your V2ray client to use the SOCKS proxy on port 1080.
- 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.