How do I direct SOCKS5 proxy traffic to other SOCKS5 proxies based on ports?
If you can help point me in the right direction, it would be appreciated.
So I bought a bunch of premade SOCKS5 proxies from a provider, and I want to set up a single Linode VPS as a SOCKS5 proxy that can point to other proxies depending on the port.
This is my Linode server's IP address: xx.xxx.xx.xxx
I want socks5 connections to particular ports to be redirected to the socks5 proxies I bought.
For example, this way (randomly generated IP addresses for forwarded destination):
xx.xxx.xx.xxx:8000 -> 126.96.36.199:1080
xx.xxx.xx.xxx:8001 -> 188.8.131.52:1080
xx.xxx.xx.xxx:8002 -> 184.108.40.206:1080
xx.xxx.xx.xxx:8003 -> 220.127.116.11:1080
xx.xxx.xx.xxx:8004 -> 18.104.22.168:1080 and so on.
So for example, if I went on Proxifier on Windows:
if I connect to xx.xxx.xx.xxx:8001, i'd get 22.214.171.124 on whatsmyip.com.
if I connect to xx.xxx.xx.xxx:8003, i'd get 126.96.36.199 on whatsmyip.com.
The point of this is to make proxy management easier for my use case.
I have a lot of proxies that I need to replace in a tedious GUI on a Windows software.
It gets hard to manage, so my end goal is to have a setup like this,
in a way that I can have a simple text file in the format:
xx.xxx.xx.xxx:8003-> proxy3:port, etc.
This way, I'd set up that static ip on the GUI software, only once and don't touch it again. I want to have a central proxy list text file to deal with this in one place. To do any replacements, I'd go edit my text file.
Eventually I could make it be a web database, but that's finishing touches. Ideally, replacing any proxy in this file would not make other connections be disconnected.
So I assume I'll have to write a program for this part, to keep each connection isolated from each other, unless there's something already made.
It seems like a very simple concept though, I would be surprised if nothing already exists in open source for this.
I see proxy companies sell "backconnect" SOCKS5 proxies, which is this exact same setup. But no results on how they accomplish this, and the fact that I need SOCKS5 makes it harder to find relevant results.
Also, the proxies I buy are premade, so you can only access them as SOCKS5 proxy. They don't allow SSH access so I can't go into each server and install additional software.
Please, let me know if you happen to know any information on this/what tools to research.
Admittedly, I’m not very familiar with SOCKS5, so I apologize if the information that follows doesn’t fully encompass what your goal is.
It seems like you want to create a SOCKS5 proxy chain, but you want to make it dependent on the ports that are accessed. While I wasn’t able to find any resources that would directly apply, I saw that you mentioned using Proxifier on Windows to achieve something similar. I was able to gather a few resources that were indicated as Linux-based alternatives to Proxifier:
I also found other resources that may help you in your endeavors:
Please use these tools/resources at your own discretion as I didn’t personally test them myself.
My colleague also mentioned an alternative just in case you wanted to ditch SOCKS5, which you’re probably pretty set on doing, but I’ll throw it in here anyway. NGINX reverse proxy will forward the request to the IP and then the IP will forward back the data to the user through the proxy, keeping the backend server’s true IP hidden. For more information on NGINX reverse proxy, please refer to NGINX official documentation: https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/
We also have a guide on configuring NXGINX reverse proxy: https://www.linode.com/docs/web-servers/nginx/use-nginx-reverse-proxy/#configure-nginx
Best of luck!