Thread: Connection to website using Proxy

  1. #1
    Registered User
    Join Date
    Apr 2007
    Location
    Sweden
    Posts
    12

    Connection to website using Proxy

    I want to make a console application which connects to a certain website trough a specified HTTP-proxy. Is this preferable to do in C++ and what do I need in order to get started?

  2. #2
    Registered User
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    217
    I would use C++ over C. To use a proxy all you do is send the same data you would if you were directly connected to the http server, except you send it to the proxy and in the GET request you put both the file name and host name. Do for example if you send a get request directly to google you would send:

    "GET /index.php\r\n"

    But using a proxy, send it to the proxy and make it:

    "GET www.google.com/index.php\r\n"

    plus all the other usual header info.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. multiple forks in one client connection (ftpclient)
    By Dynamo in forum Networking/Device Communication
    Replies: 5
    Last Post: 01-16-2011, 12:41 PM
  2. Though implementation problem
    By Elysia in forum C++ Programming
    Replies: 296
    Last Post: 05-31-2008, 01:02 PM
  3. Force connection through proxy
    By ShadowBeast in forum C# Programming
    Replies: 6
    Last Post: 05-02-2007, 01:35 PM
  4. Simple Proxy
    By Lina in forum C Programming
    Replies: 0
    Last Post: 04-01-2007, 12:36 PM
  5. Headers that use each other
    By nickname_changed in forum C++ Programming
    Replies: 7
    Last Post: 10-03-2003, 04:25 AM