Socks

1. Introduction

The only API the module introduces is class OpSocksSocket
OpSocksSocket implements interface OpSocket to provide for a transparent SOCKS v5 proxy support. Socks v5 is to be implemented according to http://www.faqs.org/rfcs/rfc1928.html With the following restrictions:
  1. The supported authentication methods are and (no GSS API!)
  2. No UDP connections, no TCP-server connections! Only TCP-client connections are supported.
  3. No IPv6 addresses are supported.
Instances of this class are normally created by calling SocketWrapper::CreateSocket with the ALLOW_SOCKS_WRAPPER flag set. Alternatively, you can create a regular OpSocket and then feed it to OpSocksSocket::Create, if you want to specify a particular SOCKS proxy.

2. Heap memory usage

Negligible.
From user's point of view, the use of OpSocksSocket object is in no way different from a use of a OpSocket object.

3. Stack memory usage

Low. No recursive functions.
(The module just adds a couple of wrapper calls on top of corresponding OpSocket calls.)

4. Memory ownership

Whoever obtains a OpSocksSocket by calling SocketWrapper::CreateSocket(...) should delete it when it is no longer in use. It's that simple.

5. Static memory usage

A pointer to g_socks_module.

6. Caching and freeing memory

3 string fields in the g_socks_module (one up to 255 chars, the other two -- up to 100 each)

7. Temp buffers

No tempbuffer is used.

8. Memory tuning

No tuning possible.

9. Tests

No tests yet. Test requires an accessible SOCKS v5 proxy

10. Coverage

There is no automatical way to test coverage.