?
Solved

sending tcp packets through a proxy

Posted on 2002-03-22
5
Medium Priority
?
292 Views
Last Modified: 2010-04-02
Hi, I have an app which uses CSocket to connect to a server and send data. it now turns out we need the app to be able to connect through a proxy server.

can anyone tell me what format of message I need to send to the proxy server to tell it the destination of my data?
I was assuming it would be the first data you send upon connection, and would be a standard somewhere? Or am I misguided?!

thanks,
Ian

0
Comment
Question by:ianwhite
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 6888437
It depends on the type of the data you are sending and what the proxy itself supports.  Many proxy devices or servers are setup to only pass certain types of data.  It not uncommon to see ports and protocols limited to only things like HTTP, FTP, POP3, and SMTP.

Few proxy server permit passing RAW data (can I assume that this is your meaning when you say "tcpip packets" in the question??)  So you'll need to use some alternate method.

A different type of firewall (sometimes called a proxy) does what is called NAT for Network Address Translation.  These are not really proxies in that they are transparent to the application and all the stuff needed for this to operate is on the server itself.  Most NAT firewalls ("proxys") are capable of passing any type of data but often that can be configured by the administrator.

Bottom line is that there is no general purpose answer to your question.  What you'll be able to do depends on what you are trying to do, the capabilities of the proxy, and the wishes of the people who control/configure it.
0
 

Author Comment

by:ianwhite
ID: 6888990
hmm, that could cause us problems!

we're actually using port 80, as we figured most firewalls would be open for that, but yes I'm sending RAW data (a sinple class as it happens). Does that help me (using port 80)? is there a way to send a proper http header first (to set up the redirection, then send my data, or would I have to send it everytime? I *could* change my code to talk HTTP I guess, in which case how would I configure the headers to tell the proxy which way to go?
hope you can help some more, your first comment is excellent!
0
 
LVL 32

Accepted Solution

by:
jhance earned 800 total points
ID: 6889134
An HTTP proxy will generally only pass validly formed HTTP requests and also must adhere to the HTTP proxy protocol format.  (there is an RFC on this...)
0
 
LVL 11

Expert Comment

by:griessh
ID: 6955462
Dear ianwhite

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "jhance"

comment(s) as an answer.

If you think your question was not answered at all, you can post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: http://www.experts-exchange.com/commspt/

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 

Author Comment

by:ianwhite
ID: 6958894
sorry mate, got totally caught up in other stuff and forgot all about this.

turns out I had to change my comms to HTTP and pass all the proxy info as you said. seems to work great, so thanks a million!


sorry again for the slackness in replying.

Ian
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question