Like a Pill: What is Proxy? HTTP vs SOCKS
What is Proxy?
Proxy server or proxy is a proxy server :) used while accessing the Internet. For example, when accessing a web page, instead of a direct link, the following steps are provided:
- Browser Proxy connects to the server and tells you which page it wants.
- If a proxy server is required, it connects to that page and retrieves the content.
- The proxy server sends the content to the browser.
If we make a second definition; It is a gateway system that enters between the proxy client and the server, transmits the request from the client to the server, and transmits the response from the server to the client.
For example, let's say we want to go to facebook.com. If we perform this process without using a proxy, the request from us reaches facebook.com directly. When we use a proxy, our request goes directly to the Proxy server, not facebook.com. The proxy server transmits this request to facebook.com like a client. After Facebook receives and processes the request, it does not return directly to us. The answer is returned to the proxy server. The proxy server acts as a server and transmits this response to us. In this way, we also try to provide a sense of privacy by adding a server to the communication.
What are the Proxy Types?
Generally, we can talk about 2 types of Proxy servers. Transparent and Anonymous.
Transparent Proxy: While transmitting our request to the server we request, it does not completely hide the IP address. In another way, the proxy server tells you that it has received the request from you where you want to go.
Anonymous Proxy: While our request is forwarded to the server we request, the IP address is hidden. Thus, the server we want to go to thinks that the request comes from the proxy, not from us.
What Is Proxy Used For?
Proxy's usage purposes can be spread over a wide area. However, to summarize, we can say that it can be used for the following purposes.
- Accelerating: Proxy servers can cache highly visited pages. In this case, when the page is attempted to be visited, the information in the cache is read instead of connecting to a server on the other side of the world.
- Providing control: The proxy server may not give access to the requested pages and deny access to unwanted people. It can keep in memory who entered which page. If necessary, it can be given by changing the content (for example, by deleting the curses).
- Providing security: Proxy server can automatically clean infected files. It also reduces the likelihood of spreading a virus or a malicious program since no one on the network has direct access to the Internet.
- Ensuring confidentiality: Thanks to proxy servers, you can access pages that are forbidden to be accessed in your country and hide your identity up to a point.
What is HTTP Proxy?
HTTP Proxy is one of the most widely used proxies. Its general purpose is to organize programs and scanners using the TCP protocol. With HTTP Proxy we can:
- Improving website speed by downloading caches
- Restricting access to specified websites (social media, etc.)
- Filtering data (restricting ads etc.)
- Limiting internet connection speed
- Keeping a log to audit user traffic.
What is SOCKS Proxy?
SOCKS Proxy Sockets Proxy is the abbreviation. Developed by David Koblas. It runs on the 5th Layer (Session Layer) of the OSI Reference Model.
SOCKS is an internet protocol that occasionally uses a proxy server when sending network packets from client to server and from server to client.
SOCKS5 is one of the most popular SOCKS versions. The reason it is so popular is that it uses an authentication that allows only authorized users to access the server.
Many experts consider SOCKS5 to be the most flexible server protocol. One of the important points to be understood here is this. Although we use a proxy server while connecting to the internet with SOCKS5, our traffic is not encrypted. Therefore, it would be wrong to state that it provides full privacy and security.
HTTP vs SOCKS Proxy
We have specified some headers to compare HTTP Proxy with SOCKS Proxy. We think that listing according to these titles will be more useful for understanding the subject.
Comparing According to Their Work Process
When we want to connect via HTTP Proxy, the browser or program sends a request to the proxy server to open a specific URL. The proxy server receives this data from the URL and then sends this data to the browser. Our traffic is still not encrypted unless HTTPS is used.
When we want to connect with the SOCKS Proxy, the information is transmitted to the other party in the form of Pure Form, but no information including IP address information is transmitted to the other party. In addition, SOCKS Proxy can understand and interpret the network traffic between the server and the client. HTTP Proxy does not do this.
Comparing According to Protocols Supported
HTTP Proxy is specially designed for HTTP (TCP) data. This means they will not support the UDP protocol.
In contrast, SOCKS will support proxy, TCP, UDP and more. In fact, the fact that the SOCKS protocol does not penetrate data means you can use it on any type of connection, including POP3 and HTTP. In other words, there is no compatibility problem with SOCKS.
Comparing According to Their Speed
SOCKS Proxy server is faster than HTTP proxy server. This is because it supports UDP and TCP transport protocols, which means SOCKS can work with the protocol the client wants.
Another thing that makes SOCKS Proxy fast is that rewriting the data packet header made by HTTP Proxy servers is not done in SOCKS. It reduces the risk of data packets being mislabeled or misdirected in HTTP Proxy, but this slows down the process. On the other hand, since this process is not done in the SOCKS Proxy, the risk of misdirection increases and the speed increases.
As a Result:
Both Proxy protocols allow us to change the IP address. While providing HTTPS and SOCKS (SSL) connection support, the failure of http to provide this may cause serious problems in terms of privacy.
It should be noted that HTTP Proxy was developed for a specific purpose and SOCKS Proxy works more generally.