I have a use case where I have to put a middle server or relay or tunnel to do network communication with the following points:
For this, the SQUID proxy worked for me.
I came across NGINX, but we can not use NGINX as a forward proxy, also there are some observations that might be useful with this regard.
I hope this could be useful to achieve something like this.