Proxy server using socks5
<p>I have a problem when i`m sending my last packet,as I said in the comentary,I'm getting an warning sayng that i returned an unexpected answer follow by a different hex number every time i run it.<br>
I am using Proxifier to test this,it always give me this when i try to connect to google: </p>

<p><code>[06:22] Starting: Test 1: Connection to the Proxy Server<br>
[06:22] IP Address: 127.0.0.1<br>
[06:22] Connection established<br>
[06:22] Test passed.<br>
[06:22] Starting: Test 2: Connection through the Proxy Server<br>
[06:22] Authentication was successful.<br>
[06:22] Warning : the proxy server has returned an unexpected answer (0x32).<br>
[06:22] Connection to www.google.com:80 established through the proxy server.</code></p>

<pre><code>`void HandleConnection()
{
    cout &lt;&lt; "You are connected !!!" &lt;&lt; endl;
    char temp[30];
    Recv(temp, sizeof(temp));
    if(temp[0] == 5) // test for version
    {
        cout &lt;&lt; "Version good" &lt;&lt; endl;
        char* reply = new char[2];
        reply[0] = 5; // version
        reply[1] = 0; // method choosed (no auth required)
        Send(reply, sizeof(reply));
        delete [] reply;
        memset(temp, '\0', sizeof(temp));
        Recv(temp, sizeof(temp));
        temp[sizeof(temp)] = '\0';
        if(temp[0] == 5) // test for version
        {
            if(temp[4] == 14) // test for lenght of www.google.com
            {
                char* domain = new char[temp[4]];
                for(int i = 0; i &lt; temp[4]; ++i)
                {
                    domain[i] = temp[i + 5]; // copy domain name
                }
                domain[14] = '\0';
                cout &lt;&lt; endl;
                cout &lt;&lt; domain &lt;&lt; endl;
                int domainLen = strlen(domain);
                //with this packet i get a warning that i send an unexpected answer
                char* reply = new char[domainLen + 6]; 
                reply[0] = 5; // version
                reply[1] = 0; // succed
                reply[2] = 0; // reserved
                reply[3] = 3; // its a domain
                reply[4] = domainLen; // lenght of domain
                for(int j = 0; j &lt; domainLen; ++j)
                {
                    reply[j + 5] = domain[j];
                }
                reply[4 + domainLen] = 80; // port
                Send(reply, domainLen);
                delete [] reply;
            }
        }
    }

}`
</code></pre>
