Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

sending tcp packets through a proxy

Posted on 2002-03-22
5
Medium Priority
?
297 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

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.

Question has a verified solution.

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

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

618 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