• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

sending tcp packets through a proxy

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
ianwhite
Asked:
ianwhite
  • 2
  • 2
1 Solution
 
jhanceCommented:
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
 
ianwhiteAuthor Commented:
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
 
jhanceCommented:
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
 
griesshCommented:
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
 
ianwhiteAuthor Commented:
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now