Clearnet proxy to Tor remote service

Problem: You want to provide a clearnet IP address to access a remote Tor service. People connecting to [IP:PORT] on the public Internet should then seamlessly be connecting to [SERVICE.onion:PORT] residing on the Tor network.

Nginx can field the connection, but you need to use socat to mediate the connection between nginx and the tor socks proxy.

Solution: Follow this excellent guide on how exactly this all gets configured.

Amendment: The above is appropriate when proxying an HTTP connection. If the TOR service is being proxied-to is not HTTP, you can just remove NGINX from the equation and let socat handle the connection directly.