Solved

sending tcp packets through a proxy

Posted on 2002-03-22
5
274 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
  • 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 200 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
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…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

821 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