Samstag, 18. April 2015

SOCKS connection establishment explained

There is a really good explanation of everything that happens during a HTTP-request that is relayed through a SOCKS5-proxy here. Nonetheless, I decided to make a similar post mostly in order to really figure it out myself. So here it goes.

I ran a little SOCKS5-server on my machine on port 8123. I then configured Firefox to use 0.0.0.0:8123 as a SOCKS-proxy and enabled the "remote DNS"-function. After that, I opened a website. During all this, I let wireshark capture the loopback device. If you want to see what kinds of values the different fields can take, the wikipedia article lists them all. The RFC is also pretty short and gives some more detailed explanations.