Basically, SOCKS5 and HTTP speak completely different languages, so you can't just 'convert' a SOCKS5 to an HTTP proxy. You need to run some kind of intermediate software that will handle the handoff between the two proxies.
NOTE: This is an untested solution because I have no proxies on my network for testing. However, the concept and configuration appears to be sound for proxying proxy traffic, though again this is untested.
There is a project out there called python-proxy
(pproxy
is the executable). It is not my project, but it seems like this is capable of doing proxy-to-proxy conversion and handoff.
To start, install this on whichever system is going to run your HTTP proxy that Synology can talk to, even if it's on your SOCKS5 proxy server. Install python3-pip
first so you can use PyPI projects and software:
sudo apt install python3-pip
sudo pip3 install pproxy[accelerated]
This will install the Python proxy tool system wide, and have C-library integrations that will improve performance. If for some reason this doesn't install properly, then just use the plain pproxy tool after making sure you remove pproxy accelerated first (just say yes if it prompts at uninstall, if it says its not installed then just do the install command):
sudo pip3 uninstall pproxy
sudo pip3 install pproxy
NOTE: I'm assuming that the connection is your Synology to an HTTP proxy, and then you want to hand the HTTP proxy stuff off to a SOCKS5 proxy. You can clarify in response to my comment on your question and I will alter this answer accordingly.
Then, theoretically, you would use this to run it on the system that will 'host' this 'http to socks5' proxy tool:
pproxy -l http://0.0.0.0:8080 -ru socks5://socks5.proxy.ip.or.domain:port
You would then point your Synology NAS to the http address and port combo for the system running the tool (if that server running pproxy
has IP 10.20.30.40
then you would point the NAS at http://10.20.30.40:8080
for the proxy)
This should, in theory, handle the 'proxy handoff' between two different proxy types.
Again, I have not tested this, but the code and proxy theory do appear to be sound.