I've been using Squid on one of my server as a transparent proxy for a very long time (years).
Basically from the client I was creating an SSH tunnel between my client and the ssh + Squid server doing this:
ssh -T -N -x -C -L3128:127.0.0.1:3128 cedric@xxx
and then I'd launch my web browser (chromium) giving it a proxy-server at 127.0.0.1 on port 3128.
This worked fine for a very long time but then I started having logging issues on many websites (forums, stackexchange using Google as the login authority, etc.). Some kept working fine (like GMail and all the GMail services). I don't know what caused the login problems: I think it's due to some Squid configuration problem when I upgraded the server's OS and software.
So I considered setting up a VPN but then by reading an article called "SSH as a poor man's VPN", I realized that I could use SSH and simply do this, from the client:
ssh -D 5222 cedric@xxx -N
And then configure my browser to use 127.0.0.1 as a SOCKS host on port 5222.
And now everything works fine: all the login problems seem to be solved and I don't even need Squid anymore on the server.
However I don't understand how it works. From the various "what is my ip" websites, I see the address of my server (which is what I want). Also these sites do not seem to detect that there's a SSH "tunnel" going on.
Basically my question is: what is, technically, the difference between using Squid as a transparent proxy and using "SSH -D ... -N" and using a VPN?
And from the viewpoint of the websites that I'm visiting, is there any difference?
Also I'd like to know if there's any way that a website I'm visiting would be able to detect my real IP when using "SSH -D ... -N"? Is this technically feasible or is that information simply not available to the browser?