are there any solution/patch that would make nginx work with a socks upstream?
something like this:
server {
location / {
proxy_pass socks5://ip:port/
}
}
I've recently wrote a module doing exactly what you need. You might need something like HAProxy before nginx to support TLS tunneling.
SOCKS is layer 5, HTTP is layer 7. An HTTP proxy cannot deal with SOCKS, although an HTTP proxy can work over SOCKS. It's unclear to me what you would expect Nginx to do with the response were it able to connect to the SOCKS server. It's similar to asking if Nginx could connect to NetBIOS or PTPP.
Assuming you are attempting to have Nginx proxy to another HTTP server that can only be reached via SOCKS, you need to set this up as part of your network stack on your operating system.
Maybe this link can help you:
http://www.catonmat.net/blog/linux-socks5-proxy/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With