problem about tcpclient-Collection of common programming errors


  • MultiThreader

  • Nikita Zernov

  • Arsen Zahray
    c# http tcp proxy tcpclient
    I’m trying to figure out how proxy connections work via TCP. I’ve started by downloading stacksoft library and installing Squid proxy on a remote server.Now I’m trying to connect to it via c# TcpClient.The connection is opened by the following request:CONNECT proxyjudge.iathao.com:80 HTTP/1.1 HOST proxyjudge.iathao.comwhich fails with error code 400 (I’ve tried several variants of this, it ALWAYS fails):HTTP/1.0 400 Bad Request Server: squid/3.1.10 Mime-Version: 1.0 Date: Mon, 27 Aug 2012 13:25:54 GMT Content-Type: text/html Content-Length: 3295 X-Squid-Error: ERR_INVALID_REQ 0 Vary: Accept-Language Content-Language: en X-Cache: MISS from **** X-Cache-Lookup: NONE ****:*** Connection: close….

    ERROR

    The requested URL could not be retrieved

    ….

Originally posted 2013-11-09 19:42:58.