Basically such a gateway relays TCP connections, meaning the caller connects to a TCP port on the gateway, which connects to some destination on the other side of the gateway.
A Proxy Server
A server that sits between a client application, such as a Web browser, and a real server. It intercepts all requests to the real server and builds two connections. One with the client and one with the server.
Proxy servers have two main purposes
Improve Performance: Proxy servers can dramatically improve performance for groups of users. It therefore acts as a caching server. Since the proxy server is often on the same network as the user, this is a much faster operation.
Filter Requests: Proxy servers can also be used to filter requests. For example, a company might use a proxy server to prevent its employees from accessing a specific set of Web sites.
A protocol for handling TCP traffic through a proxy server. It can be used with virtually any TCP application, including Web browsers and FTP clients. It checks incoming and outgoing packets and hides the IP addresses of client applications. There are two main versions of SOCKS -- V4 and V5. V5 adds an authentication mechanism for additional security. There are many freeware implementations of both versions. SOCKS was recently accepted as an IETF standard and is documented in RFC 1928, 1929 and 1961.