Local Area Networks and the Internet
When a local area network is connected to the global Internet, one of the PCs, called a server, becomes a kind of conductor and connects to the Internet using a modem or in some other way, while other computers operate through it, they are also called workstations. Just like any of us has a mailing address where we receive mail letters, each computer is assigned an IP address for functioning in the Internet environment, but usually it has only a computer-explorer directly connected to the Internet.
If the computer is connected through a modem, it usually receives a dynamic address from the service provider. It is assigned automatically and is valid for a specific time. While there is also a static address, a permanent address for an unlimited period of use. At least two network devices are usually connected to the gateway computer (server): a modem and a network card, so it actually has two IP addresses, real and internal, which the network card receives on the local network.
This structure allows you to save real IP addresses, and also serves as a kind of protection for workstations within the network from external threats. As a rule, local networks use proxy servers that organize the work of the gateway computer to execute requests from local machines. Requests are executed on their behalf, and the result is returned to the original initiator in the local network.
Proxy servers are usually enough for most user programs to work, but there are programs that need to work for a while on behalf of the server, even if they are installed on user computers. If the program cannot work through a proxy (such as the FAR application), then its application becomes impossible on computers on the local network.
Today’s very popular communication programs (chat programs), such as ICQ, Skype, NetMeeting, work directly with IP addresses without intermediaries. Such a program on one of the computers on the local network takes on the role of a server. If the user does not have access to a direct connection and does not have a real IP address, then the use of such programs also becomes impossible. Typically, proxies work with standard protocols (HTTP, FTP, etc.), but new protocols require the use of completely different servers, to which Socks-servers belong.
From a number of proxies, the Socks server distinguishes the following characteristics:
It does not depend on high-level protocols such as HTTP, FTP, SMTP, as it is focused on low-level protocols (TCP, UDP).
A program on a local network, without a real IP address, is able to establish a direct Internet connection. Socks5 protocol can send the following requests (from client to server):
Establish a TCP connection on behalf of the Socks client with any remote server and ensure data transfer between them.
Work as a server on behalf of the Socks client on a specific TCP port, receive incoming connections and send it to the client for processing.
Setting UDP mapping of a specific port.
Unlike mapping proxies, which are managed under the control of the network administrator, the socks server is controlled by application programs when the need arises and for a given time.
Socks5 is the latest version of the protocol and the following features distinguish it from the previous version (Socks4):
Coordinates with the client a particular identification method.
Supports UDP protocol, which was not implemented in the previous version.
In addition to transmitting the host IP address and its domain name, it also makes it unnecessary to have a DNS server.
Many applications will not be able to work through a proxy on their own, in which case programs like SocksCapture come to the rescue. This program, like other programs similar to it, intercepts requests to winsock and sends them through the Socks server. SocksCapture is installed on each workstation on the local network, and the Socks server is launched on the gateway. Nevertheless, the Socks proxy has its limitations: firstly, it cannot see what kind of data is scooped from the network with its help, and when it accesses the same source again, it cannot immediately forward the early content that is transmitted to it , but is forced to re-execute the request; secondly, the Socks proxy cannot organize the functioning of the web server, which is located on the local network and connects through the Socks server, because the external client will not know which port it needs to connect to. Thus, the client program can become a server only for a while and, after establishing the primary connection and transmitting information about the port number for the secondary connection.