There are three machines involved.
Home PC Gateway Server Squid Proxy Server on a workstation. I want to surf internet using the Squid proxy server on my Home PC
I don't have a direct access to the squid proxy server on PC-3(workstation) but I have ssh access to the Gateway server and Gateway server has access to the squid proxy server.
So I want to direct all the web traffic from my home pc to squid proxy server on the workstation via the gateway server.
NOTE- I don't have the sudo access on gateway server.
SSH as socks proxy through multiple hosts
This link tells how to connect to a third pc but in my case I want to connect to a proxy server.